How variables are resolved
For details of TOM reference variables, see List-of-object-reference-variables.
When you decide to enter a variable as part of an object definition, you must prefix the variable name with an ampersand (&). Depending on the source of the variable, the ampersand might be followed by another character before the variable name begins, for example:
- A single ampersand (&) before the variable name indicates the variable will be resolved from values in the SHARED variable pool.
- A double ampersand (&&) before the variable name indicates the variable will be resolved from the MVS symbol list.
- A single ampersand followed by a single at sign (&@) before the variable name indicates the variable will be resolved from the list of the object's reference variables.
- Enclosing the ampersand in double quotation marks (" ") indicates that it is not the beginning of a variable name and it should not be resolved.
- The delimiters for a variable are either a blank space or a backward slash (\).
When you delimit a variable with a blank space, a blank space follows the resolved variable value.
When you delimit a variable with a backward slash, a blank space does not follow the resolved value.
S &@STCNAME\,JOBNAME=ABCDXYZ (backward slash as delimiter)
This example shows a blank as a delimiter between &@STCNAME and FIRST:
S &@STCNAME\ ,PARM=('&@STCNAME FIRST')
where STEPNAME has a value of AAOKMZ32 and STCNAME has a value of AAOKMZ01 and the command resolves to
S AAOKMZ32,PARM=('AAOKMZ01 FIRST')
Substring specification can be used on variables with the format: variable name:start position:length (varname:s:l).
S &&SYSNAME:2:3
&&SYSNAME:2:2 - If &&SYSNAME is SYSA, YS is the result.
&@STCNAME:3:4 - If &@STCNAME is SAVTAM01, VTAM is the result.
&QTOMID:1 - If &QTOMID is BMCTOM1, BMCTOM1 is the result.
&QTOMID:4 - If &QTOMID is BMCTOM1, TOM1 is the result
&&SYSNAME:2:2\blah - If &&SYSNAME is SYSA, YSblah is the result
&&SYSNAME:2:2 - If &&SYSNAME is SYSA, YS is the result.
&@STCNAME:3:4 - If &@STCNAME is SAVTAM01, VTAM is the result.
&QTOMID:1 - If &QTOMID is BMCTOM1, BMCTOM1 is the result.
&QTOMID:4 - If &QTOMID is BMCTOM1, TOM1 is the result
&&SYSNAME:2:2\blah - If &&SYSNAME is SYSA, YSblah is the result
This section contains the following topic:
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*