- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Command file to put UAF field values into a te...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 05:11 AM
тАО11-30-2007 05:11 AM
Command file to put UAF field values into a text file
What I need is a command file (batch or not), that will create a comma-delimited flat text file with the following field values from SYSUAF.DAT:
'owner','account','lastlogindate_interactive', 'lastlogindate_noninteractive'
Any help is appreciated. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 06:50 AM
тАО11-30-2007 06:50 AM
Re: Command file to put UAF field values into a text file
I made a program a decade ago to do the CSV thing and published with the openVMS freeware as:
http://h71000.www7.hp.com/freeware/freeware60/rms_tools/bonus/getuai.c
I just tried it, but it did not compile clean on Alpha and mangled the 'account' field.
Should be fixed now. Try the attachment!
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 10:16 AM
тАО11-30-2007 10:16 AM
Re: Command file to put UAF field values into a text file
ftp://ftp.process.com/vms-freeware/fileserv/getuai.zip
?
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 07:09 PM
тАО11-30-2007 07:09 PM
Re: Command file to put UAF field values into a text file
>> Is that different to....
Yes. Mine generates the CSV as requested, the other one does not (it focusses on define DCL symbold)
No, it's the same core: A driver table + getuai call.
Yes, Mine uses a (trivial) RMS (wildcard) lookup on the username, as requested. The above reference just does not, it operateds on one selected user at a time,
Yes, mine is 50 lines, the above 5000.
Mostly kidding...
Hein,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2007 06:31 PM
тАО12-01-2007 06:31 PM
Re: Command file to put UAF field values into a text file
What you could do is go into AUTHORIZE and list/full the files. Then you could do a SEARCH command for the particular fields you're after and /out this to another text file. Sure this is not a comma delimieted format, but it will provide you with the same info.
If you want comma delimited, you could write a DCL program to read the SYSUAF.DAT file generated from
sysuaf> list/full
This creates a sysuaf.dat, and then you could use the DCL READ command and then use LEXICAL functions to parse each line and delimit each filed with commas, to another file you opened in DCL. But to me, that's a lot of work when all you need to do is use the SEARCH utility a few times, and save the output of the latter to a text file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2007 03:59 AM
тАО12-02-2007 03:59 AM
Re: Command file to put UAF field values into a text file
$ on warning then $goto ERROR
$ on control_y then $goto ABORT
$ uaf_file = f$parse("SYSUAF","SYS$SYSTEM:.DAT")
$ close/nolog uaf_chan
$ open/read/share=write uaf_chan 'uaf_file'
$ none = "17-NOV-1858 00:00:00.00"
$ write sys$output "user,owner,account" -
,",lastlogindate_interactive,lastlogindate_noninteractive"
$LOOP: read/nolock/end=END uaf_chan uaf_rec
$ user = f$edit(f$extract(4,32,uaf_rec),"TRIM")
$ owner = f$extract(84+1,f$cvsi(84*8,8,uaf_rec),uaf_rec)
$ account = f$edit(f$extract(52,32,uaf_rec),"TRIM")
$ q_lli = f$extract(396,8,uaf_rec)
$ q_lln = f$extract(404,8,uaf_rec)
$ lli = f$fao("!%D",f$cvui(32,32,f$fao("!AD",8,q_lli)))
$ lln = f$fao("!%D",f$cvui(32,32,f$fao("!AD",8,q_lln)))
$ if lli .eqs. none then $lli = "(none)"
$ if lln .eqs. none then $lln = "(none)"
$ write sys$output f$fao("!AS,""!AS"",!AS,!AS,!AS" -
,user,owner,account,lli,lln)
$ goto LOOP
$ABORT: exit_status = %x2c
$END: close/nolog uaf_chan
$ exit 'exit_status'
$ERROR: exit_status = $status
$ set noon
$ goto END