The following lines mean "If the hour (on a 24-hour scale) is greater than or
equal to 12, then write 'afternoon'":
IF VALUE HOUR24>="12" THEN
WRITE "afternoon"
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
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.TXT.
IF DAY_OF_WEEK="TUESDAY" THEN
WRITE "Staff meeting today at 10 a.m."
INCLUDE SYS:PUBLIC\UPDATE.TXT
END
Login Script Commands and Variables
77
Need help?
Do you have a question about the NETWARE 6-DOCUMENTATION and is the answer not in the manual?