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
What is amode(31)
what is search and searchall?what is the diffrence between them?give an best example?
How do you reference the fixed block file formats from cobol programs
What is inspect in cobol ?
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)?
Can a Search can be done on a table with or without Index?
What are literals?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
A table has two indexes defined. Which one will be used by the SEARCH?
What rules are to be followed while using the corresponding options?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
Name the divisions, which are available in a cobol program?
Differentiate between structured cobol programming and object-oriented cobol programming.