Supervising the Network
5-33
Customizing the User Environment
Login Script Commands and Variables
a separate line.
• If you include a WRITE command as part of the IF…THEN command, the
WRITE command must be on a separate line.
• IF…THEN statements can be nested (up to 10 levels). However, GOTO
should not be used in a nested IF…THEN statement to enter or exit from the
body of an IF…THEN statement.
• If your IF…THEN statement consists of only one line, even if that line wraps,
you do not need to include END. If your IF…THEN statement must be on
more than one line (for example, you used ELSE or WRITE, which must be
on separate lines), you must include END.
Six relationships are possible between the elements of an IF…THEN
statement. Represent these relationships with the following symbols:
Examples
• If you place the following command in a login script, the message “Status report
is due today” appears when the user logs in on Monday and “Have a nice day!”
on other days.
IF DAY_OF_WEEK=“MONDAY” THEN
WRITE “Status report is due today”
ELSE
WRITE “Have a nice day!”
END
• The following line means “If the hour (on a 24-hour scale) is greater than or equal
to 12, then write ‘afternoon’.”
IF HOUR24>=“12” THEN
WRITE “afternoon”
Symbol Definition
= Equals
<> Does not equal
> Is greater than
>= Is greater than or equal to
< Is less than
<= Is less than or equal to