Joined: 15 Feb 2005
Location: San Jose, CA
|If you have z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004), you can use DFSORT's new IFTHEN and OVERLAY parameters to do what you want as shown below. If you have DFSORT, but you don't have the Dec, 2004 PTF installed, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
Here's the DFSORT job. I assumed that your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
* Put 'K' in 81 and a seqnum in 82-89
* If seqnum is 10-30, put 'D' in 81.
* If seqnum is 40-60, put 'D' in 81.
* Delete records with 'D' in 81. Remove 'K' and seqnum.