Defining and editing jobs in the Dynamic Workload Console

The easiest way to define an agent for z/OS job is with the Dynamic Workload Console.

To create a job definition:
  1. From the navigation toolbar, click Administration>Workload Design>Manage Workload Definitions.
  2. Select an engine name, enter your credentials if required, and click Go.
  3. In the Working List toolbar of the pop-up window that opens, click New>Job Definition>Native>z/OS.

    The Properties window for the job opens.

  4. Under the General tab:
    1. Enter:
      • The job name.
      • The name of the agent for z/OS workstation.
      • Select Variable resolution at runtime, if the JCL (either by reference or by definition) includes variables that need to be resolved by the agent before it is passed to JES.
      • Optionally, specify output conditions. Define which return codes qualify the job as having completed successfully and other output conditions that do not result in SUCC status but that determine which successor job should run next.
        Successful output conditions
        A condition that when satisfied signifies that the predecessor job completed successfully. The job status is set to SUCC. Successful output conditions can be expressed as return codes, job status, output variables or based on job log content.
        Condition Name
        Specify a name that identifies the successful condition that must be met by the predecessor job before a successor job can run.
        Condition Value
        Specify the value of the condition that signifies a successful outcome for the predecessor job.
        For example, a successful output condition might be: Condition Name STATUS_OK and Condition Value RC=0
        Other conditions
        Output conditions that do not result in SUCC status and determine whether a successor job runs or not. Conditions can be expressed as return codes, job status, output variables or based on job log content.
        Condition Name
        Specify a name that identifies the condition that must be met by the predecessor job before a successor job can run.
        Condition Value
        Specify the value of the condition that must be met by the predecessor job before a successor job can run.
        For example, you might want to create a condition that signifies that the predecessor job has completed with errors. You can define your output condition as follows: Condition Name STATUS_ERR1 and Condition Value RC=2
        The format of Condition Value for both successful output conditions and other conditions is as follows: (RC <operator> <operand>) where:
        RC
        The instruction keyword
        Operator
        The comparison operator. Allowed operators are comparison operators (=, != or <>, >, >=, <, <=) that can be combined with logical operators (AND, OR, NOT).
        Operand
        Any integer between -2147483647 and 2147483647.
        For example, you can enter the following expressions:
        Successful output conditions:
        • (RC<=3) to qualify a job as successful when the job ends with a return code less than or equal to 3.
        • NOT ((RC=0) AND (RC=1)) to qualify a job successful when the job ends with a return code different from 0 and 1.
        • (RC=2) OR (RC=4) to qualify a job successful when the job ends with a return code equal to 2 or equal to 4.
        • (RC<7) AND (RC!= 5) to qualify a job successful when the job ends with a return code less than 7 and not equal to 5.
        Other conditions
        (RC=1) for a condition named STATUS_ERR.
        (RC=4 OR RC=9) for a condition named FIRST_PATH
        (RC <>5) OR (RC > 2) for a condition named SECOND_FLOW
        In the Condition Value field for both successful conditions and other ouput conditions, you can also express the output condition using variables other than the return code. For example, you can specify three different output conditions as follows:
        • Condition Name: STATUS_ERR Condition Value: RC=0
        • Condition Name: STATUS_ERR1 Condition Value: RC=${varname}
        • Condition Name: STATUS_ERR2 Condition Value: RC=${LOG.CONTENT}
        • You can set a success or other output condition for the job by analyzing the job output. To analyze the job output, you must check the this.stdlist variable.
          For example, you enter the following expression:
          contains(${this.stdlist},"error")
          if you want to qualify a job as unsuccessful when the word "error" is contained in the job output.
        • For a file transfer job specifically, you can set a success or unsuccess condition for the job by analyzing the job properties.
          For example, you enter the following expression:
          ${this.File.1.Size}>0
          if you want to qualify a file transfer job as successful when the size of the transferred file is greater than zero.
        • For a file transfer job specifically, you can set a success or unsuccess condition for the job by analyzing the job properties or the job output of another job in the same job stream.
          For example, you enter the following expression:
          ${this.NumberOfTransferredFiles}=
             ${job.DOWNLOAD.NumberOfTransferredFiles}
          if you want to qualify a file transfer job as successful when the number of uploaded files in the job is the same as the number of downloaded files in another job, named DOWNLOAD, in the same job stream.
        • All Xpath (XML Path Language) functions and expressions are supported, for the above conditions, in the Condition Value field:
          • String comparisons (contains, starts-with, matches, and so on)
          • String manipulations (concat, substring, uppercase, and so on)
          • Numeric comparison (=, !=, >, and so on)
          • Functions on numeric values (abs, floor, round, and so on)
          • Operators on numeric values (add, sum, div, and so on)
          • Boolean operators

    .

  5. Optionally, enter additional choices in the Affinity and Recovery options pages.

Defining the JCL by reference

If you are defining a job that only needs to point to the location of the JCL you intend to submit to JES, in the z/OS page, select by reference and enter:
  • The name of the data set where the JCL is stored. This name can be up to 44 characters long and is optional. If the data set name is not specified, the agent for z/OS will search for the member name in the data set concatenation library declared for the agent at installation time.
  • The name of the JCL member in the data set. This name can be up to 8 characters long and is required.

Defining the JCL by definition

To add the entire JCL to the job definition, in the z/OS page select by definition and write the JCL statement in the JCL definition box.

The limit of characters in the box is 16383

Editing the JCL by definition, retrieving it from a remote data set

To edit the job definition explicitly in the symphony file getting it from the remote data set during the job definition, perform the following steps:

  1. Open the Dynamic Workload Console and from the navigation toolbar, click Administration > Workload Design > Manage Workload Definitions.
  2. In the displayed panel, specify the engine connection that you want to use and click GO.
  3. Search the Job Definition and open it.
  4. Click on the panel z/OS.
  5. Select by reference and then click Get JCL.
  6. Select by definition and then edit the JCL Definition
  7. Save