wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

Answers were Sorted based on User's Feedback



wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?..

Answer / neo devan

Evaluate verb is one of conditional statement used in cobol.
It is used whenever there are many conditions to check, its
used instead of nested if statements.
The syntax : evaluate true
when name="Robert" display "Robert".
when name="Langdon" display "Langdon".
end evaluate.

evaluate fname also lname
when "Robert" also "Langdon"
display "Robert Langdon".
when "Leonardo" also "Da Vinci"
display "Leonardo Da Vinci".
end evaluate.

Is This Answer Correct ?    6 Yes 1 No

wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?..

Answer / kaarthik

Just to add to the already given answers,

Evaluate is mainly used to eliminate the use of Nested-if's
this is introduced as part of VS-COBOL 2 .

As for REC-FM,
While defining the file in COBOL,

Give RECORDING MODE IS F

In JCL, Give DCB=(RECFM = FB,LRECL=XX,BLKSIZE=xxx)

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More COBOL Interview Questions

whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?

9 Answers  


What do you understand by psb and acb?

0 Answers  


Give some examples of command terminators?

0 Answers  


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


what is soc7 abend?how u can trace it?

4 Answers   Accenture,






why we are using picture clause in the cobol programs?

2 Answers  


What are the different ways to run a COBOL DB2 program using JCL?

2 Answers  


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


2)Where the Plan is located in CICS-DB2?

1 Answers   IBM,


what is Pic 9v99 Indicates?

2 Answers  


How can you add a particular field/coloumn in copybook?

3 Answers   ADP, DELL, L&T,


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

0 Answers   HCL,


Categories