kumar119119
New User
Joined: 31 May 2010 Posts: 25 Location: Pune
|
|
|
|
Hi to All,
This is an IBM interview question,
Interviewer:
I have 100 records in a file,
LRECL=80,
1.......9 12.....20 25......40 45........60
this is the record layout,
I want to insert ABCDEFGHIJ from 66........75 in all 100 records,
How do you code this?
Please Folks.... give me answer, I cant reply,
I tried to explain through COBOL, but he wants thru SORT only |
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Try this untested code:
Code: |
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1,65,66:C'ABCDEFGHIJ',76:66,14)
/* |
Note that this will produce an output data set with LRECL=90 rather than LRECL=80. To keep the same LRECL you would need to use OVERLAY but then what to do with those ten bytes which are OVERLAYed, should be answered first. |
|