Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us