Retrieving JCL job names

You can retrieve the JCL job names from the database using the getJobName.sh script. This topic outlines the process for retrieving the JCL job names.

Before you begin

When deploying and setting up the Discovery Agent, ensure that you have created the dataset and copied the ZAGETJOB file to the newly created dataset. For more information, see Deploying and configuring the Discovery Agent.

Procedure

  1. Open the ZAGETJOB file.
  2. Modify the SCPATH, JAVAHOME, and COMMPARM parameters in the ZAGETJOB file.
    Example of the script input
  3. Optionally, you can also modify the OTHPARM parameter.

    In OTHPARM, you can define a pattern in SQL format to filter JCL job names in a specified format. By default, no pattern is applied, and all job names are displayed. You can use % in the pattern. For example, entering JOB1% displays only job names starting with "JOB1".

    Example with pattern
    The JCL job names are displayed.
    Note: To customize the output format, you can modify the following values in the discovery-agent-<version>/config/CONFIG.YML file:
    • Update the JOB_LINE_CHAR_LIMIT to specify the maximum number of characters allowed per line. The minimum value must be 5 characters.
    • Update the GETJOBNAME_LINE_PREFIX value with the prefix to be displayed at the start of each output line.