View previous topic :: View next topic
|
Author |
Message |
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Hi,
I need to insert data at a particular position of all the records in a dataset. Consider the below records
Code: |
ABCD EF
LMNO PQ
RSTU WX |
Now I need to insert XX at Column position 5 and 6 for all the records. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Here is step will do desired....
(Provided you want 5th and 6th position to be replaced by XX)
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=YOUR.INPUT.FILE.HERE
//SORTOUT DD DSN=YOUR.OUTPUT.FILE.HERE
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(5:C'XX')
|
Read through Franks DFSORT Getting started instead of blindly using these solutions... See
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Cheers |
|
Back to top |
|
|
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Thanks Escapa... Does OVERLAY increases the length of the file or does it overrides in the desired position? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
It is OVERLAY not INSERT so what do you think? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
mushreyas wrote: |
Thanks Escapa... Does OVERLAY increases the length of the file or does it overrides in the desired position? |
Later is true |
|
Back to top |
|
|
|