It seems to me the word INDICATOR is missing  in your fetch

4.  declare c#1 cursor for select idno,cddr fro tCashd2 +
      whe rec#=.vrec# and cdtrantype='C'
5.  open c#1
6.  fetch c#1 into vidno indicator vi1,vcddr indicator vi2

Personally I would use complete reserved words and I prefer a more readable
layout. It makes it easier to find typos and so on
Line 19 also is not necessary.



Kind Regards,

Tony IJntema
The Netherlands


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring
Sent: zondag 5 juli 2009 20:44
To: RBASE-L Mailing List
Subject: [RBASE-L] - Rbase Editor Trace Problem

I have a piece of code which I am trying to trace. This code is a declare
cursor operation.
 
When I try to trace this code, the trace entirely skips the while loop so
that I cannot see what is going in in the while loop.
 
Here is my code;
1.  SET ERROR MESSAGE 705 OFF
2.  drop cursor c#1
3.  SET ERROR MESSAGE 705 ON
4.  declare c#1 cursor for select idno,cddr fro tCashd2 +
      whe rec#=.vrec# and cdtrantype='C'
5.  open c#1
6.  fetch c#1 into vidno vi1,vcddr vi2
7.  while sqlcode <> 100 the
8.    sel sum CDdr,sum CDcr into vSumDrCashD vi3,vSumCrCashD vi4 fro tCashd2
+
       whe cno=.vidno and rec#=.vrec#
9.    set v vidnodiff=(.vSumDrCashD-.vSumCrCashD)
10.   if vidnodiff > 0.00 the
11.     update tCashd2 set cddr=(.vcddr-.vidnodiff) +
12.       whe cno=.vidno and cdtrantype='c'
13.   endi
14.   if vidnodiff < 0.00 the
15.     update tCashd2 set cddr=(.vcddr+.vidnodiff) +
          whe cno=.vidno and cdtrantype='c'
16.   endi
17.   fetch c#1 into vidno vi1,vcddr vi2
18. endwhile
19. SET ERROR MESSAGE 705 OFF
20. drop cursor c#1
21. ret

All my variables have been pre-defined before this code. When I use the
trace command, it steps through Lines 1 to 6. When it hits line 7 ot skips
all the way to line 18 so I never see the code stepping through the While
loop. 

I have never seen this behavior before and I'm wondering if anyone can help
me correct the problem. Is it a setting in Rbase Editor ? I have put the
code through RStyle with no errors reported.

 

Any help would be appreciated

 

 




__________ Informatie van ESET NOD32 Antivirus, versie van database
viruskenmerken 4219 (20090705) __________

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com

 

__________ Informatie van ESET NOD32 Antivirus, versie van database
viruskenmerken 4219 (20090705) __________

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com
 


Reply via email to