Activating variable substitution

You activate variable substitution by specifying VARSUB as the first statement of your job definition. For a detailed description of VARSUB, see Scheduling End-to-end with Fault Tolerance Capabilities. A variable consists of up to 8 alphanumeric characters.

Any non-alphanumeric character, except blanks, can be used as a symbol to indicate that the characters that follow represent a variable. You can define two kinds of symbols using the PREFIX or BACKPREF keywords in the VARSUB statement: it allows you to define simple and compound variables.

Supplied Variables and User-defined Variables tables are supported. Refer to Supplied variables and User-defined variables and variable tables for details. For information about associating variable tables with applications, see Associating variable tables with applications.

The following example shows how to use a simple variable. When scheduling the operation, the scheduler automatically sets the simple VUSER variable to the value that is specified in the E2EVARTAB variable table that is defined in the Application Description file.
VARSUB
  TABLES(E2EVARTAB)
  PREFIX('&')
JOBREC 
  JOBCMD('dir')
  JOBUSR('&VUSER ')
In the following example of a compound variable, two substitution steps are performed automatically. The %OWSID string is processed first. OWSID is an operation-related supplied variable that is automatically set to the workstation ID for the current operation: assuming that FTW1 is the workstation ID, the first substitution step produces &FTW1SDIR.\my.cmd string. If you define the variable &FTW1SDIR in the E2EVARTAB application description table and set it to the c:\win32app\maestro value, the final result is that c:\win32app\maestro\my.cmd will be scheduled.
VARSUB
  TABLES(E2EVARTAB)
  PREFIX('&')
  BACKPREF('%') 
JOBREC
  JOBSCR('&%OWSID.SDIR.\my.cmd')
  JOBUSR('ZWS')