I'll bite ... I suspect that your TEMP2 dataset ended up with a LRECL=80 (as requested by the DCB=*.SORT1.SORTIN referback), but you only had 24 bytes of data in each record (as truncated by the DCB of SORT1.SORTOUT).
Regards, Ulrich Krueger -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Martin Kline Sent: Wednesday, July 09, 2008 08:46 To: [email protected] Subject: Sort Trivia - or What Were You Thinking? I had to laugh when I received a similar set of JCL from a production job. The input was actually a file, but I've simulated it inline for demonstration purposes. Without running the JCL, can anyone tell how many bytes will be in the output TEMP2 file? Hint: We had DFSORT running with the default option for the TRUNC parameter, and all steps ran with cond code 0. Additional hint: your initial guess will probably be wrong. //BUILD EXEC PGM=IEBGENER //SYSUT1 DD * RECORD 1 PLUS SOME EXTRANEOUS CHARACTERS > 40 RECORD 2 PLUS SOME EXTRANEOUS CHARACTERS > 40 RECORD 3 PLUS SOME EXTRANEOUS CHARACTERS > 40 RECORD 10 PLUS SOME EXTRANEOUS CHARACTERS > 40 RECORD 11 PLUS SOME EXTRANEOUS CHARACTERS > 40 RECORD 12 PLUS SOME EXTRANEOUS CHARACTERS > 40 //SYSUT2 DD DISP=(,PASS),SPACE=(TRK,1), // DSN=&&ORIG, // RECFM=FB,LRECL=80,BLKSIZE=8000 //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //*---------------------------------------------- //* COPY THE FIRST 40 BYTES OF EACH INPUT RECORD //*---------------------------------------------- //SORT1 EXEC PGM=SORT //SORTIN DD DISP=(OLD,PASS),DSN=&&ORIG //SORTOUT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1), // DCB=(RECFM=FB,LRECL=24,BLKSIZE=2400), // DSN=&&TEMP1 //SORTMSG DD DUMMY //SYSIN DD * SORT FIELDS=(1,8,CH,A) OUTREC FIELDS=(1,40) //*----------------------------------------------- //* EXPAND THE RECORDS FROM THE COPY //*----------------------------------------------- //SORT2 EXEC PGM=SORT //SORTIN DD DISP=(OLD,PASS),DSN=&&TEMP1 //SORTOUT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1), // DCB=*.SORT1.SORTIN,DSN=&&TEMP2 //SORTMSG DD DUMMY //SYSIN DD * SORT FIELDS=(3,7,CH,A) //* ---------------------------------------------------------------------- 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 ---------------------------------------------------------------------- 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

