Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Sun Sep 23, 2007 12:12 am Post subject:
This is not exactly what you asked for since it is a list of user ids authorized to use TSO which is, of course, not all ids known to RACF. but this edit macro issues the RLIST TSOAUTH * AUTHUSER command and post-processes the output. It may be a good place to start (or at least to learn some edit macro tricks ). I'm not a RACF admin, so I just found this through trial and error and I'm only guessing that it is right. No guarantees!!! ...And I hope someone will correct me if this is way off base with the RLIST TSOAUTH * AUTHUSER command. It seems to be more useful than SEARCH CLASS(USER).
One cautionary note... If you have authority to issue these commands, you may have authority to change things too. RACF can be very confusing, so be careful with RACF commands!!
Code:
/* Rexx - find authorized TSO user list. Requires RLIST command. */
/* This is an edit macro. It deletes the contents of current session.*/
Address isredit
"MACRO"
"DEL ALL .ZL .ZF" /* Delete all lines */
Call outtrap "STEM.","*"
Address tso "RLIST TSOAUTH * AUTHUSER" /* Get user list, Etc */
Call outtrap "OFF"
Do a = stem.0 to 1 by - 1 /* Populate editor */
line = stem.a
"LINE_AFTER 0 = (LINE)"
End
"X ALL .ZL .ZF" /* Exclude everything */
"SEEK 'USER' 1 FIRST" /* Find 1st user list */
urc = rc
Do While urc = 0 /* Loop through all output */
"(SLINE) = LINENUM .ZCSR" /* Get line num of user keyword */
sline = sline + 2 /* Get lin no of 1st user */
"SEEK ' ' 1" /* Locate end of list */
"(ELINE) = LINENUM .ZCSR" /* Get line no of end of list */
Do lineno = sline to eline /* Exclude entire list */
"XSTATUS "lineno" = NX"
End
"SEEK USER 1" /* Find next user keyword */
urc = rc
End
"X ' ' ALL 1" /* Exclue all end if list lines */
"DEL ALL X" /* Delete everything but users */
"SORT" /* Sort in prep for duplicate delete */
/* Delete duplicates */
"(LAST) = LINENUM .ZL"
prev = " "
Do a = 1 to last
"(LINE) = LINE" a
If prev == substr(line,1,8) Then
"XSTATUS "a" = X"
prev = substr(line,1,8)
"LINE "a" = (PREV)"
End
"DEL ALL X"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum