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.
Answers were Sorted based on User's Feedback
Answer / guest
01 rec1.
02 a pic x(6)
02 b redefines a.
03 c occus 6 times pic 9.----------- 6 bytes
02 d occurs 6 times.
03 e pic x(5)-----------------------30 bytes
03 f pic 999.-----------------------18 bytes
________
54 bytes
scenario 2:If we remove e and f
01 rec1.
02 a pic x(6)-------------------------------6 bytes
02 b redefines a.
03 c occus 6 times pic 9.
02 d occurs 6 times pic 9.-------------------6 bytes
___________
12 bytes
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / sri
It has to be 54 (6 + (8*6)) if we remove PIC clause from d.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / milan kumar
a PIC X(6)-------------6B
b REDEFINES A ---------0B
IF WE REMOVE PIC CLUSE
D=( E PIC X(5)+F PIC 999)
D=(8B OCCURS 6 TIMES)
D----------------------48B
----------
TOTAL OF 54B
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / imran ahmad
FIRST YOU HAVE TO REMOVE PIC CLAUSE FROM GROUP ITEM D
ANSWER IS 56
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Answer / vineet pasricha
nice ques.
remove pic clause from d
it will take 54 bytes
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
what r the types of perform statement
What is the LINKAGE SECTION used for?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree
what is the use of keep and pass in disp
suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.
how to transfer the file from pc to mainframe??
2)Where the Plan is located in CICS-DB2?
Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb
Name the sections present in data division.
can we use reference modification an arry.
how to display comp3 variables reply soon ?