View previous topic :: View next topic
|
Author |
Message |
bharat.malgave Currently Banned New User
Joined: 24 Nov 2006 Posts: 6 Location: pune
|
|
|
|
hi i have a query regarding the Evaluate Verb in COBOL
i am executing the SQL SELECT query through COBOL prog.
like this:
EXEC SQL
SELECT * from emp
where
emp_code=e123
and ACCT_NBR=xxx
End-exec
Evaluate SQLCODE
when 0
when -811
move a to b
when +100
move c to b
when other
abend program
End-Evaluate
my query executes with sqlcode 0000
and it executes when + 100
move c to b
in Evaluate statement
How it is possible?
as per logic when 0 should be executed
but in my case it executes When +100.
please anyone tell me what is acutally happening here?
I hope you will help me
thanks
bharat
[/size][/b] |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
I tried your code and couldn't make it hit the 'wrong' When.
Can you put this in debug and post the actual code & field value at the time of execution? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Even without debug, seeing your variables and the actual procedure code (not something typed by hand here) may help.
Also when you post code, you get a much more readable presentation when you use the "Code" tab at the top of the reply panel. To check out your reply before it is seen on the form, click "Preview" on the bottom of the reply panel. |
|
Back to top |
|
|
|