Previous Topic

Next Topic

Book Contents

Book Index

Global Variable Update by Another Job
  1. Enter the job scheduling definition for IDJOB9 and do the following:
    1. Add the following SET VAR statements:

      SET VAR   %%\VAR1=XXX
      SET VAR   %%..\VAR2=YYY
      SET VAR   %%..\IDJOB8\VAR1=ZZZ

    2. Delete the DO SHOUT statements
    3. Delete the ON STEP / CODES values.
    4. Exit the job scheduling definition.

    The job scheduling definition for job IDJOB9 will now update the values for the Global variables previously defined by IDJOB8.

  2. Enter the job scheduling definition for job IDJOB8 and delete the SET VAR statements. Then exit the job scheduling definition.
  3. Order job IDJOB9.
  4. Once job IDJOB9 has ended, order job IDJOB8.

    You should anticipate the following results of these successive job runs.

  5. Check the sysout of job IDJOB8. The following comments should appear in the sysout:

    //* VAR1 FROM JOB JOB8 EQUALS ZZZ

    //* VAR2 FROM GROUP GRP3 EQUALS YYY

    //* VAR1 FROM JOB JOB9 EQUALS XXX

    The above values clearly indicate that Global variables can be globally updated.

Parent Topic

Defining Global Variables