User-defined variables and variable tables

About this task

Beside the supplied variables, you can define variables in a variable table by using the JCL VARIABLE panel.
  1. Select option 9 (JCLVAR) from the MAINTAINING DATABASES panel, or enter the fast path 1.9 from the main menu. You see the MAINTAINING JCL VARIABLE TABLES panel, shown in EQQJVMAP - Maintaining JCL Variable Tables.
    Figure 1. EQQJVMAP - Maintaining JCL Variable Tables
    EQQJVMAP ----------- MAINTAINING JCL VARIABLE TABLES ----------------------
    Option ===>
    
    Select one of the following:
    
    
    1 BROWSE          - Browse variable tables
    
    2 MODIFY          - Create a new JCL variable table or modify,
                        copy, browse or delete an existing variable table
    
    3 PRINT           - Print variable tables
  2. (MODIFY). You then see a filter panel that lets you select which JCL variable tables you want to look at. If you leave all the fields blank when you press Enter, you see a list of all the JCL variable tables defined to your HCL Workload Automation for Z system. See EQQJVTML - List of JCL variable tables.
    Figure 2. EQQJVTML - List of JCL variable tables
    EQQJVTML ------------- LIST OF JCL VARIABLE TABLES -----------------ROW 1 OF 5
    Command ===>
    
    Enter the CREATE command above to create a new JCL variable table
    or enter any of the following row commands:
    M - Modify, C - Copy, D - Delete, B - Browse
    
    
    Row Variable         Owner             Table                    Last updated
    cmd Table            Id                Description              by
    
     _  T3112            ACCSSOFF          END OF YEAR PROCESSING   XCALLIN
     _  ACCOUNTS         SYSPROG           ACCOUNTING VARIABLES     XPULL
     _  DEPARTMENT       SYSPROG           DEPARTMENTAL COSTS       MAGNUSZ
     _  INVOICE1         OPSMGR            INVOICES REGION NORTH    XCALLIN
     _  INVOICE2         OPSMGR            INVOICES REGION EAST     XCALLIN
     ******************************* BOTTOM OF DATA ********************************
  3. From this panel, you can copy, modify, browse, delete, and create a variable table. Enter the CREATE command to display the CREATING A JCL VARIABLE TABLE panel, where you are prompted for a table name, the names of the variables you want to create, and other details. See EQQJVVCL - Creating a JCL variable table for an example of variable creation.
    Figure 3. EQQJVVCL - Creating a JCL variable table
    EQQJVVCL ----------- CREATING A JCL VARIABLE TABLE ----------------- ROW 1 OF 1
    Command ===>                                                  Scroll ===> PAGE
    
    Enter/change data below and in the rows,
    and/or enter any of the row commands below :
    I(nn) - Insert, R(nn),RR(nn) - Repeat, D(nn),DD - Delete, S - Select
    variable details.
    
    VARIABLE TABLE     ===> WEEKLY__________
    OWNER ID           ===> XCALLIN_________
    DESCRIPTION        ===> TESTTABELL______________
    
    Row Variable Subst.   Setup  Val  Default
    cmd Name     Exit            req  Value
     _  PXM0001_ ________ _      _    ____________________________________________
    
    ****************************** BOTTOM OF DATA  *********************************

    The SETUP option specifies when the variable is substituted. See When variables are substituted for more information.

    You can specify the variable-substitution exit, rather than HCL Workload Automation for Z should substitute the variable. For more details about this exit, see Variable-substitution exit (on JCL or job definition variable).

    When you select a variable from panel EQQJVVCL, you can make detailed modifications to it using this panel:

    Figure 4. EQQJVVMP - Modifying a JCL variable
    EQQJVVMP ---------------- MODIFYING A JCL VARIABLE ----------------------------
    Command ===>
    
    Enter/Change data below, or DEP command to create/modify dependency,
    Enter VER command to define verification rules.
    
    Variable table        :MONTHLY          Monthly variables
    Variable name         :PXM0001
    
    DESCRIPTION        ===> ____________________
                                         Descriptive text
    DEFAULT VALUE      ===> ____________________________________________
    UPPER CASE         ===> _            Y - Yes, N - No
    SETUP              ===> _            Y - Yes, N - No, P - Prompt
    SUBSTITUTION EXIT  ===> ________     A load module name
    VALUE REQUIRED     ===> _            Y - Yes, N - No
    DEFAULT POSITION   ===> __           01 - 80  A position in a JCL
                                                  instream data line
    DIALOG TEXT        ===> ___________________________________________________
                            ___________________________________________________
                            ___________________________________________________
                            ___________________________________________________

    Set the UPPER CASE field to Y, if you want lower case characters of the DEFAULT VALUE field to be translated to upper case.

    The VALUE REQUIRED option specifies whether the variable can be blank. If you set this field to Y, the value cannot be assigned a blank value.

  4. When you have selected and defined a variable, you can specify: by entering the DEP or VER primary command.