Use this command to change a command line or to add a new command line to a TSM script.
Privilege Class
To issue this command, the administrator must have previously defined the script or must have system privilege.
Syntax
>>-UPDate SCRipt--script_name-----------------------------------> >-----+----------------------------------------+----------------> '-command_line----+------------------+---' '-Line--=--number--' >-----+------------------------------+------------------------->< '-DESCription--=--description--'
Parameters
Command can contain substitution variables and may be continued across multiple lines if you specify a continuation character (-) as the last character in the command. You can specify up to 1200 characters for the command. Enclose the command in quotation marks if it contains blanks. If you specify this parameter, you can optionally specify the following parameter.
If you specify a line number, the command will replace an existing line (if the number is the same as an existing line). Or the command will insert the specified line (if the line number does not correspond to an existing line number for the command line sequence).
Examples
Task 1
Assume that you have defined a script named QSAMPLE with the following three lines:
001 /* This is a sample script */ 005 QUERY STATUS 010 QUERY PROCESS
The script consists of the following lines after it processes:
001 /* This is a sample script */ 005 QUERY STATUS 010 QUERY PROCESS 015 QUERY SESSION
After the script processes, the script now consists of the following lines:
001 /* This is a sample script */ 005 QUERY STATUS 010 QUERY STGPOOL 015 QUERY SESSION
Task 2
Insert a new command line (SET REGISTRATION OPEN) after the QUERY STATUS command line in the QSAMPLE script:
The following command lines result:
001 /* This is a sample script */ 005 QUERY STATUS 007 SET REGISTRATION OPEN 010 QUERY STGPOOL 015 QUERY SESSION
Related Commands
Table 292. Commands Related to UPDATE SCRIPT
Command | Description |
---|---|
COPY SCRIPT | Creates a copy of a script. |
DEFINE SCRIPT | Defines a script to the TSM server. |
DELETE SCRIPT | Deletes the script or individual lines from the script. |
QUERY SCRIPT | Displays information about scripts. |
RENAME SCRIPT | Renames a script to a new name. |
RUN | Runs a script. |