Ready for a big chunk of code?   Here's an example of what I use in a command 
file.  

Karen

  DISCONN
  SET MULTI OFF
  CONNECT diamond
  SET VAR fvChkErr INT = .xError
  IF fvChkErr <> 0 THEN
    PROPERTY vMessage CAPTION " "
    PAUSE 2 USING "Someone else is using the database and must exit" +
      CAPTION .fvCaption ICON STOP OPTION MESSAGE_FONT_SIZE 14 +
      | MESSAGE_FONT_BOLD ON | BACK_COLOR WHITE | MESSAGE_COLOR WHITE +
      | MESSAGE_FONT_COLOR RED
    SET MULTI ON
    CONNECT diamond
    GOTO editform
  ENDIF

  PAUSE 3 USING "Please wait...  Checking database integrity (step 1)" +
    CAPTION "Do NOT interrupt this process!" ICON ATTENTION +
    OPTION GAUGE_VISIBLE ON | GAUGE_COLOR RED | GAUGE_INTERVAL 15 +
    | MESSAGE_FONT_NAME VERDANA | MESSAGE_FONT_SIZE 10 | MESSAGE_FONT_COLOR 
BLACK

  DISCONN
  SET MESSAGES ON

  OUTPUT Autochk.TXT WITH SCREEN
  AUTOCHK DIAMOND FULL
  SET VAR fvChkErr = .XError
  OUTPUT SCREEN

  CLS
  IF fvChkErr > 40 THEN
    DIALOG "AUTOCHK has found ERRORS in your database!  You should talk to your+
 database administrator to determine whether to run a Reload to fix the errors.+
  This could result in a loss of data! DO YOU WANT TO CONTINUE WITH THE 
RELOAD?"=75 +
      vresp vendkey YES +
      CAPTION "Autochk File saved AUTOCHK.TXT" ICON serious OPTION 
TITLE_FONT_SIZE 11 +
      | WINDOW_BACK_COLOR RED | TITLE_FONT_COLOR WHITE
    IF vresp = "NO" THEN
      SET MULTI ON
      CONNECT diamond
      GOTO editform
    ENDIF
  ENDIF

  IF fvChkErr > 0 AND fvChkErr <= 50 THEN
    DIALOG "For some reason, the AUTOCHK program could not run, so I do not 
know+
 if your database is okay or not.  You should call your database administrator+
 to find the problem.  DO YOU WANT TO CONTINUE WITH THE RELOAD?"=75 vresp 
vendkey YES +
       CAPTION "Autochk not run" ICON serious OPTION TITLE_FONT_SIZE 11 +
      | WINDOW_BACK_COLOR RED | TITLE_FONT_COLOR WHITE
    IF vresp = "NO" THEN
      SET MULTI ON
      CONNECT diamond
      GOTO editform
    ENDIF
  ENDIF

  IF fvChkErr = 0 THEN
    DIALOG "Database passed the integrity check!  Do you want to RELOAD?" +
      vresp vendkey YES CAPTION .fvCaption ICON question OPTION 
MESSAGE_FONT_SIZE 11
    IF vresp = "NO" THEN
      SET MULTI ON
      CONNECT diamond
      GOTO editform
    ENDIF
  ENDIF

 
 
 
-----Original Message-----
From: [email protected]
To: [email protected]
Sent: Thu, Apr 22, 2021 8:46 am
Subject: [RBASE-L] - Suggestions on Using AutoCHK in a Command File

<!--#yiv1195793735 _filtered {} _filtered {}#yiv1195793735 #yiv1195793735 
p.yiv1195793735MsoNormal, #yiv1195793735 li.yiv1195793735MsoNormal, 
#yiv1195793735 div.yiv1195793735MsoNormal 
{margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv1195793735 
span.yiv1195793735EmailStyle19 {font-family:"Calibri", 
sans-serif;color:windowtext;}#yiv1195793735 .yiv1195793735MsoChpDefault 
{font-family:"Calibri", sans-serif;} _filtered {}#yiv1195793735 
div.yiv1195793735WordSection1 {}-->Good morning,  I’m running the latest build 
of R:BASE X.5 Enterprise and I’m trying to incorporate the AutoCHK command to 
run in a scheduled task every night before doing a “Pack in Place”. Anyone have 
experience with this? Anyone will to share your code? Thought I’d ask that last 
one 😊  Thanks,Paul Buckley   -- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/!%26!AAAAAAAAAAAYAAAAAAAAAJ4mzQXf2gpHhGgkNNfb5kTCgAAAEAAAAPzkRWmLe5JOt01PLYI1e4kBAAAAAA%3D%3D%40buckleyandassoc.com.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1800390198.3563383.1619101162884%40mail.yahoo.com.

Reply via email to