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


Please Help Members By Posting Answers For Below Questions

Which Search verb is equivalent to PERFORM…VARYING?

679


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?

891


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

1950


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?

1227


Why did you choose to work with ibm mainframe cobol programming?

627






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

1923


How you can characterize tables in cobol?

710


Write a cobol program making use of the redefine clause.

725


What are the pertinent COBOL commands?

2619


What are the access modes of START statement?

716


Can you please let me know the centre name of INS certification in Kolkata.

1713


How do define dynamic array in cobol.

667


Difference between cobol and cobol-ii?

704


How many bytes S(8) comp field occupy and its maximum value?

1626


Name some of the examples of COBOl 11?

2676