Hello Kolusu,
I think that this DFSORT statements should work:
SKIP,1
BRS-BYT,*,16,PD
LX-BYT,*,16,PD
//SYSIN DD *,SYMBOLS=EXECSYS
INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(BRS-HLQ:%01,
BRS-BYT:INP-FLSIZE,TO=PD,LENGTH=16,
LX-BYT:INP-FLSIZE,TO=PD,LENGTH=16)
SUM FIELDS=(BRS-BYT,LX-BYT)
SORT FIELDS=(BRS-HLQ,A)
OUTFIL FNAMES=HLQ#BRS,
INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,EQ,C'&MGMT'),
REMOVECC,
HEADER1=(01:' HLQ BRS TOTAL KB',/,
01:' --------- -------------------'),
BUILD=(X,
BRS-HLQ,
X,
BRS-BYT,MUL,+4,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
OUTFIL FNAMES=HLQ#LX,
INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
INP-MGMTCL,NE,C'&MGMT'),
REMOVECC,
HEADER1=(01:' HLQ NON BRS TOTAL KB',/,
01:' --------- -------------------'),
BUILD=(X,
BRS-HLQ,
X,
LX-BYT,MUL,+2,LENGTH=20,
EDIT=(I.III.III.III.III.IIT))
/*
However I do not understand why there is at least one HLQ that should be
present on both files is present only in one, the one referenced by the
first OUTFIL.
Best wishes
Jack
On Fri, 28 Apr 2023 at 16:20, Jack Zukt <[email protected]> wrote:
> Hello Kolusu,
>
> Thank you for your quick answer.
> As you have guessed, my problem is on the two first steps, which you have
> consolidated in one. The management class is only relevant for spiting the
> information into two files; what I need is to summarize the size by high
> level qualifier for the files with that specific management class, and for
> the files with any other management class. The tapes that have that
> management class have four copies (hence the MUL,+4) the tapes that have
> other management classes have only two copies (so, MUL,+2).
> The problem is that at least one high level qualifier should be present on
> both files but is only showing up in one. I wonder if that is the only one.
> You job is not summarizing by HLQ; instead is creating one record by each
> input record with HLQ and size.
> Best wishes
> Jack
>
> On Fri, 28 Apr 2023 at 15:44, Sri h Kolusu <[email protected]> wrote:
>
>> >> What is troubling me is that I have at least one HLQ that is present
>> on both files with the records separated by the management class, but that
>> HLQ is only present on the summarized by HLQ file that does not have that
>> specific management class. And the INCLUDE that I am using is the same for
>> both cases
>>
>> Jack,
>>
>> It is quite difficult to debug the issue without knowing which step is
>> causing the error. You have 3 different steps and all of them are using
>> the INCLUDE cond. But if I had to take an educated guess it is because the
>> first 2 steps are summarizing, and you will not have the MGMT class when
>> doing that as you are ONLY sorting on the HLQ. Technically you don't need
>> SORT002 step as you can do it in SORT001 step itself.
>>
>> So, try this JCL (combined 001 and 002 steps into a single one)
>>
>> //SORT001 EXEC PGM=SORT
>> //SYSOUT DD SYSOUT=*
>> //SYMNOUT DD SYSOUT=*
>> //SORTIN DD DISP=SHR,DSN=&IHLQ..RMM.TAPE.MASTER.LIST
>> //HLQ#BRS DD DSN=&OHLQ..RMM.TAPE.SPACE.BRS.BY.HLQ.TXT,
>> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
>> // RECFM=FB,LRECL=30
>> //HLQ#LX DD DSN=&OHLQ..RMM.TAPE.SPACE.LX.BY.HLQ.TXT,
>> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
>> // RECFM=FB,LRECL=30
>> //SYMNAMES DD *
>> INP-DSNAME,02,44,CH
>> INP-CRDATE,47,10,CH
>> INP-LRDATE,58,10,CH
>> INP-XPDATE,69,10,CH
>> INP-FLSIZE,80,10,UFF
>> INP-K#CHAR,90,01,CH
>> INP-MGMTCL,92,30,CH
>> SKIP,1
>> BRS-HLQ,*,08,CH
>> SKIP,1
>> BRS-BYT,*,16,PD
>> //SYSIN DD *,SYMBOLS=EXECSYS
>> INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
>> OVERLAY=(BRS-HLQ:%01,
>> BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)
>>
>> SORT FIELDS=(BRS-HLQ,A,
>> INP-MGMTCL,A)
>>
>> OUTFIL FNAMES=HLQ#BRS,
>> INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
>> INP-MGMTCL,EQ,C'&MGMT'),
>> REMOVECC,
>> HEADER1=(01:' HLQ BRS TOTAL KB',/,
>> 01:' --------- -------------------'),
>> BUILD=(X,
>> BRS-HLQ,
>> X,
>> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
>>
>> OUTFIL FNAMES=HLQ#LX,
>> INCLUDE=(INP-K#CHAR,EQ,C'K',AND,
>> INP-MGMTCL,NE,C'&MGMT'),
>> REMOVECC,
>> HEADER1=(01:' HLQ NON BRS TOTAL KB',/,
>> 01:' --------- -------------------'),
>> BUILD=(X,
>> BRS-HLQ,
>> X,
>> BRS-BYT,EDIT=(I.III.III.III.III.IIT))
>> /*
>>
>>
>>
>> Thanks,
>> Kolusu
>> DFSORT Development
>> IBM Corporation
>>
>>
>>
>> ----------------------------------------------------------------------
>> 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