[Info-vax] SET DEFAULT iterative logical name translation

alanfe...@gmail.com alanfeldman48 at gmail.com
Fri Oct 22 06:45:14 EDT 2021


I found the post! Here's an example with some context. I can post or reference the entire post if it's okay to do so. (Yeah, I'm a bit paranoid.)

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.  :)




More information about the Info-vax mailing list