Previous Topic

Next Topic

Book Contents

Book Index

Supplying Variable Values through the Job Scheduling Definition

As mentioned earlier, AutoEdit variables that resolve to desired values can be placed in the JCL. This is useful at sites where changes to the JCL are discouraged or not allowed.

If the variables are system variables, the values, by definition, are automatically supplied by the system. But if the variables are user-defined variables, the user must somehow provide the values for those variables. One method of providing those values is through the job scheduling definition.

For example, suppose the JCL must be provided the ID of a tape that is being mounted and used. A user-defined AutoEdit variable representing the tape ID can be placed in the JCL. Then, before the job is run, the value for that tape ID can be provided in the job scheduling definition.

You can now add a user-defined variable for the tape ID to the JCL, and set its value in the job scheduling definition. To keep this exercise at a basic level, you will again place the variable in a comment line in a trivial JCL.

  1. Edit the JCL of IDJOB7, add the following comment line, and then exit the JCL:

    //* TAPE ID PROVIDED: %%TAPEID

    You can now edit the job scheduling definition for IDJOB7.

  2. Enter the job scheduling definition for IDJOB7.

    Notice that the General Parameters section contains a field called SET VAR.

    +-----------------------------------------------------------------------------+

        MEMNAME IDJOB7      MEMLIB   CTM.TEST.JCLLIB

        OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N

        APPL                                GROUP IDGRP5

        DESC    THIS IS IDJOB7

        OVERLIB                                                   STAT CAL

        SCHENV                         SYSTEM ID                  NJE NODE

        SET VAR

        CTB STEP AT         NAME            TYPE

        DOCMEM  IDJOB7      DOCLIB  

       ===========================================================================

    The SET VAR statement is used for specifying a value for a user-defined AutoEdit variable. Assume that the ID of the tape is 046453.

  3. Specify %%TAPEID=046453 in the SET VAR statement. It appears as follows:

      JOB: IDJOB7   LIB CTM.TEST.SCHEDULE                             TABLE: IDGS3

      COMMAND ===>                                                    SCROLL===> CRSR

      +-----------------------------------------------------------------------------+

        MEMNAME IDJOB7      MEMLIB   CTM.TEST.JCLLIB

        OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N

        APPL                                GROUP IDGRP5

        DESC    THIS IS IDJOB7

        OVERLIB                                                   STAT CAL

        SCHENV                         SYSTEM ID                  NJE NODE

        SET VAR %%TAPEID=046453

        SET VAR

        CTB STEP AT         NAME            TYPE

        DOCMEM  IDJOB7      DOCLIB  

        ===========================================================================

  4. Exit the job scheduling definition, and then exit the Job List screen. Save the changes in the Exit Option window of the Job List screen.

    Before running the job, take a look at the AutoEdit Simulation facility.

Parent Topic

AutoEdit and JCL