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 / 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 |
Post New Answer View All Answers
What is the usage of comp fields in cobol?
Which division and paragraphs are mandatory for a COBOL program?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
How do define dynamic array in cobol.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Write the code implementing the perform … varying.
How to print 10 to 1 if the input have only 10 digit number?
HOw can I get the negative sign while deduct high value from low value
How many bytes S(8) comp field occupy and its maximum value?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
What are different data types in cobol?
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.
Discuss about changing dataset name in proc.