Supervising the Network

5-53
Customizing the User Environment
Login Script Commands and Variables
LOOP
IF “%2”=“WP” THEN
SET WP=”\U-CML\B-10\D”
MAP S16:=SYS:APPL\WP\SETUP
IF “%2”=“ACCNTS” THEN
MAP G:=SYS:ACCNTS
IF “%2”=“LOTUS” THEN
MAP S16:=SYS:APPL\LOTUS
SHIFT
IF “%2”<>“” THEN GOTO LOOP
(In the last line, “IF “%2” < >” is followed by closed quotation marks, which
means “If %2 isn’t blank”.)
With these commands in her login script, Mary can log in to the primary file
server (named FS1) using her username, MARY, as follows:
LOGIN FS1\MARY WP ACCNTS
The parameters in Mary’s LOGIN command are given the following values:
%0=FS1
%1=MARY
%2=WP
%3=ACCNTS
Mary’s login script looks for %2, which is WP, and sets the word-processing
environment. Then the login script shifts the variables one to the right so that
%2 now becomes ACCNTS. Upon executing the loop, the login script maps
a drive to the ACCNTS directory.
Mary could also change the order of her LOGIN command without affecting
the way her work environment is set up, as follows:
LOGIN MARY ACCNTS WP
The parameters in this LOGIN command are given the following values:
%0=FS1
%1=MARY