HP 3000 Manuals

Scripting (Redirecting Input) [ Using NS3000/XL Network Services ] MPE/iX 5.0 Documentation


Using NS3000/XL Network Services

Scripting (Redirecting Input) 

Scripting gives you the capability to store a sequence of commands and
data in a file to be used as input into NetCI. You execute the script
file with the  PLAY command to sequentially perform operations instead of
issuing a series of commands.  Refer to the following pages for more
information on the PLAY command.

You may execute  PLAY in either the NetCI or MPE mode.  For this command
only, both modes recognize the PLAY command and will execute it.

Example 

This example shows scripting being activated.  Before you execute the
script file, input is received from the keyboard, and output is sent to
the screen (interactive operational mode).  When you execute the script
file with  PLAY, input is received from the script file, and output
continues to be sent to the screen, since it has not been redirected.
The straight line under Output Mode indicates when and how long the
output is redirected to the screen.  Note that the scripting operational
mode is in effect whenever you execute a script file.

	       Click here to view figure.
PLAY 

Executes a block or sequence of commands in a script file.

Syntax 
__________________________________________________
|                                                |
|           [ list/node] PLAY [ times] file parms|
__________________________________________________

Parameters 

 list/node 

Name of a list of nodes, or the NetCI name of a specific node on which a
script file is to be executed.  All MPE and NetCI (when preceded by a
slash) commands in the script file will be executed on this list or node.
If you do not specify a list or node name, only NetCI commands will be
executed.  Any MPE commands in the script file willnot be executed and
error messages will display.

 times 

Number of times script file is to be executed.  If you do not specify a
value, the default is one.  The maximum value is 32,767.

 file 

Name of an existing script file with one of the following fully qualified
file names:

 *  file

 *  file.group.account

 *  file reference (allows you to back-reference a :FILE command or to
    reference a previously defined file)

 parms 

Values or strings passed to the script file.  If the script file does not 
contain any input value or string, leave blank.  The maximum number of  
parms that you can specify is 9.  The parameter will be used when the
script file contains an exclamation mark followed by the parameter
position (for example,  !1, !2).  The first parameter following the file
name is considered to be position 1.

Discussion 

The script file must reside on the node on which NetCI is installed
before you can execute it.  While the script file is executing, input
from the keyboard is temporarily deactivated since input is from the
file.  After script file execution, you can resume with input from the
keyboard.

This command cannot be used within a script file.

Examples 

Example 1 

This example shows the  PLAY  command executing a script file named
SCRIPT1 on default node K. The parameter,  FINANCE, will be used whenever
!1 is encountered in the file since this is the first parameter specified
after the file name.  Refer to the following page for more information.

     K>PLAY 2 SCRIPT1 FINANCE 

The script file will be executed two times, and data will be gathered
each time.

Example 2 

This example executes the script file twice on all nodes that are members
of a list named  LIST1.

     NetCI>LIST1 PLAY 2 SCRIPT1 FINANCE 



MPE/iX 5.0 Documentation