Re: Getting device/directory info for an arbitrary user (F$GETUAI?)



On 4/13/06, Dave Froble <davef@xxxxxxxxxxxxx> wrote:
Alan Winston - SSRL Central Computing wrote:
So my actual problem is that I'm reworking my delete-a-user-and-backup-all-his
-files routine. The version I -was- using trawled through my big user disk
and did a backup/delete of every file owned by that user, which caught
whatever he owned whether it was in his directories or not, but makes
_enormous_ save sets because it saves the whole directory structure of the
disk. I need to keep those savesets around for a year, so when they run
250mb for 10 mb of actual files, it makes a difference. And now I have _two_
big user disks, so if I do the trawl for each disk, I'll end up with _two_
gigantic savesets, one of the guaranteed useless.

Usage patterns have changed, in any case, since I wrote this routine
originally, and I think now it would be fine to just backup/delete the
user's directory tree.

What's the recommended way for DCL to get information for a particular user out
of the SYSUAF? I want his /dev and /dir.

(It seems a little excessive to do a keyed read of SYSUAF and then F$EXTRACT
the relevant bytes out of the record. I've got a Datatrieve record definition
for SYSUAF and I could call Datatrieve and have it FN$SET_LOGICAL for me,
but again, this seems inelegant. Also inelegant would be

$ AUTHORIZE LIST 'USER /FULL

and parsing the result.)

I'd like something that returns a distinct status if the user isn't in the UAF,
while I'm asking.

So is there a generally accepted way of doing this?

(7.3-2, usually, but could do it on 8.2).

Thanks,

-- Alan

It seems to me that reading the SYSUAF record to get the data is
elegant, accurate, and proper. That's what you would do with any other
data file. For your purposes, it's just data.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. Fax: 724-529-0596
DFE Ultralights, Inc. E-Mail: davef@xxxxxxxxxxxxx
170 Grimplin Road
Vanderbilt, PA 15486

GETUAI sufficeth for most folks, except, perhaps for those who are
bound and determined to roll their own/reinvent the wheel, whatever.

That's all good and well if it's really your heart's desire, just as
long as you remember to open it /SHARED.

I was a witness to a situation where a programmer (who should have
known better) opened SYSUAF.DAT and forgot that particular flag on a
system with several thousand users and hundreds of batch jobs running.

It wasn't pretty, to say the least, and the Tier 1 helpdesk phone
lines lit up like a Christmas tree...

WWWebb

--
NOTE: This email address is only used for noncommerical VMS-related
correspondence.
All unsolicited commercial email will be deemed to be a request for
services pursuant to the terms and conditions located at
http://bellsouthpwp.net/w/e/webbww/
.



Relevant Pages

  • Re: Getting device/directory info for an arbitrary user (F$GETUAI?)
    ... The version I -was- using trawled through my big user disk ... and did a backup/delete of every file owned by that user, which caught whatever he owned whether it was in his directories or not, but makes _enormous_ save sets because it saves the whole directory structure of the ... Usage patterns have changed, in any case, since I wrote this routine ... (It seems a little excessive to do a keyed read of SYSUAF and then F$EXTRACT ...
    (comp.os.vms)
  • Getting device/directory info for an arbitrary user (F$GETUAI?)
    ... The version I -was- using trawled through my big user disk ... and did a backup/delete of every file owned by that user, ... Usage patterns have changed, in any case, since I wrote this routine ... (It seems a little excessive to do a keyed read of SYSUAF and then F$EXTRACT ...
    (comp.os.vms)
  • Re: Getting device/directory info for an arbitrary user (F$GETUAI?)
    ... The version I -was- using trawled through my big user disk ... and did a backup/delete of every file owned by that user, ... Usage patterns have changed, in any case, since I wrote this routine ... Alpha2:sh sym device_name ...
    (comp.os.vms)