Buddy,

The latest release fixed this problem, which I didn't know had broken to
begin with. Before applying the latest release I had fixed the problem by
removing commented code (squiggly brackets) prior to my declare cursor code.

Thanks to all.

Bill Eyring 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Walker,
Buddy
Sent: Sunday, July 05, 2009 4:11 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Rbase Editor Trace Problem

Bill
  The first thing I would try is to try browsing the table using the where
clause you have for the declare. It seems that nothing is returning with the
where clause.
 
  You could also do a count 
 
 SEL COUNT(*)INTO VROWS INDIC IVROWS FROM tCashd2 whe rec#=.vrec# and
cdtrantype='C'
 
If vrows = 0 then
  PAUSE 2 USI 'nothing found' 
  GOTO Done
Endif
 
 Another thing since your table is beginning with a lower case t I'm
assuming it is a temp table. Does it exist.
 
Buddy
 

________________________________

From: [email protected] on behalf of Bill Eyring
Sent: Sun 7/5/2009 3:44 PM
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

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================


Reply via email to