What is the output generated by the following code?
01 GRP-I.
05 SUBFLD1 PIC XX VALUE "AB".
05 FILTER PIC X(6) VALUE SPACES.
01 GRP-2 REDEFINED GRP-1.
05 SUB-FLD2 PIC XX.
05 SUB-FLD3 PIC XX.
05 FILTER PIC X(4).
IF SUB-FLD1 NOT = SPACES
DISPLAY "SUBFLD1"
MOVE "ABBCCD" TO GRP-1
IF SUB-FLD3 = SPACES
DISPLAY "SPACES"
ELSE
DISPLAY "SUBFLD3"
DISPLAY "END"
ELSE
DISPLAY "SPACES"
DISPLAY "END".
(a) SUBFLD1
SUBFLD3
END
(b) SPACES
END
(c) SUBFLD1
END
(d) SUBFLD1
SPACES
Answer Posted / guest
I hope SUBFLD1 is erroneously written as SUB-FLD1
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a report item?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
what is amode(24), amode(31), rmode(24) and rmode(any)?
How to remove 2 duplicate records and copy only one using job control language?
how do you reference the rrds file formats from cobol programs
What is the usage of comp fields in cobol?
Write the code to count the sum of n natural numbers.
Discuss about changing dataset name in proc.
What are the different rules of SORT operation?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is inspect in cobol ?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is the difference between next sentence and continue in cobol programing language?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?