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 / muttaiah
I guess we will get Maxcc - 8 when we compile. Because
SUB-FLD1 is not declared anywhere here. If the field has to
be SUBFLD1 by typo mistake.
Then answer would be (a).
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is difference between static and dynamic call in cobol?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Difference between array and sub-script ?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is a report item?
What is amode(24)?
Why did you choose to work with ibm mainframe cobol programming?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Name the divisions, which are available in a cobol program?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What are the different types of condition in cobol and write their forms.
What is the difference between PIC 9.99 and PIC9v99?
What is the problem of ordered sequential files access?
What type of SDLC u followed? Why?
Write the code implementing the perform … varying.