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 kind of error is trapped by on size error option?
Mention the guidelines to write a structured cobol program?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What are literals?
How do you differentiate between cobol and cobol-ii?
What is a SSRANGE and NOSSRANGE?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
Name some of the examples of COBOl 11?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
how can i see junk values in dclgen or in hostvariable of comp ?
What is the problem of ordered sequential files access?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What are 77 levels used for?
how do you reference the variable unblock file formats from cobol programs
How arrays can be defined in COBOL?