LEICHTER-JERRY@YALE.ARPA (04/21/87)
Many weeks back I posted a query about how people used the SYS$SYLOGIN
logical name and the LGICMD qualifier in AUTHORIZE in conjunction with
users' LOGIN.COM files. I received quite a few interesting replies....
First, though, this exercise revealed two erroneous (or at least misleading)
points in the VMS documentation (System Manager's Reference Manual v4.4,
page 5-7):
1) Under the heading "User-specified command file", it says "If
individual [i.e. LGICMD] or system [i.e. SYS$SYLOGIN] login command
procedures are not implemented, the system looks for a command file
called LOGIN in the user's login directory....The file name must
be LOGIN."
Aside from the fact that everyone I know calls such a file LOGIN.COM
instead of LOGIN.,
The documentation is correct - "file name" has a specific meaning in VMS: In
the (partial) file SPECIFICATION "LOGIN.COM", the file NAME is "LOGIN"; ".COM"
is the file TYPE. (Compare this to the "item" argument to F$PARSE().) The
specification of the user's login file is produced by a parse analogous to:
F$PARSE(<lgicmd>,"SYS$LOGIN:LOGIN.<type>;")
<type> is USUALLY "COM", but actually depends on the process's default CLI:
DCL uses "COM", VAX RSX "CMD", and DEC Shell the null type.
BTW, I'm not certain but I suspect similar parsing is done for SYS$SYLOGIN -
something like:
F$PARSE("SYS$SYLOGIN",".<type>;")
On systems where users may have default CLI's other than DCL, trying to
execute a DCL SYS$SYLOGIN file would not work very well. This way, if you
define SYS$SYLOGIN to be "SYS$SYSTEM:SYLOGIN" and provide, say, BOTH an
"SYLOGIN.COM" and an "SYLOGIN.CMD", both DCL and RSX users would be able
to execute a correct system-wide login file.
the condition is incorrectly stated. A user's
LOGIN.COM is executed even if SYS$SYLOGIN is defined (in which case
the file defined by SYS$SYLOGIN is executed first, and the user's
LOGIN.COM second). On the other hand, defining the LGICMD qualifier
within AUTHORIZE does indeed turn off automatic execution of the user's
LOGIN.COM.
I suspect the language referring to "system login command procedures" is a
hold-over from pre-V4 systems, and was originally meant to refer not to
SYS$SYLOGIN, which didn't exist at the time, but to a system-wide login file
specified by the LGICMD parameter.
One result of this is that if you want to have the system-wide login
command file invoke the user's, you probably don't want to use the
SYS$SYLOGIN mechanism to invoke the system-wide file: the user's
LOGIN.COM will be executed twice if you do. Also note that if you
invoke the user's file explicity from SYLOGIN, it will be executed
*before* any file you specify with LGICMD.
If you really and truely want to execute the user's LOGIN.COM from within
SYS$SYLOGIN, simply set LGICMD to _NL:.
-- Jerry
-------