Mike The others are right.. You have to have catch the error after each command you want to test. One thing you might want to add is:
DISCONNECT CLEAR ALL VAR SET ERROR VAR vchk_result SET VAR vchk_errhold INTEGER = 0 OUTPUT d:\autoload.$$$ SET VAR vchk_errhold = .vchk_result IF vchk_errhold <> 0 THEN --Log it, or do what ever you need to do here SET VAR vchk_errhold = 0 --Clear out the error ENDIF OUTPUT SCREEN CLS AUTOCHK maindata FULL SET VAR vchk_errhold = .vchk_result IF vchk_errhold <> 0 THEN --Log it, or do what ever you need to do here SET VAR vchk_errhold = 0 --Clear out the error ENDIF The reason for capturing the Error Variable into another variable is that for some commands (not sure how many) it will cause you to dump out of RBase.. I've been told the CONNECT is one of them. There is likely others, so it's better to be safe than sorry. There may be other reasons, and I can't remember them at the moment. Hope this helps Jim Limburg --- Ramsour Mike <[EMAIL PROTECTED]> wrote: > Part of a routine that I do each day is to reload my database, run AUTOCHK > on it and if everything comes out OK I then copy the database to a network > share for my users. During this morning's run I encountered a problem where > the RB2 did not get entirely reloaded and none of the indices were rebuilt > but AUTOCHK apparently gave an OK result so that the copy took place. > > Here is the code that I use: > > DISCONNECT > -- > CLEAR ALL VAR now > -- > SET ERROR VAR vchk_result > -- > OUTPUT d:\autoload.$$$ > -- > AUTOCHK maindata FULL > -- > OUTPUT SCREEN > -- > CLS > -- > IF vchk_result <> 0 THEN > -- > CLS > -- > OUTPUT d:\loadrslt.txt > -- > WRITE 'Errors encountered during data loading -- aborting' > -- > OUTPUT SCREEN > -- > GOTO endline > -- > ENDIF > -- > CONNECT maindata > -- > RUN mon_calc.prg > -- > RELOAD NEXTDATA > -- > DISCONNECT > -- > OUTPUT d:\autoreld.$$$ > -- > AUTOCHK nextdata FULL > -- > OUTPUT SCREEN > -- > IF vchk_result = 0 THEN > -- > CLS > -- > OUTPUT d:\reldrslt.txt > -- > WRITE 'Database reload successful' > -- > OUTPUT SCREEN > -- > DELETE MAINDATA.* > -- > RENAME NEXTDATA.* MAINDATA.* > -- > COPY MAINDATA.* m:\rbased~1 > -- > GOTO endline > -- > ELSE > -- > CLS > -- > OUTPUT d:\reldrslt.txt > -- > WRITE 'Errors encountered on database reload' > -- > OUTPUT SCREEN > -- > GOTO endline > -- > ENDIF > -- > LABEL endline > -- > EXIT > > The database files are somewhat large by some measures: > > MAINDATA.RB1 169,196 > MAINDATA.RB2 805,486,492 > MAINDATA.RB3 201,887,774 > MAINDATA.RB4 1,126,400 > > My concern is that the files are getting too large or that I have something > wrong with my system or possibly the database. If there was an error in the > database then why didn't AUTOCHK catch it? I am running the latest version > of R:Base for Windows on a Windows 2000 PC. Could there be a problem with > an index file being that big? > > As an aside, will v. 7.0 also be limited to around 2 GB or will that limit > be lifted? > > Thanks > > Mike Ramsour > AK Steel Coshocton Works > > 740-829-4340 > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
