kumar119119 New User Joined: 31 May 2010 Posts: 25 Location: Pune
Hi to All,
This is an IBM interview question,
I have 100 records in a file,
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 Senior Member Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
Try this untested code:
//SYSIN DD *
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.
All times are GMT + 6 Hours