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 / madeshh
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. == 0
03 c occus 6 times pic 9. == 0
02 d occurs 6 times.
03 e pic x(5) ==30
03 f pic 999. ==24
------
60
b.if we remove e,f
01 rec1.
02 a pic x(6) ==6
02 b redefines a. ==0
03 c occus 6 times pic 9. ==0
02 d occurs 6 times pic 9. ==6
----
12
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program to enter and display the names of students in a class using the occurs clause.
What is length is cobol?
how do you reference the printer file formats from cobol programs
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What is the difference between binary search and sequential search?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
What is perform what is varying?
What is an in line perform? When would you use it? Anything else you wish to say about it.
For rewrite, why is it mandatory that file needs to be opened?
What is the LINKAGE SECTION used in COBOL?
How do get the result of your program directly on your pc?
How you can read the file from bottom?
Write down the divisions of cobol program?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
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