Question mark variables
?VAR1. will cause the
value of VAR1 to be placed on the line that the variable
appears on, starting at the column number defined in the HCL Workload Automation for Z database.?nnVAR1. will cause the value of VAR1 to
be placed on the line that the variable appears on, starting at the
column number specified by nn. Any column
value specified for this variable in the HCL Workload Automation for Z database
is overridden.More than one ?-variable can appear on a JCL line. The positions of the variables themselves have no influence on the positions of the variable values. These positions are decided by the column number specified for the variable. For example:
//SYSIN DD *
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
?20VAR1.?9VAR2.where VAR1 is
APRIL and VAR2 is
MAY (the scale line has been included only for example purposes),
the result after variable substitution would be:
//SYSIN DD *
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
MAY APRILThe value of ?-variables is evaluated in the same way as for &- and %-variables, and in the same sequence (see Making one variable dependent on another). However, ?-variables are substituted only after all percent and ampersand variables have been substituted. This is because the value of the ?-variable can be placed only in areas of the line that are blank. HCL Workload Automation for Z can only know which areas of a line will be blank after ampersand and percent substitution has occurred.
Tabular variables cannot overlap. That is, the values of two different variables cannot be defined to occupy the same space on a line. The space that the variables themselves originally take up is ignored when substitution occurs. For example:
//SYSIN DD *
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
?20VAR1.?21VAR2.
/*where VAR1 is APRIL and VAR2 is
MAY, the substitution would be invalid because the two variables are
attempting to use columns 21, 22, and 23.
HCL Workload Automation for Z changes the space occupied by the variable to spaces, if it is not covered by the substituted value. For example:
//SYSIN DD *
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
THIS IS?40VAR1. THE STANDARD DATA. IS A WET MONTH.
VAR1 is APRIL. After substitution, the line
becomes:
//SYSIN DD *
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
THIS IS THE STANDARD DATA. APRIL IS A WET MONTH.
?OADID will
not be accepted; however, ?20OADID is valid: the
application ID is substituted at column 20.