Use this command to define a Tivoli® Storage Manager script or to create a new Tivoli Storage Manager script using the contents from another script.
The first line for the script may be defined with this command. To add subsequent lines to the script, use the UPDATE SCRIPT command.
run script1 > c:\temp\test.out
To issue this command, you must have operator, policy, storage, or system privilege.
>>-DEFine SCRipt--script_name-----------------------------------> .-Line--=--001----. >--+-command_line--+-----------------+-+------------------------> | '-Line -=--number-' | '-File--=--file_name----------------' >--+-----------------------------+----------------------------->< '-DESCription--=--description-'
The command you specify can include substitution variables and can be continued across multiple lines if you specify a continuation character (-) as the last character in the command. Substitution variables are specified with a '$' character, followed by a number that indicates the value of the parameter when the script is processed. You can specify up to 1200 characters for the command line. Enclose the command in quotation marks if it contains blanks.
You can run commands serially, in parallel, or serially and in parallel by specifying the SERIAL or PARALLEL script commands for the COMMAND_LINE parameter. You can run multiple commands in parallel and wait for them to complete before proceeding to the next command. Commands will run serially until the parallel command is encountered.
Conditional logic flow statements can be used. These statements include IF, EXIT, and GOTO.
You can create a script by querying another script and specifying the FORMAT=RAW and OUTPUTFILE parameters. The output from querying the script is directed to a file you specify with the OUTPUTFILE parameter. To create the new script, the contents of the script to be defined are read in from the file you specified with the OUTPUTFILE parameter.
define script qaixc "select node_name from nodes where platform_name='AIX'"
desc='Display aix clients'
define script qu_stg "(dev_group) query stgpool"
run qu_stg
define script agadm file=my.script
Command | Description |
---|---|
COPY SCRIPT | Creates a copy of a script. |
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. |
UPDATE SCRIPT | Changes or adds lines to a script. |