I have modified my program to set a secondary variable to the value of the error variable immediatetly after AUTOCHK completes. I then test this variable to see if it's 0 or not. After reviewing the explanation in the R:Base reference manual and the posts from other list members I now have an enhanced understanding of how to use it.
Thanks so much. -- Mike -----Original Message----- From: Bernard Lis [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 4:05 PM To: [EMAIL PROTECTED] Subject: Re: Database issue Razzak posted a macro for reloading a database. I am using it with my own modifications. I call it REORG.MAC *( reorg.mac ) SET ERROR VAR E1 cls WRITE "Checking database for errors..." at 8 21 disc AUTOCHK mdpc IF E1 > 40 THEN cls WRITE "AUTOCHK has found errors in the database!" at 10 21 BEEP pause 2 using "Call Programmer" goto aldun ENDIF If E1 > 0 and E1 < 50 THEN cls WRITE "AUTOCHK will not run - User Abort or Out of Memory" at 10 21 BEEP pause 2 goto aldun ENDIF IF E1 = 0 THEN WRITE "'AUTOCHK successful - No errors found" at 10 21 -- pause 2 using "Press [Enter] to continue to reload the database" ENDIF del old.rb? con mdpc set var vDBsize double = (istat("dbsize")) set var vSpace double = (istat("diskspace")) set var isitok = (.vSpace - (.vDBsize * 2)) if vSpace > .isitok then disc ren mdpc.rb1 old.rb1 ren mdpc.rb2 old.rb2 ren mdpc.rb3 old.rb3 ren mdpc.rb4 old.rb4 con old reload mdpc disc con mdpc else pause 2 using "Not Enough disk space to reorg database" endif Label aldun clear var e1, vDBsize, vSpace, isitok return Bernie Lis Megabytes, Inc. ================================================ 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/ ================================================ 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/
