Mike, While not to the point of the subject line, I can offer another way to speed up your program. In the section of code below, with intervening lines deleted, you a) declare, open and fetch cursor C#3, start a while loop, declare open and fetch cursor C#2, fetch C#3, then endwhile. This means that you are asking R:Base to do the cursor organization for every iteration of the while loop.
Why not declare C#2 outside the while loop, then within the while loop do OPEN C#2 RESET / CLOSE C#2. You only have to pre-declare your variable VPNUM and type it before the declaration of C#2. You'll save much processing time, not to mention memory in the DOS version. >Ok...here is the scoop... >Rbase for DOS 6.5++ >Win98 SE or DOS 6.22 stations >The program compares totals from different tables to check for data integrity, >using a declare cursor (I'll paste the program below) >SET STATIC made no difference. >I have not tried the others yet. >DECLARE C#3 CURSOR FOR SEL PATNUMBR BALANCE PREVBAL FRO PATINFO >OPEN C#3 >FETCH C#3 INTO VPNUM I1,VBALANCE I2,VPREVBAL I3 >SET VARIABLE VERR = .DERR >WHILE VERR EQ 0 THEN ... > DECLARE C#2 CURSOR FOR SEL NEWBALAN FRO TRANSACT ORDER BY TRANTIME = D > WHE + > PATNUMBR EQ .VPNUM > OPEN C#2 > FETCH C#2 INTO VCURBAL I1 ... > FETCH C#3 INTO VPNUM I1,VBALANCE I2,VPREVBAL I3 > SET V VERR = .DERR > IF VPNUM = 0 OR VPNUM FAILS THEN > RUN DEBUG.CMD > ENDIF >ENDWHILE Emmitt Dove Manager, DairyPak Business Systems Blue Ridge Paper Products, Inc. 40 Lindeman Drive Trumbull, CT 06611 (203) 673-2231 [EMAIL PROTECTED] [EMAIL PROTECTED] ================================================ 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/
