Ron, If the value "01PS" exist on every record, then you can simply modify the INCLUDE cond on OUTFIL. Something like this
//STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * ----+----1----+----2----+----3----+----4----+----5----+----6----+ 101 10001 T 01PS ABC 102 10001 01PS PRS 103 10001 01PS XYE 101 10002 T 02PS ABC 102 10002 02PS PRS 103 10002 02PS XYE 101 10003 A ABC 102 10003 PRS 103 10003 XYE //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY INREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(11,5),PUSH=(81:23,1)) OUTFIL BUILD=(1,80), INCLUDE=(81,1,CH,EQ,C'T',AND,25,4,CH,EQ,C'01PS') //* If that is not how your data looks like then you need to show me a sample of input and I can show you a way to get the results. Thanks, Sri Hari Kolusu DFSORT Development IBM Corporation Email: [email protected] Phone: 408-463-2403 Tie Line 543-2403 IBM Mainframe Discussion List <[email protected]> wrote on 09/21/2012 07:58:03 AM: > From: Ron Thomas <[email protected]> > To: [email protected], > Date: 09/21/2012 07:59 AM > Subject: Re: JCL Sort > Sent by: IBM Mainframe Discussion List <[email protected]> > > Thanks a bunch Kolusu.. , just want to check with you if i have a > additional field to be checked say for e.g if the 25'th field is > "01PS" then how we can modify the same job? > > Thanks, > Ron T > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
