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
 

 

What are the different forms of EVALUATE statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Tue Mar 21, 2006 10:18 am    Post subject: What are the different forms of EVALUATE statement
Reply with quote

Hi,
One of the interview question - What are the different forms of EVALUATE statement?Can somebody help?

Thanks,
KS
Back to top
View user's profile Send private message

tusharguptait

New User


Joined: 15 Feb 2006
Posts: 32

PostPosted: Tue Mar 21, 2006 1:00 pm    Post subject: Re: EVALUATE
Reply with quote

1)
EVALUATE
WHEN A=B AND C=D
imperative stmt
WHEN (D+X)/Y = 4
imperative stmt
WHEN OTHER
imperative stmt
END-EVALUATE

2)
EVALUATE SQLCODE ALSO FILE-STATUS
WHEN 100 ALSO '00'
imperative stmt
WHEN -305 ALSO '32'
imperative stmt
WHEN OTHER
imperative stmt
END-EVALUATE

3)
EVALUATE SQLCODE ALSO A=B
WHEN 100 ALSO TRUE
imperative stmt
WHEN -305 ALSO FALSE
imperative stmt
END-EVALUATE

4)
EVALUATE SQLCODE ALSO TRUE
WHEN 100 ALSO A=B
imperative stmt
WHEN -305 ALSO (A/C=4)
imperative stmt
END-EVALUATE


Hope these helps.
Back to top
View user's profile Send private message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Wed Mar 22, 2006 5:43 pm    Post subject:
Reply with quote

Thanks.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am
No new posts Inspect statement spoorni COBOL Programming 5 Mon Jun 06, 2016 9:53 pm


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