Hello Kolusu,

I can't get it to work.

Our input file is a tape variable block.
The data we are selecting on is at byte 16, already adjusted for the 4 bytes.

My output file will be tapes, FB, 1872 bytes. All the data from the input tape.

I get:
ICE027A 9 END OF OUT1     FIELD BEYOND MAXIMUM RECORD LENGTH
ICE751I 0 C5-I90068 C6-I90068 C7-I90068 C8-I90068 E9-I74062 E7-I90068
ICE052I 3 END OF DFSORT

Even when I’m just fiddling with it, using your example, I get the above error 
when I start the field at 5. It works when it starts at 4.

Annoyingly, the above error goes away when I remove the code to get the totals.

What am I missing?

Here's my JCL:
  OPTION COPY
  INCLUDE COND=(16,02,CH,EQ,C'&YR01',OR,
                16,02,CH,EQ,C'&YR02',OR,
                16,02,CH,EQ,C'&YR03')
  INREC BUILD=(05,1872,
               16,2,CHANGE=(3,C'&YR01',C'100',
                              C'&YR02',C'010',
                              C'&YR03',C'001'),
                   NOMATCH=(C'000'))
  OUTFIL FNAMES=SORTOFT1,VTOF,
          OUTREC=(5,1872),
          INCLUDE=(16,2,CH,EQ,C'&YR01')
  OUTFIL FNAMES=SORTOFT2,VTOF,
          OUTREC=(5,1872),
          INCLUDE=(16,2,CH,EQ,C'&YR02')
  OUTFIL FNAMES=SORTOFT3,VTOF,
          OUTREC=(5,1872),
          INCLUDE=(16,2,CH,EQ,C'&YR03')
  OUTFIL FNAMES=REPORT,
 REMOVECC,NODETAIL,BUILD=(80X),
 TRAILER1=('NUM OF RECORDS FOR TYPE &YR01. : ',
            TOT=(1873,1,ZD,M10,LENGTH=8),/,
           'NUM OF RECORDS FOR TYPE &YR02. : ',
            TOT=(1874,1,ZD,M10,LENGTH=8),/,
           'NUM OF RECORDS FOR TYPE &YR03. : ',
            TOT=(1875,1,ZD,M10,LENGTH=8))
/*




       Regards,
                Eric Verwijs

Programmeur-analyste, RPC, SV et solutions de paiement - Direction générale de 
l'innovation, information et technologie
Emploi et Développement social Canada / Gouvernement du Canada
[email protected]
Téléphone 613-415-5465

Programmer Analyst, CPP, OAS, and Payment Solutions - Innovation, Information 
and Technology Branch
Employment and Social Development Canada / Government of Canada
[email protected]
Telephone 613-415-5465


-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Sri 
h Kolusu
Sent: November 17, 2022 5:59 PM
To: [email protected]
Subject: Re: ICETOOL / SORT capturing count of output records when using INCLUDE

Eric,

Here is another way to get the output counts into a single dataset.  I also 
used symbols , so that in future if you had to split for a different year, then 
you just need to change the SYMBOLS and the job will automatically take care of 
splitting.

//    EXPORT SYMLIST=*
//    SET YR01=00
//    SET YR02=99
//    SET YR03=98
/*
//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC        98
DEF        98
GHI        98
XXX        00
YYY        00
ZZZ        99
//OUT1     DD SYSOUT=*
//OUT2     DD SYSOUT=*
//OUT3     DD SYSOUT=*
//REPORT   DD SYSOUT=*
//SYSIN    DD *,SYMBOLS=JCLONLY
  OPTION COPY
  INCLUDE COND=(12,02,CH,EQ,C'&YR01',OR,
                12,02,CH,EQ,C'&YR02',OR,
                12,02,CH,EQ,C'&YR03')

  INREC BUILD=(01,20,
               12,2,CHANGE=(3,C'&YR01',C'100',
                              C'&YR02',C'010',
                              C'&YR03',C'001'),
                   NOMATCH=(C'000'))

  OUTFIL FNAMES=OUT1,INCLUDE=(12,02,CH,EQ,C'&YR01'),BUILD=(01,20)
  OUTFIL FNAMES=OUT2,INCLUDE=(12,02,CH,EQ,C'&YR02'),BUILD=(01,20)
  OUTFIL FNAMES=OUT3,INCLUDE=(12,02,CH,EQ,C'&YR03'),BUILD=(01,20)

  OUTFIL FNAMES=REPORT,
  REMOVECC,NODETAIL,BUILD=(80X),
  TRAILER1=('NUM OF RECORDS FOR TYPE &YR01. : ',
             TOT=(21,1,ZD,M10,LENGTH=8),/,
            'NUM OF RECORDS FOR TYPE &YR02. : ',
             TOT=(22,1,ZD,M10,LENGTH=8),/,
            'NUM OF RECORDS FOR TYPE &YR03. : ',
             TOT=(23,1,ZD,M10,LENGTH=8))
/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected]<mailto:[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

Reply via email to