Gilbert Saint-Flour wrote on 01/29/2007 07:25:01 AM: > I am looking for a way to tell DFSORT to stop reading the SORTIN > data set when > it reaches a record with X'0000' in pos 1-2. I looked at the latest DFSORT > doc but didn't see anything that could help me, other than an E15 exit, which > is precisely what I'm trying to stay clear of. Any idea anyone?
Gilbert, I can't think of a way to do this in one pass other than with an E15 exit. But here's a DFSORT/ICETOOL job that will do it in two passes by generating a STOPAFT=n parameter. I assumed that you just wanted to copy the records and that your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other situations. //S1 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //IN DD DSN=... input file (FB/80) //CTL2CNTL DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS) //OUT DD DSN=... output file (FB/80) //TOOLIN DD * COPY FROM(IN) TO(CTL2CNTL) USING(CTL1) COPY FROM(IN) TO(OUT) USING(CTL2) //CTL1CNTL DD * INREC OVERLAY=(81:SEQNUM,8,ZD) OUTFIL FNAMES=CTL2CNTL,INCLUDE=(1,2,BI,EQ,X'0000'), BUILD=(C' OPTION COPY,STOPAFT=',81,8,80:X) /* Frank Yaeger - DFSORT Team (IBM) - [EMAIL PROTECTED] Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html