Re: SORT INCLUDE problem

2023-09-20 Thread Jack Zukt
Hello Kolusu,

Thank you very much for your help.
I was not quite happy with the solution that I had come up with, as I was
reading the input file twice and that bothered me because that is not an
efficient solution.
You latest solution is much simpler and efficient. And much more elegant as
well.
Thank you once again for all your help
Best wishesJack

On Mon, 18 Sept 2023 at 16:50, Sri h Kolusu  wrote:

> >> Is there a way to get all the dataset profiles that have two different
> groups with the same access using SORT or ICETOOL but without using
> JOINKEYS, so that the input file would only needed to be read once, using
> SORTIN as the DDNAME?
>
> Jack,
>
> That is quite simple.  There is a lot of functionality that DFSORT can
> offer to get the desired results.
>
> So, if your intention is to find the COMMON datasets for ACC of GPRFCICS
> and GPRFSTG, here is a JCL that will give you the desired results.  You
> don't even have to filter out Type 0404 records separately as we can do it
> in a Single pass of data from the raw IRRDBU00 output.
>
> //STEP0100 EXEC PGM=SORT
> //SYSOUT   DD SYSOUT=*
> //SORTDIAG DD DUMMY
> //SORTIN   DD DISP=SHR,DSN=Your.raw.IRRDBU00.output
> //SORTOUT  DD SYSOUT=*
> //SYMNAMES DD *
> ** INPUT TYPE 0404 RECORD LAYOUT **
> TYP,05,04,CH
>T404,C'0404'
> DSN,10,44,CH
> GRP,62,08,SS
>STG,C'GPRFSTG'
>   CICS,C'GPRFCICS'
> ACC,71,08,CH
>   ALTER,C'ALTER'
>READ,C'READ'
> ** REFORMATTED RECORD LAYOUT **
> IN-RDW,01,04,BI
> IN-DSN,*,44,CH
> SKIP,1
> IN-GRP,*,08,CH
> SKIP,1
> IN-ACC,*,08,CH
> SKIP,1
> TP-ACC,*,08,CH
> /*
> //SYSIN DD *
>   OPTION VLSCMP
>   INCLUDE COND=(TYP,EQ,T404,AND,
> ACC,EQ,ALTER,AND,
>(GRP,EQ,STG,OR,
> GRP,EQ,CICS))
>
>INREC BUILD=(IN-RDW,
> DSN,C'|',
> ACC,C'|',
> GRP,C'|')
>
>   SORT FIELDS=(IN-DSN,A,
>IN-ACC,A)
>
>   OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(IN-DSN),
>  PUSH=(TP-ACC:IN-ACC))
>
>   OUTFIL VTOF,
>   BUILD=(IN-DSN),
>   INCLUDE=(IN-ACC,EQ,STG,AND,
>TP-ACC,EQ,CICS)
> /*
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to 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


Re: SORT INCLUDE problem

2023-09-18 Thread Sri h Kolusu
>> Is there a way to get all the dataset profiles that have two different 
>> groups with the same access using SORT or ICETOOL but without using 
>> JOINKEYS, so that the input file would only needed to be read once, using 
>> SORTIN as the DDNAME?

Jack,

That is quite simple.  There is a lot of functionality that DFSORT can offer to 
get the desired results.

So, if your intention is to find the COMMON datasets for ACC of GPRFCICS and 
GPRFSTG, here is a JCL that will give you the desired results.  You don't even 
have to filter out Type 0404 records separately as we can do it in a Single 
pass of data from the raw IRRDBU00 output.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTDIAG DD DUMMY
//SORTIN   DD DISP=SHR,DSN=Your.raw.IRRDBU00.output
//SORTOUT  DD SYSOUT=*
//SYMNAMES DD *
** INPUT TYPE 0404 RECORD LAYOUT **
TYP,05,04,CH
   T404,C'0404'
DSN,10,44,CH
GRP,62,08,SS
   STG,C'GPRFSTG'
  CICS,C'GPRFCICS'
ACC,71,08,CH
  ALTER,C'ALTER'
   READ,C'READ'
** REFORMATTED RECORD LAYOUT **
IN-RDW,01,04,BI
IN-DSN,*,44,CH
SKIP,1
IN-GRP,*,08,CH
SKIP,1
IN-ACC,*,08,CH
SKIP,1
TP-ACC,*,08,CH
/*
//SYSIN DD *
  OPTION VLSCMP
  INCLUDE COND=(TYP,EQ,T404,AND,
ACC,EQ,ALTER,AND,
   (GRP,EQ,STG,OR,
GRP,EQ,CICS))

   INREC BUILD=(IN-RDW,
DSN,C'|',
ACC,C'|',
GRP,C'|')

  SORT FIELDS=(IN-DSN,A,
   IN-ACC,A)

  OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(IN-DSN),
 PUSH=(TP-ACC:IN-ACC))

  OUTFIL VTOF,
  BUILD=(IN-DSN),
  INCLUDE=(IN-ACC,EQ,STG,AND,
   TP-ACC,EQ,CICS)
/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT INCLUDE problem

2023-09-18 Thread Jack Zukt
Hi Kolusu

I tried the JCL that you have sent.
It works, as expected, but maybe I was not quite clear in my last question.
Is there a way to get all the dataset profiles that have two different
groups with the same access using SORT or ICETOOL but without using
JOINKEYS, so that the input file would only needed to be read once, using
SORTIN as the DDNAME?
This is me being curious and trying to use a more efficient solution, if
that would be possible.I could not came up with any kind of SORT statements
to that effect.
Best regards
Jack


On Fri, 15 Sept 2023 at 18:33, Sri h Kolusu  wrote:

> >> Now, my question is, is there a way to do this with only one step and
> reading the input file only once?
>
>
> Jack,
>
> Here is 1 step JCL that would match the STG with CICS records the type
> 0404 records from the input file.  Note that we can additional
> functionality if you need after the match is done.
>
> //STEP0100 EXEC PGM=SORT
> //SYSOUT   DD SYSOUT=*
> //SORTDIAG DD DUMMY
> //SYMNAMES DD *
> ** INPUT TYPE 0404 RECORD LAYOUT **
> IN-RDW,01,04,BI
> DSN,10,44,CH
> GRP,62,08,CH
>STG,C'GPRFSTG'
>   CICS,C'GPRFCICS'
> ACC,71,08,CH
>   ALTER,C'ALTER'
>READ,C'READ'
>
> ** STG REFORMATTED RECORD LAYOUT **
> STG-RDW,01,04,BI
> STG-DSN,*,44,CH
> SKIP,1
> STG-GRP,*,08,CH
> SKIP,1
> STG-ACC,*,08,CH
> SKIP,1
>
> ** CICS REFORMATTED RECORD LAYOUT **
> CICS-RDW,01,04,BI
> CICS-DSN,*,44,CH
> SKIP,1
> CICS-GRP,*,08,CH
> SKIP,1
> CICS-ACC,*,08,CH
> SKIP,1
> /*
> //STG  DD DISP=SHR,DSN=
> //CICS DD DISP=SHR,DSN=
> //SORTOUT  DD SYSOUT=*
> //SYSIN DD *
>   JOINKEYS F1=STG,FIELDS=(STG-DSN,A,STG-ACC,A)
>   JOINKEYS F2=CICS,FIELDS=(CICS-DSN,A,CICS-ACC,A)
>   REFORMAT FIELDS=(F1:STG-DSN)
>   OPTION COPY
> /*
> //JNF1CNTL  DD *
>   OPTION VLSCMP
>   INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,STG)
>INREC BUILD=(IN-RDW,
> DSN,C'|',
> ACC,C'|',
> GRP,C'|')
> /*
> //JNF2CNTL  DD *
>   OPTION VLSCMP
>   INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,CICS)
>INREC BUILD=(IN-RDW,
> DSN,C'|',
> ACC,C'|',
> GRP,C'|')
> /*
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to 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


Re: SORT INCLUDE problem

2023-09-15 Thread Sri h Kolusu
>> Now, my question is, is there a way to do this with only one step and 
>> reading the input file only once?


Jack,

Here is 1 step JCL that would match the STG with CICS records the type 0404 
records from the input file.  Note that we can additional functionality if you 
need after the match is done.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTDIAG DD DUMMY
//SYMNAMES DD *
** INPUT TYPE 0404 RECORD LAYOUT **
IN-RDW,01,04,BI
DSN,10,44,CH
GRP,62,08,CH
   STG,C'GPRFSTG'
  CICS,C'GPRFCICS'
ACC,71,08,CH
  ALTER,C'ALTER'
   READ,C'READ'

** STG REFORMATTED RECORD LAYOUT **
STG-RDW,01,04,BI
STG-DSN,*,44,CH
SKIP,1
STG-GRP,*,08,CH
SKIP,1
STG-ACC,*,08,CH
SKIP,1

** CICS REFORMATTED RECORD LAYOUT **
CICS-RDW,01,04,BI
CICS-DSN,*,44,CH
SKIP,1
CICS-GRP,*,08,CH
SKIP,1
CICS-ACC,*,08,CH
SKIP,1
/*
//STG  DD DISP=SHR,DSN=
//CICS DD DISP=SHR,DSN=
//SORTOUT  DD SYSOUT=*
//SYSIN DD *
  JOINKEYS F1=STG,FIELDS=(STG-DSN,A,STG-ACC,A)
  JOINKEYS F2=CICS,FIELDS=(CICS-DSN,A,CICS-ACC,A)
  REFORMAT FIELDS=(F1:STG-DSN)
  OPTION COPY
/*
//JNF1CNTL  DD *
  OPTION VLSCMP
  INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,STG)
   INREC BUILD=(IN-RDW,
DSN,C'|',
ACC,C'|',
GRP,C'|')
/*
//JNF2CNTL  DD *
  OPTION VLSCMP
  INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,CICS)
   INREC BUILD=(IN-RDW,
DSN,C'|',
ACC,C'|',
GRP,C'|')
/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT INCLUDE problem

2023-09-15 Thread Jack Zukt
Hi Kolusu,

Thank you very much for your input.
The input file already is a subset of 0404 records, and the SUM FIELDS=NONE
was the culprit. Once again the trouble come from copying a previously used
JCL and not cleaning it properly.
Now, if you will not mind, I have another question regarding this JCL. As I
stated previously, I am trying to find out all the dataset profiles that
have group1 and group2 on its access list with ALTER authority.
I have come up with two different JCL two get the desired result.
The one I posted previously does a first sort to get the group1 and group2
records into two datasets, and then does a second step with the JOINKEYS
statement.

The second one has only one step, with JNF1CNTL and JNF2CNTL cards for
record selection:
//IN1   DD DISP=SHR,DSN=
//IN2   DD DISP=SHR,DSN=
//SYMNAMES DD  *
DSN,10,44,CH
GRP,62,08,CH
   STG,C'GPRFSTG'
  CICS,C'GPRFCICS'
ACC,71,08,CH
  ALTER,C'ALTER'
   READ,C'READ'
//SYSIN DD *
  JOINKEYS F1=IN1,FIELDS=(DSN,A,ACC,A)
  JOINKEYS F2=IN2,FIELDS=(DSN,A,ACC,A)
  REFORMAT FIELDS=(F1:DSN)
  OPTION COPY
  OUTFIL FNAMES=OUT,VTOF,BUILD=(1,44)
/*
//JNF1CNTL  DD *
  INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,STG)
/*
//JNF2CNTL  DD *
  INCLUDE COND=(ACC,EQ,ALTER,AND,GRP,EQ,CICS)
/*

This last one has only one step but it reads the same input file once for
each INx card.
The first one reads the input file only once, but it has two steps, and the
first step created files have to be read on the second step.
Now, my question is, is there a way to do this with only one step and
reading the input file only once?

Regards,
Jack


On Fri, 15 Sept 2023 at 15:30, Sri h Kolusu  wrote:

> >>> I am using for the INPUT a subset of a type 0404 records from a
> IRRDBU00 output file. In the first step I am crating two files with
>
> Jack,
>
> Not clear if you still need help , but the INCLUDE COND does not have the
> include for type 0404 records, unless you already filtered your input.
>
> Can you please run the following.
>
> //STEP0100 EXEC PGM=SORT
> //SYSOUT   DD SYSOUT=*
> //SYMNAMES DD  *
> TYP,05,04,CH
> DSN,10,44,CH
> GRP,62,08,CH
> ACC,71,08,CH
> //SORTIN   DD DISP=SHR,DSN=Your.RACF.IRRDBU00.file
> //SORTOUT  DD SYSOUT=*
> //SYSINDD *
>   OPTION VLSCMP
>   INCLUDE COND=(TYP,EQ,C'0404',AND,
> ACC,EQ,C'ALTER',AND,
>(GRP,EQ,C'GPRFCICS',OR,
> GRP,EQ,C'GPRFSTG'))
>
>   SORT FIELDS=(DSN,A,ACC,A)
>
>   OUTFIL REMOVECC,VTOF,BUILD=(80X),
>   SECTIONS=(DSN,ACC,
>   TRAILER3=(DSN,C'|',
> ACC,C'|',
> GRP,C'|',
> COUNT,C'|'))
> /*
>
> Now check the results and look at the count column to see any value is
> greater than 1. If it has a value greater than 1 , then your SUM
> FIELDS=NONE will eliminate such records.
>
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to 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


Re: SORT INCLUDE problem

2023-09-15 Thread Sri h Kolusu
>>> I am using for the INPUT a subset of a type 0404 records from a  IRRDBU00 
>>> output file. In the first step I am crating two files with

Jack,

Not clear if you still need help , but the INCLUDE COND does not have the 
include for type 0404 records, unless you already filtered your input.

Can you please run the following.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD  *
TYP,05,04,CH
DSN,10,44,CH
GRP,62,08,CH
ACC,71,08,CH
//SORTIN   DD DISP=SHR,DSN=Your.RACF.IRRDBU00.file
//SORTOUT  DD SYSOUT=*
//SYSINDD *
  OPTION VLSCMP
  INCLUDE COND=(TYP,EQ,C'0404',AND,
ACC,EQ,C'ALTER',AND,
   (GRP,EQ,C'GPRFCICS',OR,
GRP,EQ,C'GPRFSTG'))

  SORT FIELDS=(DSN,A,ACC,A)

  OUTFIL REMOVECC,VTOF,BUILD=(80X),
  SECTIONS=(DSN,ACC,
  TRAILER3=(DSN,C'|',
ACC,C'|',
GRP,C'|',
COUNT,C'|'))
/*

Now check the results and look at the count column to see any value is greater 
than 1. If it has a value greater than 1 , then your SUM FIELDS=NONE will 
eliminate such records.


Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT INCLUDE problem

2023-09-15 Thread Jack Zukt
Ok,
I found the problem (I think)
It was probably due to the "SUM FIELDS=NONE" statement
Best wishes
Jack

On Fri, 15 Sept 2023 at 10:42, Jack Zukt  wrote:

> Hi,
>
> I am trying to find a RACF dataset profile for which two different groups
> have ALTER access.
> I am using for the INPUT a subset of a type 0404 records from a IRRDBU00
> output file. In the first step I am crating two files with the dataset
> profiles in which the groups have ALTER authority:
>
> //SYMNAMES DD  *
> DSN,10,44,CH
> GRP,62,08,CH
> ACC,71,08,CH
> //SYSINDD  *
>   SORT FIELDS=(DSN,A,ACC,A)
>   SUM FIELDS=NONE
>   OPTION VLSHRT
>   INCLUDE COND=(ACC,EQ,C'ALTER   ',AND,
>(GRP,EQ,C'GPRFCICS',OR,
> GRP,EQ,C'GPRFSTG '))
>   OUTFIL FNAMES=OUT01,VTOF,
>   INCLUDE=(ACC,EQ,C'ALTER   ',AND,
> GRP,EQ,C'GPRFSTG '),
>   BUILD(DSN,
> ACC,
> GRP)
>   OUTFIL FNAMES=OUT02,VTOF,
>   INCLUDE=(ACC,EQ,C'ALTER   ',AND,
>GRP,EQ,C'GPRFCICS'),
>   BUILD(DSN,
> ACC,
> GRP)
> /*
>
> Now, for the OUT01 file, this SORT has 427 records. But, if I run the SORT
> with this statements:
>
> //SYMNAMES DD  *
> DSN,10,44,CH
> GRP,62,08,CH
> ACC,71,08,CH
> //SYSINDD  *
>   SORT FIELDS=(DSN,A,ACC,A)
>   SUM FIELDS=NONE
>   OPTION VLSHRT
>   INCLUDE COND=(ACC,EQ,C'ALTER   ',AND,
> GRP,EQ,C'GPRFSTG ')
>   OUTFIL FNAMES=OUT01,VTOF,
>   BUILD(DSN,
> ACC,
> GRP)
>
> the OUT01 file has 458 records.
>
> The OUT02 file has always 484 records on either type of sort.
> I only found out because the only dataset profile record for which both
> groups have access is not included on the first OUT01 file.
>
> Any ideas, please?
> I really cannot figure this one out.
> Thank you
> Best wishes
> Jack
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Sri h Kolusu
>> You job is not summarizing by HLQ; instead is creating one record by each 
>> input record with HLQ and size.

Jack,

Now that I know what you are trying to do, it is quite easy to add the summary 
by HLQ in the same step.  You have 2 different multiplications so we need to 
use IFTHEN statements

So, please change the SORT001 SYSIN to the following (Untested).

//SYSINDD *,SYMBOLS=JCLONLY
  INREC IFTHEN=(WHEN=INIT,
 PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
   OVERLAY=(BRS-HLQ:%01)),

IFTHEN=(WHEN=(INP-MGMTCL,EQ,C''),
 OVERLAY=(BRS-BYT:INP-FLSIZE,MUL,+4,PD,LENGTH=16)),

IFTHEN=(WHEN=NONE,
 OVERLAY=(BRS-BYT:INP-FLSIZE,MUL,+2,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''),
  REMOVECC,NODETAIL,
  HEADER1=(01:'HLQ   BRS TOTAL KB',/,
   01:' - ---'),
  SECTIONS=(BRS-HLQ,
  TRAILER3=(X,
BRS-HLQ,
X,
TOT=(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''),
  REMOVECC,NODETAIL,
  HEADER1=(01:'HLQ   NON BRS TOTAL KB',/,
   01:' - ---'),
  SECTIONS=(BRS-HLQ,
  TRAILER3=(X,
BRS-HLQ,
X,
TOT=(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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sort INCLUDE problem

2023-04-28 Thread Jack Zukt
Hello Kolusu,

I think that this DFSORT statements should work:

SKIP,1
BRS-BYT,*,16,PD
LX-BYT,*,16,PD
//SYSINDD *,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''),
   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''),
   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  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  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=
>> //HLQ#BRS  DD  DSN=,
>> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
>> // RECFM=FB,LRECL=30
>> //HLQ#LX   DD  DSN=,
>> // 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
>> //SYSINDD *,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''),
>>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''),
>>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 lists...@listserv.ua.edu 

Re: Sort INCLUDE problem

2023-04-28 Thread Jack Zukt
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  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=
> //HLQ#BRS  DD  DSN=,
> // DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
> // RECFM=FB,LRECL=30
> //HLQ#LX   DD  DSN=,
> // 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
> //SYSINDD *,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''),
>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''),
>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 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


Re: Sort INCLUDE problem

2023-04-28 Thread Sri h Kolusu
>> 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=
//HLQ#BRS  DD  DSN=,
// DISP=(NEW,CATLG),SPACE=(TRK,(1,1),RLSE),
// RECFM=FB,LRECL=30
//HLQ#LX   DD  DSN=,
// 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
//SYSINDD *,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''),
   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''),
   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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN