Cameron,
Here is a simple version of DFSORT which will produce the results you are
looking for
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=Your.LISTDSD.output
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
*** Get listdsd dataset name using parse ***
INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(STARTAFT=C'LISTDSD DATASET(''',
ENDBEFR=C''')',
FIXLEN=44)),
OVERLAY=(081:%01)), # DSN NAME
*** Get owner name using parse ***
IFTHEN=(WHEN=INIT,
PARSE=(%02=(STARTAFT=C' 00 ',
ENDBEFR=C' ',
FIXLEN=08)),
OVERLAY=(130:%02)), # OWNER
*** If dataset name > ' ' push it for all records ***
IFTHEN=(WHEN=GROUP,
BEGIN=(081,1,CH,GT,C' '),
PUSH=(081:081,44)),
*** If owner name > ' ' push it for all records ***
IFTHEN=(WHEN=GROUP,
BEGIN=(130,1,CH,GT,C' '),
PUSH=(130:130,08)),
*** Group the ids and access ***
IFTHEN=(WHEN=GROUP,
BEGIN=(001,16,CH,EQ,C' ID ACCESS'),
END=(001,16,CH,EQ,C' '),
PUSH=(140:SEQ=3))
OUTFIL REMOVECC,
** Pick if the group for id access sequence > 2 as
** the first 2 lines are headers AND
** ID in position 1 should be greater than ' ' ***
INCLUDE=(140,3,ZD,GT,2,AND,
001,8,CH,GT,C' '),
BUILD=(C'RACF ',
081,44,X, $ dataset name
130,08,X, $ Owner
001,08,X, $ ID
011,08,JFY=(SHIFT=LEFT), $ Access type
80:X),
HEADER1=(06:'LIST DATASET NAME',
51:'OWNER',
60:' ID ',
69:'ACCESS',/,
06:44'-',51:08'-',60:08'-',69:08'-')
/*
This will Produce a report like this
LIST DATASET NAME OWNER ID ACCESS
-------------------------------------------- -------- --------
--------
RACF HLQ.SLQ.TLQ.NAME OWNER1 USERID01 ALTER
RACF HLQ.SLQ.TLQ.NAME OWNER1 USERID02 UPDATE
...
Further if you have any questions please let me know
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