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.
/*----------------------------------------------*/
/* 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'