>> Can COUNT can be used to determine the total number of records in the output >> files? I've not seen how and it seems only able to count the number of input >> records.
Eric, You can split the file into "n" number of files in a single pass of data and it is quite simple to generate the output counts also in the same job. Use the following Job which will give you the desired results. //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * ----+----1----+----2----+----3----+----4----+----5----+--- ABC 98 DEF 98 GHI 98 XXX 00 YYY 00 ZZZ 99 //F00 DD SYSOUT=* //F00RPT DD SYSOUT=* //F98 DD SYSOUT=* //F98RPT DD SYSOUT=* //F99 DD SYSOUT=* //F99RPT DD SYSOUT=* //SYSIN DD * OPTION COPY INCLUDE COND=(12,02,CH,EQ,C'00',OR, 12,02,CH,EQ,C'98',OR, 12,02,CH,EQ,C'99') INREC BUILD=(01,20) OUTFIL FNAMES=F00,INCLUDE=(12,02,CH,EQ,C'00') OUTFIL FNAMES=F00RPT,INCLUDE=(12,02,CH,EQ,C'00'), REMOVECC,NODETAIL,BUILD=(80X), TRAILER1=('NUM OF RECORDS FOR TYPE 00 : ', COUNT) OUTFIL FNAMES=F98,INCLUDE=(12,02,CH,EQ,C'98') OUTFIL FNAMES=F98RPT,INCLUDE=(12,02,CH,EQ,C'98'), REMOVECC,NODETAIL,BUILD=(80X), TRAILER1=('NUM OF RECORDS FOR TYPE 98 : ', COUNT) OUTFIL FNAMES=F99,INCLUDE=(12,02,CH,EQ,C'99') OUTFIL FNAMES=F99RPT,INCLUDE=(12,02,CH,EQ,C'99'), REMOVECC,NODETAIL,BUILD=(80X), TRAILER1=('NUM OF RECORDS FOR TYPE 99 : ', COUNT) /* Thanks, Kolusu DFSORT Development IBM Corporation -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Eric Verwijs Sent: Thursday, November 17, 2022 1:51 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] ICETOOL / SORT capturing count of output records when using INCLUDE Hello, We're splitting very large datasets that have 3 years of client data into 3 smaller datasets containing a year of data each. Can COUNT can be used to determine the total number of records in the output files? I've not seen how and it seems only able to count the number of input records. I know the job output reports the totals and I could spool that to a temporary file to capture it. However, can COUNT or some other parameter be used to get the total for for each of the output files? This is more or less the JCL that we use: //SPLITYR EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* - - - - - - - - - - - - - - //IN DD * - - - - - - - - - - - - - - /* - - - - - - - - - - - - - - //TOOLIN DD * COPY FROM(IN) TO(OUT1) USING(CTL1) COPY FROM(IN) TO(OUT2) USING(CTL2) COPY FROM(IN) TO(OUT3) USING(CTL3) /* //CTL1CNTL DD * OUTFIL FNAMES=OUT1, INCLUDE=(12,2,CH,EQ,C'98') OUTREC FIELDS=(1:1,20) /* //CTL2CNTL DD * OUTFIL FNAMES=OUT2, INCLUDE=(12,2,CH,EQ,C'99') OUTREC FIELDS=(1:1,20) /* //CTL3CNTL DD * OUTFIL FNAMES=OUT3, INCLUDE=(12,2,CH,EQ,C'00') OUTREC FIELDS=(1:1,20) /* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu<mailto:lists...@listserv.ua.edu> with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN