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

In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.

7 Answers   HCL,


Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,


what are the utilities for load and unload the DB2 tables

1 Answers   L&T,


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,






If you are current on the owner of a set, what is the difference between obtain next and obtain first?

0 Answers  


With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?

4 Answers   IBM,


How do you define a variable of comp-1 and comp-2?

0 Answers  


What is sqlca and why is it needed in any cobol-db2 program?

1 Answers  


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


if a>b continue display x. dispaly y. end-if display 1 display 2. display 3. what should be my output ?

3 Answers  


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


Categories