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


Please Help Members By Posting Answers For Below Questions

What is difference between static and dynamic call in cobol?

781


What is the difference between a binary search and a sequential search what are the pertinent cobol?

737


Difference between array and sub-script ?

1169


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

678


What is a report item?

741






What is amode(24)?

684


Why did you choose to work with ibm mainframe cobol programming?

631


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?

897


Name the divisions, which are available in a cobol program?

687


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

680


What are the different types of condition in cobol and write their forms.

660


What is the difference between PIC 9.99 and PIC9v99?

783


What is the problem of ordered sequential files access?

704


What type of SDLC u followed? Why?

1524


Write the code implementing the perform … varying.

648