• User's guide
  • API
Search Results for

    Show / Hide Table of Contents
    • Concepts
    • Installation
    • Configuration
      • Overview
      • License
      • Datasources
      • Configuration
      • Plug-Ins
      • Codepages
      • Environment Variables
      • Include files
      • Example
    • Jobs
      • Jobs
      • Include
      • Multi-Threaded Jobs
      • Tracking Jobs
    • Tasks
      • Overview
      • Copy Check
      • Excel
      • File Compare
      • File Copy
      • File Dump
      • File Edit
      • File Format
      • Foreach
      • Generate
      • IMS/DB Data Conversion
      • JCL Submit
      • Listcat
      • Log
      • Powershell
      • Set Environment Variable
      • Sql
      • Stored Procedure Compare
      • Table Compare
      • Table Copy
      • Table Load
      • Table Scan
      • Table Unload
      • User Script
    • Layouts
      • Overview
      • XML Definition
      • COBOL Definition
      • Field data Types
    • Extensibility
      • Extending Ianus
      • Column Comparators
      • Column Converters
      • Record Comparators
      • File Editors
      • User Script
      • Record Layout Match Class
      • Column Layout Match Class
      • User Fields
      • Codepages
      • Resources
    • Usage
      • Command Line
      • Monitors
      • Programmatically
      • Unit Testing
    • Known Issues
    • Disclaimers

    JCL Sumbit

    The jcl submit task (jclsubmit) starts a job on the desired JES regions and, optionally, waits for its return code. Upon completition the task can:

    • download a local copy of one or more spool files produced by the JCL
    • validate the success of the job depending on:
      • job return code
      • availability and content of spool files

    The supported JES subsystems are:

    • z/OS JES2
    • Micro Focus Enterprise Server JES for Linux or Windows
    • Micro Focus Enterprise Server JES for .NET

    The following attributes configure the jclsubmit task:

    Attribute Type Purpose Default
    region string Defines the target region
    wait bool If set to true, Ianus waits for the JCL to complete true
    resolve bool If set to true, Ianus looks for the JCL in the same path of the Ianus job is. true

    The following elements configure the jclsubmit task:

    Element Purpose
    jcl File name of the JCL to submit
    store
    success Define the success condition for the JCL

    JCL element

    The jcl element defines the JCL to be submitted. It can be a full or a relative path name. Relative paths are resolved as described above.

    The JCL must always be located on the machine executing Ianus for Ianus to transfer it to the JES region at execution time.

    Store element

    The store element defines the spool files to be downloaded and stored locally. Files are stored in the region�s spool path, and their name is coded as follows:

    • when ID is not defined: <JCLNAME>.<JOBNUM>.<DDNUM>.<STEPNAME>.<DDNAME>.txt
    • when ID is defined: <JCLNAME>.<ID>.txt

    Sysout element

    A sysout element identifies one or more spool files(s). The following attributes are used to identify the spool file(s):

    Attribute Type Purpose Default
    name string DDNAME of the file. If omitted, any DDNAME matches.
    stepname string STEP name of the file. If omitted any STEP matches.
    procstep string PROCSTEP of the file. If omitted any PROCSTEP matches.
    id string Unique identifier for the local file.

    Success element

    The success element defines the conditions to consider a job succssful or to raise warnings/errors. If no success element is specified, the job is always treated as successful.

    The following attributes are used to configure the element:

    Attribute Type Purpose Default
    when string Conditional operator. Indicates how conditions are combined: or or and and
    failure string Sets the tasks exit status for condition not met: warning or error warning

    Returncode Element

    The returncode element defines a condition on the job return code.

    The following attributes are used to configure the element:

    Attribute Type Purpose Default
    is string Conditional comparison: lt, le, eq, ne, ge or gt

    Sysout element

    A sysout element identifies one or more spool files(s). The following attributes are used to identify the spool file(s):

    Attribute Type Purpose Default
    name string DDNAME of the file. If omitted, any DDNAME matches.
    stepname string STEP name of the file. If omitted any STEP matches.
    procstep string PROCSTEP of the file. If omitted any PROCSTEP matches.
    id string Unique identifier for the local file.

    If no sub condtions are present, the mere existence of the spool file validates the condition. The following elements defines additional sub conditions.

    Numrec element

    The numrec element defines a condition on the number of records contained in the spool file. The condition is verified if the number of records matches the provided condittion.

    The following attributes are used to configure the condition:

    Attribute Type Purpose Default
    is string Conditional comparison: lt, le, eq, ne, ge or gt

    Match element

    The match element defines a condition on the content of the spool file. The condition is verified if the specified regular expression is matched in the file.

    Example

      <jclsubmit name="SUBMIT01" region="LOCALSEE" >
        <jcl>TSTIAN0K.jcl</jcl>
      </jclsubmit>
      
      <jclsubmit name="S01" region="TESTJES" >
        <jcl>JCLMORE.jcl</jcl>
        <store>
          <sysout name="SYSPRINT" stepname="TERZO" id="MYSYSPRINT"/>
        </store>
        <success when="and">
          <returncode is="lt">3</returncode>
          <sysout name="SYSUT2" >
            <numrec is="ge">2</numrec>
            <match>SUC.*ESS</match>
          </sysout>
          <sysout name="SYSPRINT" stepname="TERZO"/>
        </success>
      </jclsubmit>
    

    Status codes

    Status Status code Description
    Ready -1 Task is initialized, but not yet started
    Running -2 Task is running
    Success 0 Task completed, JCL submitted and completed successfully (return code threshold not exceeded or threshold not set)
    Warnings 1 Task completed, JCL submitted and completed with return code greater that threshold
    Errors 2 Task completed, JCL submit or response error detected
    Aborted 9 Task cannot be executed
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise