What are the different forms of EVALUATE statement?
Answers were Sorted based on User's Feedback
Answer / shinoy sansilavose
EVALUATE
WHEN A=B AND C=D
imperative stmt
WHEN (D+X)/Y = 4
imperative stmt
WHEN OTHER
imperative stmt
END-EVALUATE
EVALUATE SQLCODE ALSO FILE-STATUS
WHEN 100 ALSO '00'
imperative stmt
WHEN -305 ALSO '32'
imperative stmt
WHEN OTHER
imperative stmt
END-EVALUATE
EVALUATE SQLCODE ALSO A=B
WHEN 100 ALSO TRUE
imperative stmt
WHEN -305 ALSO FALSE
imperative stmt
END-EVALUATE
EVALUATE SQLCODE ALSO TRUE
WHEN 100 ALSO A=B
imperative stmt
WHEN -305 ALSO (A/C=4)
mperative stmt
END-EVALUATE
| Is This Answer Correct ? | 15 Yes | 0 No |
I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
i have two file, each file having : file1 is having 2 fields field1 field2 file2 is having 3 fields field1 field2 field3 my req is to make it one file like: field1 field2 field1 field2 field3 if anyone know please send me syntax, i tried this with DFSORT but could not succeed.
How to print 10 to 1 if the input have only 10 digit number?
can you declare redefine in level 01?
what is soc7 abend?how u can trace it?
How to display the index.(displacement from an array)
what is Pic 9v99 Indicates?
What is report-item?
how to fetch the record before the last record in a cobol file( its a huge file and if the key field is not known)
What is the use of LINKAGE SECTION?
Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?
7 Answers Bank Of America, Mind Tree,