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 / jayaprabhu

01 rec1.

02 a pic x(6)-------------------- 6 bytes
02 b redefines a.
03 c occurs 6 times pic 9.------ 6*1(pic 9 ie why we
have mul with 1 )------------------- 6 bytes
02 d occurs 6 times pic 9.------- (6*1) 6 bytes
03 e pic x(05)------------------- 5*6 =30 bytes
03 f pic 999. --------------------- 3*6=18

6
6
6
30
18

66

if you remove e f

18

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do get the result of your program directly on your pc?

1885


How do define dynamic array in cobol.

672


What is rmode(any) ?

686


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

859






how do you reference the printer file formats from cobol programs

665


Difference between cobol and cobol-ii?

708


Discuss about changing dataset name in proc.

763


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.

2058


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17046


What is the difference between Global and External Variables?

666


What is the difference between perform … with test after and perform … with test before?

883


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1933


Write some characteristics of cobol as means of business language.

619


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.

2011