Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
pragati

New User

Joined: 30 Aug 2005
Posts: 4

 Posted: Wed Sep 07, 2005 12:35 am    Post subject: diff forms of evaluate stmt hi all i want to know abt different forms of evaluate statement plz give examples.. thanks

sihanature
Warnings : 1

New User

Joined: 01 Sep 2005
Posts: 33

 Posted: Wed Sep 07, 2005 2:14 am    Post subject: HI Hi, It depicts the Normal Switch-Case method , here are the Examples. 1)EVALUATE TRUE WHEN PERCENT >= 80 MOVE ?A? TO GRADE WHEN PERCENT >= 70 MOVE ?B? TO GRADE WHEN PERCENT >= 60 MOVE ?C? TO GRADE WHEN PERCENT >= 50 MOVE ?D? TO GRADE WHEN OTHER MOVE ?E? TO GRADE END-EVALUATE 2)EVALUATE CHOICE WHEN 1 PERFORM FIRST-PARA1. WHEN 2 PERFORM SECOND-PARA1. WHEN OTHER PERFORM COMM-PARA1. END-EVALUATE Hope it might helpfull for you.
paru

New User

Joined: 24 Jun 2005
Posts: 9
Location: INDIA

 Posted: Wed Sep 14, 2005 10:58 am    Post subject: I wud like to add to that .. You cud also use EVALUATE TRUE ALSO TRUE WHEN ((A>B) AND (B>C)) PERFORM PARA1 WHEN ((A

Active User

Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

Posted: Wed Sep 14, 2005 11:39 am    Post subject:

Evaluate:

1. General Evaluate (In which, we can also use THRU in WHEN condition)
2. Evaluate ALSO (In which, we can also use THRU in WHEN Condition)

syntax:

Evaluate Case-1{ ALSO Case-2}
WHEN Conditon1{ ALSO Condition2.}
...
{When Other Imperative-Stmt}
end-evaluate.

Case-1 & Case-2 May be in these forms.
1.Identifier
2.Literal
3.Expression
4.TRUE
5.FALSE

Condition1 or Condition-2:

ANY
condition
TRUE
FALSE
NOT Condition1 THRU Condition1

Usage with Also
 Code: EVALUATE VAR1 ALSO VAR2 WHEN 1 ALSO 2 PERFORM PARA-1 WHEN 1 ALSO 3 PERFORM PARA-2 . . END-EVALUATE.

here to perfrom para -1 var1 and var2 must contain value 1 and 2.
ie the statement is equivallent to
 Code: IF VAR1 = 1 AND VAR2 = 2 PERFORM PARA-1 END-IF
.

Usage with next and continue
 Code: COMPUTE  X = A + B     EVALUATE X           WHEN 3                     NEXT STATEMENT           WHEN 4                     CONTINUE      END-EVALUATE      ADD 5 TO X.      DISPLAY X.

hope this helps.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Compare PD Values with same storage &... Shrinika Rajendran JCL & VSAM 5 Wed Nov 05, 2014 3:17 pm merge records from 2 ps files with di... kishpra DFSORT/ICETOOL 6 Wed Mar 19, 2014 1:00 pm Need help on SORT to write each input... rahul sijoriya JCL & VSAM 4 Mon Dec 02, 2013 9:09 pm DB2 delete row from one table with a ... Shereen Samuel DB2 1 Thu Apr 11, 2013 12:08 pm What is exact diff and adv btw Comp p... MOHAN KUMAR DURAIRAJAN COBOL Programming 1 Thu Mar 14, 2013 4:39 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us