Thank you!

.......Cameron





From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Sri 
h Kolusu
Sent: Wednesday, January 19, 2022 8:20 PM
To: [email protected]
Subject: [External] Re: Having some challenges with a SORT Utility

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<https://isolate.menlosecurity.com/1/3735928037/http:/HLQ.SLQ.TLQ.NAME>
 OWNER1 USERID01 ALTER
RACF 
HLQ.SLQ.TLQ.NAME<https://isolate.menlosecurity.com/1/3735928037/http:/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]<mailto:[email protected]> with 
the message: INFO IBM-MAIN
________________________________
American Express made the following annotations
________________________________
This e-mail was sent to you by a representative of Amex Bank of Canada, P.O. 
Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca. If you no 
longer wish to receive these e-mails, please notify the sender by reply e-mail.

This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.

American Express a fait les remarques suivantes
Ce courriel vous a ?t? envoy? par un repr?sentant de la Banque Amex du Canada, 
C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, www.americanexpress.ca. Si, 
par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser 
les exp?diteurs par courriel.

Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des 
renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le destinataire 
pr?vu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez re?u ce courriel par erreur, veuillez en aviser 
l'exp?diteur par courriel et d?truire imm?diatement le courriel et toute pi?ce 
jointe. Merci.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to