A string expression has the following basic format:
<variable>=<value>[.]<value>...
<variable>: Any user variable or job submission variable.
<value>:Any variable, or alphanumeric string.
. (period): If specified, indicates that the values before and after the period should be concatenated.
Syntax rules
The following syntax rules apply to a string expression:
Any spaces in the expression (including those immediately following the "=") are regarded as part of the string and are included in the result.
A period is used to concatenate two variables. No concatenation character is required to link two strings.
To include a period as part of the string between two concatenated variables, use two consecutive periods (see example below).
Any number of variables or strings can be concatenated in an expression.
If one variable follows another with no period in between, the two variables are combined to form the name of a third variable (see example below). Concatenation progresses from right to left until the entire expression is resolved.
EXAMPLE: %%X resolves to 0312:
%%X=%%DAY.%%MONTH
%%Y resolves to 03.12:
%%Y=%%DAY..%%MONTH
%%Z resolves to "Today is 03/12/05":
%%Z= Today is %%DAY/%%MONTH/%%YEAR
The following sequence passes a value to %%PARM1 based on the day of the month. This example illustrates building the name of a variable in the expression:
%%BackupTape_01=301
%%BackupTape_02=302
%%BackupTape_03=303
%%PARM1=%%BackupTape_%%DAY
The %%BackupTape_%%DAY expression is resolved in two steps (from right to left):
Given that the system date is Dec. 3, %%DAY resolves to 03. The resulting expression is:
%%PARM1=%%BackupTape_03
Next, Control-M resolves the %%BackupTape_03 variable. Since the value of this variable is 303, the resulting expression is: