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


Please Help Members By Posting Answers For Below Questions

What are the cobol coding sheets?

660


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

928


How do u write test cases?

1633


What is the difference between comp and comp-3?

694


What is the local-storage section?

681






What is amode(31)

716


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2005


Can we redefine the field of x(200) to less than 200?

814


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1900


What type of SDLC u followed? Why?

1516


What is the difference between PIC 9.99 and PIC9v99?

772


how do you reference the fixed unblock file formats from cobol programs

705


How do define dynamic array in cobol.

669


How do you reference the following file formats from cobol programs?

693


Have you used comp and comp-3 in your project? And how?

2006