Supervising the Network

5-34
Customizing the User Environment
Login Script Commands and Variables
END
The following command executes the CAPTURE utility on the fourth day of the
week (Wednesday):
IF NDAY_OF_WEEK=“4” THEN
#CAPTURE Q=FAST_Q NB TI=10 NFF
END
The following example shows nested IF…THEN statements. Notice that there
are two IF statements, so each one must have its own END statement.
IF DAY_OF_WEEK=“MONDAY” THEN
MAP *6:=VOL1:APPL\WP
IF MEMBER OF CLERKS THEN
WRITE “Your report is due immediately!”
END
END
Conditionals can be joined with commas, the word AND, or the word OR to form
compound conditionals.
The first line of the following IF…THEN statement is a compound conditional
that means “If it is the evening of the first day of the month”:
IF GREETING_TIME=“EVENING” AND DAY=“01” THEN
WRITE “The system will be backed up tonight.”
END
The following line is a compound conditional that means “If it is 11:59:59
p.m.”:
IF HOUR24=“23” AND MINUTE=“59” AND SECOND=“59”
An IF…THEN statement can include several commands that must be executed if
the conditional is true.
The following example shows two commands that are executed on Tuesdays: a
WRITE command that displays a message about a staff meeting, and an
INCLUDE command that tells the login script to process any commands or
messages contained in the file SYS:PUBLIC\UPDATE.
IF DAY_OF_WEEK=“TUESDAY” THEN
WRITE “Staff meeting today at 10 a.m.”
INCLUDE SYS:PUBLIC\UPDATE
END
Additional Information