/* REXX LOGLOG Log each LOGON. On dataset #LOGON.RPT, write a line declaring that this user logged on at the current time on the current data. #LOGON.RPT is allocated DISP=MOD so that a history is maintained. Written by Frank Clarke rexxhead@yahoo.com 20240222 */ arg argline /* pro-forma quick-start */ address TSO arg parms "((" opts opts = Strip(opts,"T",")") parse var opts "TRACE" tv . parse value tv "N" with tv . rc = Trace("O"); rc = Trace(tv) text = "User" Userid() "logged on at" Time() "on" Date() outdsn = "#LOGON.RPT" alloc.0 = "NEW CATALOG UNIT(SYSDA) SPACE(1 2) TRACKS", "RECFM(V B) LRECL( 127 ) BLKSIZE(0)" alloc.1 = "SHR" /* if it already exists... */ tempstat = Sysdsn(outdsn) = "OK" /* 1=exists, 0=missing */ "ALLOC FI(@TMP) DA("outdsn") REU" alloc.tempstat "NEWSTACK" "EXECIO * DISKR @TMP (FINIS " push text "EXECIO" queued() "DISKW @TMP (FINIS " "DELSTACK" "FREE FI(@TMP) " exit /*@ LOGLOG */