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 <skol...@us.ibm.com> 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