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
What guidelines should be followed to write a structured cobol prgm?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Write the code to count the sum of n natural numbers.
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
What is an in line perform? When would you use it? Anything else you wish to say about it.
Which division and paragraphs are mandatory for a COBOL program?
What is perform what is varying?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
How you can read the file from bottom?
What kind of error is trapped by on size error option?
Explain the configuration section of a cobol program with examples of syntax.
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.
Write a cobol program making use of the redefine clause.
How do you reference the fixed block file formats from cobol programs
how do you reference the fixed unblock file formats from cobol programs