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

Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


how do you reference the variable unblock file formats from cobol programs

0 Answers  


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

0 Answers  


There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?

2 Answers  






What is a scope terminator give example?

0 Answers  


Write a program that uses move corresponding.

0 Answers  


what are the utilities for load and unload the DB2 tables

1 Answers   L&T,


What do you feel makes a good program?

2 Answers  


What is the difference between COMP & COMP-3 ?

2 Answers  


can we read in input the file with a variable length ? please , how ..could you help me ?

3 Answers   EDS,


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


Categories