- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Exact Position of DISUSER Field In SYSUAF
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-06-2007 08:56 PM
тАО11-06-2007 08:56 PM
I know accessing SYSUAF in this way is unsupported, but it's the only way I can get the information I need for a relatively minor program I'm writing.
Thanks, Rob.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 09:35 PM
тАО11-06-2007 09:35 PM
Re: Exact Position of DISUSER Field In SYSUAF
the UAF070$L_FLAGS longword (byte offset 468.) contains the various flags bits.
The UAF070$V_DISACNT flag is bit 4 in this longword or as a mask definition: UAI$M_DISACNT = %X'10'
The above is from the BLISS module SYS$LIBRARY:STARLET.REQ
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 09:45 PM
тАО11-06-2007 09:45 PM
Re: Exact Position of DISUSER Field In SYSUAF
see here for some FORTRAN example code:
http://mvb.saic.com/freeware/freewarev40/pwd_update/src/pwd_update.for
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 09:55 PM
тАО11-06-2007 09:55 PM
Re: Exact Position of DISUSER Field In SYSUAF
Ideally, I'd like to do the eqivilent of f$extract with my programming language to get the disacnt field, and then translate it from an unsigned into something more legible.
What is the length in bytes of an unsigned?
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 10:28 PM
тАО11-06-2007 10:28 PM
Re: Exact Position of DISUSER Field In SYSUAF
>>>
Ideally, I'd like to do the eqivilent of f$extract with my programming language to get the disacnt field, and then translate it from an unsigned into something more legible.
<<<
A general solution in DCL to do that:
use f$extract to extract exactly ONE longword, and
.AND.
that to the wished bit mask.
eg
$ disacnt = ( f$extract(468,8,UAF070$L_FLAGS) .AND. %X10 )
Corresponding simailar syntax in other languages.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 10:47 PM
тАО11-06-2007 10:47 PM
Solutionhere is a simple DCL example:
$ open/read/share x sysuaf.dat ! copy of SYSUAF
$ read x line ! just read 1st record
$ close x
$ flags=f$extract(468,1,line) ! extract 1st byte of FLAGS
$ x=f$cvsi(4,1,flags) ! convert bit 4
$ sho sym x
X = -1 Hex = FFFFFFFF Octal = 37777777777
If the first user record found in SYSUAF is not disusered, X will return as 0.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 11:18 PM
тАО11-06-2007 11:18 PM
Re: Exact Position of DISUSER Field In SYSUAF
Armed with the example you gave, I can now write the equivilent of f$cvui in my application (Vista 4GL) and be able to translate the flag to 1 or 0.
Everyones help is much appreciated.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2007 12:39 AM
тАО11-07-2007 12:39 AM
Re: Exact Position of DISUSER Field In SYSUAF
Hi Roberts,
Thanks for mentioning the target language!
For the benfit of future readers, allow me to point out that the right place to get account information is to call SYS$GETUAI. I still have hope that someday there will be an F$GETUAI, but it did not happen with 8.3.
So this 'vista' does not have an interface to SYS$GETUAI and that would be too hard to make? And it does have an (indexed) file interface huh?!
Also for the benefit of future readers using DCL. One really should not (need not) grab the flags longword and then find the right bit. Just ask for the bit directly:
$ libr/extr=$uaf070def/out=uafdef.mar sys$library:starlet.mlb
$ sea uafdef.mar flags,disacnt
$EQU UAF070$L_FLAGS 468
$EQU UAF070$V_DISACNT 4
$ open/read/share=write sysuaf
$ read/key="DEFAULT" sysuaf record
$ read/key="HEIN" sysuaf record
$ write sys$output f$cvui(468*8+4,1,record)
1
$ write sys$output f$cvsi(468*8+4,1,record)
-1
$ read/key="HEIN" x record
$ write sys$output f$cvsi(468*8+4,1,record)
0
Jan>> use f$extract to extract exactly ONE longword, and .AND. that to the wished bit mask.
eg
$ disacnt = ( f$extract(468,8,UAF070$L_FLAGS) .AND. %X10 )
Actually.. a longword is, as you know, 4 bytes. No harm here, but asking for 8 byte could make you falll of the edge in some cases. But you knew that. Just a typo surely.
Volker>$ flags=f$extract(468,1,line) ! extract 1st byte of FLAGS
$ x=f$cvsi(4,1,flags) ! convert bit 4
Actually.. flags is, as you know, 4 bytes. No harm here, but asking for 1 byte is potentially confusing and assumes you just 'know' the intresting flag is in the low byte, and that you know the byte ordering. But you knew that. Just a typo surely, or maybe a 'clever' optimization, but it makes for a bad example.
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2007 12:45 AM
тАО11-07-2007 12:45 AM
Re: Exact Position of DISUSER Field In SYSUAF
It does not allow the programmer to get to system service calls, or even the operating system, for that matter, so I need to read the file directly and convert the data into something usable.
The hardest problem was knowing exactly where the data is, and how to access it in the right way (converting the byte into a bit mask).
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2007 09:46 PM
тАО11-07-2007 09:46 PM
Re: Exact Position of DISUSER Field In SYSUAF
>>>
Jan>> use f$extract to extract exactly ONE longword, and .AND. that to the wished bit mask.
eg
$ disacnt = ( f$extract(468,8,UAF070$L_FLAGS) .AND. %X10 )
Actually.. a longword is, as you know, 4 bytes. No harm here, but asking for 8 byte could make you falll of the edge in some cases. But you knew that. Just a typo surely.
<<<
AAAAHGGG!!!!
Did I really check what I wrote???
Good you pointed it out, it might well have worked as a rather bad example.
Makes one feel humble again :-(
Proost.
Have one on me.
jpe