home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!mcsun!sunic!kth.se!admin.kth.se!nobeltech!kega
- From: kega@nobeltech.se (Kent Gabrin)
- Subject: Re: Problem Deleting Users from Different Disks
- Message-ID: <1992Nov13.133527.25119@nobeltech.se>
- Sender: KEGA@nobeltech.se
- Organization: NobelTech AB
- References: <01GQZRJYX7YA8WYHCU@LAGUNA.EPCC.EDU>
- Date: Fri, 13 Nov 1992 13:35:27 GMT
- Lines: 29
-
- In article <01GQZRJYX7YA8WYHCU@LAGUNA.EPCC.EDU> ARTG@LAGUNA.EPCC.EDU writes:
- ...Deleted lines...
- >I have a problem and I can't seem to find the answer. We have
- >users on several disks and I am writing a procedure to delete
- >them when their accounts are no longer needed on our system.
- >However, I can't seem to find a way to determine if the user
- >is on DISK2, DISK3, or DISK4. Is that any way of using one DCL
- >procedure to determine which disk the user is on? I'd also like to have
- ...Deleted lines...
-
- Yes it is possible. First define a logical name containing a search
- list of all disks. Then use F$SEARCH to obtain the disk where the user
- has its directory. Note that the following is only an idea how to
- proceed and has no error handling at all.
-
- $ ! Assume that the local symbol USER_DIRECTORY has the value of the
- $ ! directory to search for. (E.g. user_directory="KEGA")
- $ !
- $ define/job all_disks DISK2,DISK3,DISK4
- $ found_dir=f$search("all_disks:<000000>''user_directory'.dir;1")
- $ if found_dir .eqs. "" then goto not_found
- $ found_disk=f$parse(found_dir,,,"device","syntax_only")
-
- Drawbacks: If there exists more than one directory with the same name
- but residing on different disks, only the first occurence will be
- --
- Kent Gabrin NobelTech Systems ! My thinking is not as great as
- S-175 88 Jaerfaella Sweden ! Oliver Berendinus Bumble /Will Try
- KEGA@nobeltech.se ! System Manager (Since 1982) VAXCluster (Since 1985)
-