Toni Cecil, It is quite easy to split the records into multiple files. You need to use OUTFIL processing. Since you are dealing with dataset names, I believe that your VOLSER name starts after 44 bytes as DSName can be a max of 44 bytes. So I assumed that the VOLSER starts at position 50.
//STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * ----+----1----+----2----+----3----+----4----+----5----+----6----+ DSN1 CART1 DSN2 CART1 DSN3 CART1 DSN4 CART1 DSN5 CART2 DSN6 CART2 DSN7 CART3 DSN8 CART3 DSN9 CART3 //CART1 DD SYSOUT=* //CART2 DD SYSOUT=* //CART3 DD SYSOUT=* //SYSIN DD * OPTION COPY INREC BUILD=(C'HSEND WAIT RECALL ',1,44,81:50,8) OUTFIL FNAMES=CART1,INCLUDE=(81,5,CH,EQ,C'CART1'),BUILD=(1,80) OUTFIL FNAMES=CART2,INCLUDE=(81,5,CH,EQ,C'CART2'),BUILD=(1,80) OUTFIL FNAMES=CART3,INCLUDE=(81,5,CH,EQ,C'CART3'),BUILD=(1,80) //* or alternatively you can use the following control cards too if you need to build the output differently for each output file. //SYSIN DD * OPTION COPY OUTFIL FNAMES=CART1,INCLUDE=(50,5,CH,EQ,C'CART1'), BUILD=(C'HSEND WAIT RECALL ',1,44,80:X) OUTFIL FNAMES=CART2,INCLUDE=(50,5,CH,EQ,C'CART2'), BUILD=(C'HSEND WAIT RECALL ',1,44,80:X) OUTFIL FNAMES=CART3,INCLUDE=(50,5,CH,EQ,C'CART3'), BUILD=(C'HSEND WAIT RECALL ',1,44,80:X) //* Further if you have any questions please let me know Thanks, Kolusu DFSORT Development From: Toni Cecil <[email protected]> To: [email protected], Date: 05/14/2014 02:25 AM Subject: DFSORT/ICETOOL/ICEMAN: Grouping records Sent by: IBM Mainframe Discussion List <[email protected]> Hello, can you pls give me an hint about how to use DFSORT to perform the following? input dsn: FB-80 with: dsn tape volser ------------------- 1 1234567890123456 dsn1 cart1 dsn2 cart1 dsn3 cart1 dsn4 cart1 dsn5 cart2 dsn6 cart2 dsn7 cart3 dsn8 cart3 dsn9 cart3 I want to an outfile grouped by tape volser like this: outfile for cart1 with: HSEND WAIT RECALL dsn1 HSEND WAIT RECALL dsn2 HSEND WAIT RECALL dsn3 HSEND WAIT RECALL dsn4 outfile for cart2 with: HSEND WAIT RECALL dsn5 HSEND WAIT RECALL dsn6 I've seached on "Smart DFSORT Tricks" manual and on "DFSORT Application Programming Guide" but so far I didn't find the way. Many thx, A.Cecilio ---------------------------------------------------------------------- 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
