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

Perform with Evaluate?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinivas_443

New User


Joined: 19 Dec 2007
Posts: 11
Location: chennai

PostPosted: Wed Jan 23, 2008 10:58 am
Reply with quote

Hi all,
Please explain Perform with evaluate statement?

Regards,
Srinivas Jala
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Jan 23, 2008 11:21 am
Reply with quote

Hi Srinivas,

Please go through the manual by tab top of this page & let us know if u need ne clarification
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Wed Jan 23, 2008 12:05 pm
Reply with quote

In it's simplest form the EVALUATE statement goes something like this:

EVALUATE condition
WHEN value
imperative-statements
WHEN value
imperative statements
...........
END-EVALUATE.
Here's a simple example:

EVALUATE WS-X
WHEN 1
ADD 15 TO WS-TOTAL
PERFORM A-100-REPORT
WHEN 2
ADD 16 TO WS-TOTAL
MOVE 'WS-X IS 2' TO WS-DISPLAY
PERFORM A-200-REPORT
WHEN OTHER
PERFORM X-100-ERROR
END-EVALUATE.


I think this will solve your doubt
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Jan 23, 2008 3:29 pm
Reply with quote

EVALUATE <condition>

WHEN <first condition>
PERFORM FIRST-CONDITION-PARA

WHEN <second condition>
PERFORM SECOND-CONDITION-PARA

WHEN <third condition>
PERFORM THIRD-CONDITION-PARA

WHEN OTHER
PERFORM OTHER-PARA

END-EVALUATE.[/quote][/list][/code]
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 Use of Perform Thru Exit COBOL Programming 6
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts How to perform Digest Access Authenti... All Other Mainframe Topics 0
No new posts Infinite loop Issue in perform Until COBOL Programming 18
No new posts Perform airthmetic operations in JCL JCL & VSAM 4
Search our Forums:

Back to Top