Using NS3000/iX Network Services (36920-90008)

192 Chapter 8
NetCI
Writing and Executing Script Files
exit exits program. This is a subsystem command to exit the
listdir5 program.
%/logreset resets output back to the screen. Refer to the LOGRESET
command discussed later in this section.
SCRIPT2 runs a program that lists attributes according to groups and
users for an account called FINANCE. We know this information is for
the FINANCE account because !1 references the first parms value
specified in PLAY. The output will be stored in the log file called
LOGFILE2.
Example
This example shows how the slash must precede the NetCI LOG,
LOGRESET, LET, WHILE, INC, and ENDWHILE commands since the MPE
mode will be established when you execute the script file on a node or
list. For example, when you enter
NetCI>I PLAY SCRIPT3
you will be in MPE mode. A slash must precede each NetCI command
as shown in SCRIPT3. The SCRIPT3 script file contains the following:
%/LOG LOGFILE2
%/LET V=1
%/WHILE V 2
%SHOWJOB
%/INC V
%/ENDWHILE
%/LOGRESET
Special Considerations
There are several considerations that apply to scripting which must be
considered since input is redirected from the script file instead of the
terminal. These considerations are:
Include a password with the logon information during configuration.
If you do not include a password, NetCI will automatically assign a
password to prevent the system from prompting you for a password.
Include the termtype option with the logon information during
configuration to prevent a remote application from polling the
terminal for termtype during connection establishment. This will
occur if the application was part of a logon UDC (such as setting
function keys). If you do not include the termtype option, and the
remote application requires it, the remote node connection will hang.
Flow Control Statements
Flow control statements may be used in script files to control execution
of NetCI commands. Refer to the following pages for more details of the
flow control statements.