REXX RACF ListUser readable       goto homepage

RACF Commando LU als full screen Output und mit „lesbaren“ Datumsangaben

 

/* rexx */
/* Copyright 2003 YCOS GmbH */
/* check parms */
parm=arg(1)
if parm="" then do
   say "Bitte Userid angeben!"
   exit
end
/* alloc output datasets */
msgset=msg('OFF')
"free fi(ou)"
"alloc fi(ou) new delete space(1 1) tracks unit(3390)",
   "lrecl(121) dsorg(PS) recfm(F b)"
/* lu the user */
msgset=msg(msgset)
x=outtrap("ycos.")
"lu" strip(parm)
x=outtrap("OFF")
/* create info line */
info.1="List User:" translate(strip(parm)) date("E") time()
info.2=copies("-",121)
"execio 2 diskw ou (stem info."
do j=1 to ycos.0
   select
   when pos("CREATED=",ycos.j)>0 then do
      new.1=umstell(ycos.j,"CREATED=")
   end
   when pos("PASSDATE=",ycos.j)>0 then do
      new.1=umstell(ycos.j,"PASSDATE=")
   end
   when pos("LAST-ACCESS=",ycos.j)>0 then do
      new.1=umstell(ycos.j,"LAST-ACCESS=")
   end
   otherwise
      new.1=""
   end
   out.1=ycos.j
   "execio 1 diskw ou (stem out."
   if new.1<>"" then do
      "execio 1 diskw ou (stem new."
   end
end
"execio 0 diskw ou (finis"
/* show the result */
address ispexec "lminit dataid(myou) ddname(ou)"
address ispexec "view dataid("myou")"
"free fi(ou)"
/* */
exit
umstell:
ar1=arg(1)
ar2=arg(2)
wo=pos(ar2,ar1)
if wo=0 then return ""
/* */
parse value ar1 with (ar2) year "." ddd .
if datatype(year)<>"NUM" then
   return ar1
ddd=left(ddd,3)
if year="00" & ddd="000" then
   return copies(" ",wo-1)""ar2"00.00.0000"
if year<60 then
   year="19"strip(year)
else
   year="20"strip(year)
if ddd="000" then
   return "00.00."year
datum=date("E",date("B",year"0101","S")+ddd-1,"B")
return copies(" ",wo-1)""ar2""datum

 

 

Resultat:

VIEW       SYS05193.T095925.RA000.YVES.R0100014            Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 List User: YVES 12/07/05 09:59:25                                      
000002 ------------------------------------------------------------------------
000003 USER=YVES  NAME=YVES                  OWNER=YVES      CREATED=04.146   
000004                                                       CREATED=25/05/04 
000005  DEFAULT-GROUP=SYS1      PASSDATE=04.350  PASS-INTERVAL=N/A             
000006                          PASSDATE=15/12/04                             
000007  ATTRIBUTES=SPECIAL OPERATIONS                                         
000008  ATTRIBUTES=AUDITOR                                                    
000009  REVOKE DATE=NONE   RESUME DATE=NONE                                   
000010  LAST-ACCESS=05.193/09:29:33                                           
000011  LAST-ACCESS=12/07/05                                                  
000012  CLASS AUTHORIZATIONS=NONE                                             
000013  NO-INSTALLATION-DATA                                                  
000014  NO-MODEL-NAME                                                         
000015  LOGON ALLOWED   (DAYS)          (TIME)                                
000016  ---------------------------------------------                         
000017  ANYDAY                          ANYTIME                               
000018   GROUP=SYS1      AUTH=USE      CONNECT-OWNER=YVES      CONNECT-DATE=04.
000019     CONNECTS= 2,378  UACC=NONE     LAST-CONNECT=05.193/09:29:33        
000020     CONNECT ATTRIBUTES=NONE                                            
000021     REVOKE DATE=NONE   RESUME DATE=NONE                                 
000022 SECURITY-LEVEL=NONE SPECIFIED                                          
000023 CATEGORY-AUTHORIZATION                                                 
000024  NONE SPECIFIED                                                        
000025 SECURITY-LABEL=NONE SPECIFIED                                          
****** **************************** Bottom of Data ****************************