1829331 Members
2705 Online
109989 Solutions
New Discussion

Re: UAF code

 
SOLVED
Go to solution
Simon Fedele
Advisor

UAF code

I need to write a dcl procedure which will extract all usernames from the uaf which have not had a login for greater than a certain number of months. I was hoping someone may have already written something similiar. Any help would be appreciated
7 REPLIES 7
Robert_Boyd
Respected Contributor
Solution

Re: UAF code

you'll want to get a copy of SCANUAF or one of the other freeware utilities. This utility and some of the others make this a snap.

You can get your answer with one command once you get SCANUAF.

Here's a link

http://vms.process.com/scripts/fileserv/fileserv.com?SCANUAF

Also see this previous discussion:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=707687

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
John Gillings
Honored Contributor

Re: UAF code

Simon,
It would be possible to do this in DCL - just OPEN/READ/SHARE SYSUAF and read through it.

The catch is you need to figure out where the username and last login fields are, and that may change in the future. See $UAFDEF for current values.

A crucible of informative mistakes
Simon Fedele
Advisor

Re: UAF code

Robert,

thanks for that. scanuaf works perfectly for what I need to do.

John,

Thanks for your suggestions also
John Gillings
Honored Contributor

Re: UAF code

Simon,

Just to show it can be done...

The attached command procedure does what you ask, BUT, note there are some undocumented and unsupported DCL constructs (F$FAO hacks).

The record layout is derived at run time from $UAFDEF. For systems below V7.3-2, there may be UAF records longer than 1000 characters, these cannot be handled in DCL, so they're skipped. You will see a DCL-W-BUFOVF error for each one, and there will be a report at the end counting the number of lines which were skipped.

The procedure depends on the PIPE command, so it won't run on versions below V7.

Usual disclaimers... use at your own risk. This kind of thing should be done from a real programming language.
A crucible of informative mistakes
Hein van den Heuvel
Honored Contributor

Re: UAF code

Google for: +sysuaf +"last login" +site:itrc.hp.com

This quickly leads to:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=890732

Where this very question was asked and answerred.

Regards,
Hein.
Simon Fedele
Advisor

Re: UAF code

Thanks again to John & Hein - thats is excellent.

I think I have enough options now so I will close this thread
Simon Fedele
Advisor

Re: UAF code

Thread closed