TABLE directive

Purpose

This directive defines a variable table that will be searched before the variable tables in any existing concatenation when resolving JCL variables.

Syntax


1  //*%OPC TABLE  NAME= (  table name )

Parameters

NAME=(table name)
Identifies the variable table that you want to precede any existing table concatenation.

Usage Notes

The TABLE directive is used to include a variable table at the front of any existing table concatenation. The table specified by table name must have already been created using the OPC JCL VARIABLE TABLES panel (see User-defined variables and variable tables). The table name specified can be the name of a table or an & or % variable. This variable follows the standard HCL Workload Automation for Z format and can be promptable or not promptable.

More that one TABLE directive can be used within the operation JCL. As each table statement is found, the table name it specifies is added to the front of the table search list. Up to 16 tables can be concatenated in this way, including application and global variable tables.

When a variable is assigned a value, this value is unaffected by any later table concatenations.

In the following example, variables HIONE and data set2 are defined in both TABLE1 and TABLE2.

Example

//*%OPC SCAN
//*%OPC SEARCH NAME=(TABLE2)
//DDNAME1 DD DSN=&HIONE..FINANCE,DISP=SHR
//*%OPC TABLE NAME=(TABLE1)
//DDNAME2 DD DSN=&HIONE.&DATASET2.,DISP=SHR
The search order for variables found after the TABLE directive is reached would be:
  1. TABLE1
  2. TABLE2
  3. The application variable table (if it exists)
  4. The global variable table.
The variable HIONE was set before the TABLE directive was reached. The value it is assigned, therefore, is taken from TABLE2, not from TABLE1. The variable data set2, however, because it was not found before the TABLE directive, is assigned a value from TABLE1.