[Info-vax] Reading SYSUAF with DCL problem

dgordonatvsi at gmail.com dgordonatvsi at gmail.com
Wed May 9 18:23:27 EDT 2018


On Wednesday, May 9, 2018 at 1:24:35 AM UTC-4, fredt... at gmail.com wrote:
> I am trying to extract some simple information from a SYSUAF.DAT, mainly username, owner, UIC, last logged-in etc.  I have borrowed and repurposed some existing code from the internet.
>

If you're having trouble with counted strings, just wait for the headache of quadword time fields in DCL.  I'll give you a hint - don't bother.  Hopefully fixed in a future CLI or other scripting language.

You're better off parsing the output from AUTHORIZE SHOW * 

I have done the following when I was looking for just selected info:

$	pipe auth SHOW 'username' | -
	  search/exact sys$input: "Pwdlifetime:" | -
	  ( read sys$input line ;  line = f$edit(f$extract(12,20,line),"TRIM") ; assign/job/nolog &line uaf_pwdlife )
$	pwdlife = f$trnlnm("uaf_pwdlife")
$	if pwdlife .nes. "(none)"
$	then
$	  pwdlife = f$element(0," ",pwdlife) + "-" + f$element(1," ",pwdlife)
$	  pwdlife = f$fao("!6UL", f$integer(f$cvtime(pwdlife,"DELTA","DAY")))
$	endif

(I don't remember when PIPE appeared.  VAX 7.3 is pretty old.)

As always, the format of any given display is subject to change (though in my case at the moment, I'm the most likely person to be changing it.)



More information about the Info-vax mailing list