IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

a query regarding the Evaluate Verb in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bharat.malgave
Currently Banned

New User


Joined: 24 Nov 2006
Posts: 6
Location: pune

PostPosted: Fri Jun 15, 2007 4:36 pm
Reply with quote

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
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Fri Jun 15, 2007 11:26 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jun 16, 2007 6:25 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top