praveensn
New User
Joined: 30 Jul 2008 Posts: 32 Location: Pune
|
|
|
|
Hi,
I have an input file as below:
600 qoa = ABCD206111 A SO48953NE101LNKN3AN2007
600 qob = ABCD206111 A SP05890NE101LNKN3AN2007
600 qoc = ABCD206111 A SP06188NE101LNKN3AN2007
600 qod = ABCD206111 A SP06711NE101LNKN3AN2007
600 qoe = ABCD206111 A SP48424NE101LNKN3AN2007
I want to change the first 3 bytes i.e, from 600 to 100.
Could you please provide me the jcl for this.
Thanks in advance,
Praveen.N |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you want to replace '600' with '100' and leave other values unchanged, you can use a DFSORT job like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
600 qoa = ABCD206111 A SO48953NE101LNKN3AN2007
600 qob = ABCD206111 A SP05890NE101LNKN3AN2007
600 qoc = ABCD206111 A SP06188NE101LNKN3AN2007
600 qod = ABCD206111 A SP06711NE101LNKN3AN2007
600 qoe = ABCD206111 A SP48424NE101LNKN3AN2007
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'600'),OVERLAY=(1:C'100'))
|
If you want to change positions 1-3 to '100' in every record regardless of the original value, you can use a DFSORT job like this:
Code: |
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
600 qoa = ABCD206111 A SO48953NE101LNKN3AN2007
600 qob = ABCD206111 A SP05890NE101LNKN3AN2007
600 qoc = ABCD206111 A SP06188NE101LNKN3AN2007
600 qod = ABCD206111 A SP06711NE101LNKN3AN2007
600 qoe = ABCD206111 A SP48424NE101LNKN3AN2007
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(1:C'100')
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|