[Info-vax] Pls help: Defining logical (repost)

alanfe...@gmail.com alanfeldman48 at gmail.com
Wed Dec 8 12:21:09 EST 2021


On Monday, June 29, 1992 at 1:22:00 PM UTC-4, DE... at u.washington.edu wrote:
> ST Wong asked about logical names:
> >Hi all,
> > 
> >I'm a novice to vms and hope that this's not a FAQ :)
> > 
> >I've defined 2 logical names:
> > 
> >$ define/system public $disk5:[public]
> >$ define/system home sys$login
> > 
> >where $disk5: is a logical of a physical disk.
> > 
> >When I set default directory to public from wherever,
> > 
> >$ set def public
> > 
> >It works but when I want to go back to the login directory:
> > 
> >$ set def home
> >$ sh def
> >%$DISK5:[SYSMGR] does not exist......
> > 
> >where my login directory is sys$manager.
> > 
> >Is there any problem with the logical name definitions ? How can I
> >solve this kind of questions ? Pls advise.
> I *know* what the problem is, but I will first comment that this will
> "work" iff the user's login directory happens to be on the same disk
> as the "public" directory.
> To "FIX" the problem, change the statement
> $ define/system home sys$login
> to
> $ define/system home sys$login:
> The problem ST Wong is seeing is a long-standing bug/feature of the
> SET DEFAULT command. (I think I have reported it. I know another
> person here did way back in VMS V1. 
> Anyway, the details:
> "As we all know", the default directory information is stored in two
> pieces. The default device (stored as the equivalence name for the
> logical name SYS$DISK:) and the default directory string (stored in
> process P1 space named by PIO$GT_DDSTRING). Thus, changing the default
> directory potentially involves changing two pieces of information.
> The SET DEFAULT command looks at its given argument to determine
> which pieces of data need to be changed. The problem is that it is
> "stupid". If the given specification OR ITS FIRST TRANSLATION (if 
> a logical name) contains a colon, then SYS$DISK will be modified.
> If no colon is found, ONLY THE DIRECTORY PATH will be changed.
> So, let's look at the problem again.
> $ SET DEFAULT HOME ! No colons here...
> translation of HOME yeilds "SYS$LOGIN". no colons there either...
> well, there's gotta be SOMETHING to do. Lets figure out
> what directory path to store....
> no directory path in SYS$LOGIN. translate it again.
> "device:[directory]"
> Ah ha! A directory path. Extract it and change the default
> path to "[directory]"
> All done!
> So, there we have it. Isn't this brilliant? :) I run into this "gotcha"
> every now and then when I don't remember to place a trailing colon on a
> logical name, too. As far as I know, this behaviour isn't documented.
> Apparently the VMS developers never make this "error", so never see the
> problem. :)
> -Derek S. Haining
> University Computing Services
> University of Washington
> Seattle, Washington 98195 
> (206) 543-5579
> DE... at MAX.BITNET
> DE... at MAX.U.WASHINGTON.EDU

This has finally been fixed! Probably OpenVMS v7.0 or later. Not sure.

AEF



More information about the Info-vax mailing list