Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

a query regarding the Evaluate Verb in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: a query regarding the Evaluate Verb in COBOL
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: 147
Location: Columbia, MO

PostPosted: Fri Jun 15, 2007 11:26 pm    Post subject: Re: a query regarding the Evaluate Verb in COBOL
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

Site Director


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

PostPosted: Sat Jun 16, 2007 6:25 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us