Question mark variables

Question mark variables are tabular; that is, you can specify in which column on the line the variable value should begin when the variable is substituted. The position at which the value is placed can be defined in the HCL Workload Automation for Z database when the variable is defined, or can be specified in the job where the variable is used. You will probably use these variables primarily within in-stream data, although they can be used anywhere within your job. For example:
?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        APRIL

The 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.
HCL Workload Automation for Z has changed the space occupied by the variable to spaces. The other data in the line does not move.
Note: Variables supplied by HCL Workload Automation for Z do not have an implied position. When these variables are specified as tabular variables, you must include the column number. For example, ?OADID will not be accepted; however, ?20OADID is valid: the application ID is substituted at column 20.