Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pls help: Defining logical (repost)

73 views
Skip to first unread message

Wong Siu To

unread,
Jun 28, 1992, 9:59:03 PM6/28/92
to
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.

Thanks in advance !

----------------------------------------------------------------------------
ST Wong BITNET: A86...@CUCSC.BITNET
Computer Services Centre Internet: a86...@hp9000.csc.cuhk.hk
The Chinese Univsersity of Hong Kong s...@csc.mgate1.cuhk.hk
Tel. No : (852) 609 8825
FAX No : (852) 603 5001
----------------------------------------------------------------------------
--
----------------------------------------------------------------------------
ST Wong BITNET: A86...@CUCSC.BITNET
Computer Services Centre Internet: a86...@hp9000.csc.cuhk.hk
The Chinese Univsersity of Hong Kong s...@csc.mgate1.cuhk.hk

Larry Olin Horn

unread,
Jun 29, 1992, 5:31:51 AM6/29/92
to

First, I don't recommend defining a logical like "HOME" as "/SYSTEM".

This should work for what you need:

$ define HOME 'f$trnlnm("SYS$LOGIN")'

More generally, this is a portion of my login setup (but not for system -
the games played with rooted directories and search lists would have to
be handled a lot better).

Using the "/JOB" may require you to increase the byte quota for your job
logical name table depending on what else you've defined (or you could
just leave off the "/JOB"):

... other stuff ...
$ mydev = f$parse( "SYS$LOGIN", , , "DEVICE", "NO_CONCEAL" )
$ mydir = f$parse( "SYS$LOGIN", , , "DIRECTORY", "NO_CONCEAL" )
$ myhome = mydev + mydir
$ myroot = myhome - "]" + ".]"
$!
$ dfn = "define/job/nolog"
$!
$ dfn/trans=(conceal,term) MYROOT 'myroot'
$!
$ dfn HOME 'myhome'
$ dfn SYS$SCRATCH MYROOT:[TMP]
... etc. ...

Larry Horn / Millsaps College / Jackson, MS
hor...@uw1301.millsaps.edu

DE...@u.washington.edu

unread,
Jun 29, 1992, 1:22:00 PM6/29/92
to
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...@MAX.BITNET
DE...@MAX.U.WASHINGTON.EDU

alanfe...@gmail.com

unread,
Dec 8, 2021, 12:21:10 PM12/8/21
to
This has finally been fixed! Probably OpenVMS v7.0 or later. Not sure.

AEF
0 new messages