Determine the total no of bytes in the following.
01 rec1.
02 a pic x(6)
02 b redefines a.
03 c occus 6 times pic 9.
02 d occurs 6 times pic 9.
03 e pic x(5)
03 f pic 999.
Answer Posted / madesh
1st of all it will give an error because of pic clause with
group item in occurs.
a.if we remove pic clause from there it will take 66 bytes.
01 rec1.
02 a pic x(6) == 6
02 b redefines a. == 6
03 c occus 6 times pic 9. == 0
02 d occurs 6 times.
03 e pic x(5) ==30
03 f pic 999. ==24
------
66
b.if we remove e,f
01 rec1.
02 a pic x(6) ==6
02 b redefines a. ==6
03 c occus 6 times pic 9. ==0
02 d occurs 6 times pic 9. ==6
----
18
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Which Search verb is equivalent to PERFORM…VARYING?
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?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
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?
Why did you choose to work with ibm mainframe cobol programming?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
How you can characterize tables in cobol?
Write a cobol program making use of the redefine clause.
What are the pertinent COBOL commands?
What are the access modes of START statement?
Can you please let me know the centre name of INS certification in Kolkata.
How do define dynamic array in cobol.
Difference between cobol and cobol-ii?
How many bytes S(8) comp field occupy and its maximum value?
Name some of the examples of COBOl 11?