Use this command to define a TSM script or to create a new TSM 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.
Privilege Class
To issue this command, you must have operator, policy, storage, or system privilege.
Syntax
>>-DEFine SCRipt--script_name-----------------------------------> .-Line--=--001----. >--+-command_line--+-----------------+-+------------------------> | '-Line--=--number-' | '-File--=--file_name----------------' >--+-----------------------------+----------------------------->< '-DESCription--=--description-'
Parameters
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 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.
Examples
Task 1
Define a script that will display all AIX clients.
define script qaixc "select node_name from nodes where platform='AIX'" desc='Display aix clients'
Task 2
Define and run a script that will route the QUERY STGPOOL command to a server group named DEV_GROUP.
Task 3
Define a script whose command lines are read in from a file that is named MY.SCRIPT . Name the new script AGADM.
Related Commands
Table 83. Commands Related to DEFINE 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. |