IBM Tivoli Storage Manager, Version 7.1

Using substitution variables

You can include substitution variables in a script. Substitution variables are specified with a $ character followed by a number that represents the position of the parameter when the script is processed.

About this task

The following example SQLSAMPLE script specifies substitution variables $1 and $2:
/*----------------------------------------------*/
/* Sample substitution example */
/* ---------------------------------------------*/
SELECT-
$1 FROM-
NODES WHERE-
PLATFORM='$2'
When you run the script you must specify two values, one for $1 and one for $2. For example:
run sqlsample node_name aix
The command that is processed when the SQLSAMPLE script is run is:
select node_name from nodes where platform='aix'


Feedback