01 rec1. 02 a pic x(6).01 b redefines a. 02 c occurs 6 times pic 9.01 d occurs 6 times. 02 e pic x(5). 02 f pic 999.what is the length of rec1?

Showing Answers 1 - 2 of 2 Answers

dpg_25

  • Feb 14th, 2008
 

The length of rec1 is 6 bytes but the code is wrong. You can't redefine 01 level field with 02 level field. Redefined and redefining variables should be at the same level.

If your code looks like the following:
01 rec1
02 a pic x(06).
02 b redifines a.
03 c occurs 6 times pic 9.
01 d occurs 6 times.
02 e pic x(5).
02 f pic 999.

Then the length of the field rec1 becomes 12 bytes.
and length of the field d is 48.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions