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
How do you get the data to code the BMS macro?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
IF I mention stop run in CICS what happens?
What are all the divisions of a COBOL program?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
how can i see junk values in dclgen or in hostvariable of comp ?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is a SSRANGE and NOSSRANGE?
what is amode(24), amode(31), rmode(24) and rmode(any)?
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)?
What is comp-1 and comp-2?
How do define dynamic array in cobol.
When is inspect verb is used in cobol?