Tivoli Storage Manager for Sun Solaris Administrator's Reference

UPDATE SCRIPT (Update a Tivoli Storage Manager Script)

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

script_name (Required)
Specifies the name of the script to be updated.

command_line
Specifies a new or updated command to be processed in a script. You must update a command, a description, or both when you issue this command.

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.

Line
Specifies the line number for the command. If you do not specify a line number, the command line is appended to the existing series of command lines. The appended command line is assigned a line number of five greater than the last command line number in the sequence. For example, if the last line in your script is 015, the appended command line is assigned a line number of 020.

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).

DESCription
Specifies a description for the script. You can specify up to 255 characters for the description. Enclose the description in quotation marks if it contains blank characters.

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 
 
  1. Add command QUERY SESSION to the end of the QSAMPLE script.

    Command:
    update script qsample "query session"

    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
     
    
  2. Change line 010 so that it processes the QUERY STGPOOL command instead of the QUERY PROCESS command:

    Command:
    update script qsample "query stgpool" line=010

    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:

Command:
update script qsample "set registration open" 
line=007

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 314. 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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]