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 / uttam das

my answer is (d)

SUB-FLD3 = SPACES, it satisfies bcz in grp-2

there is no initialization of sub-fld3.
when sub-fld3 is not initialize, it always contains spaces.
alphanumeric stored spaces and numeric stored zeros

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is amode(31)

726


what is search and searchall?what is the diffrence between them?give an best example?

5564


How do you reference the fixed block file formats from cobol programs

709


What is inspect in cobol ?

806


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)?

635






Can a Search can be done on a table with or without Index?

807


What are literals?

633


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

678


A table has two indexes defined. Which one will be used by the SEARCH?

759


What rules are to be followed while using the corresponding options?

643


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

859


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

644


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17054


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

687


Differentiate between structured cobol programming and object-oriented cobol programming.

670