Reports Job Definition

In Control-M you can define and run a Control-M Report job. This is a 2-part process that consists of the following:

  1. Define a report job command in the CLI, as described in Defining a Control-M Report Job in the CLI.

  2. Define an OS job through Control-M with the command defined in the CLI, as described in Reports Job Definition.

For a detailed video about Control-M Report job definition, see Control-M Reports Job Definition Video.

  • Ensure that you have installed Control-M Automation API. For more information, see Control-M Automation API installation.
  • You can create a Control-M Report job type by using Control-M Application Integrator. You can use examples that have been created in the Control-M Application Hub and deploy the job type to Control-M.
  • You cannot run an existing Control-M Report job type or an OS job running the EMReportcli.exe command in Control-M. You can view these jobs that were defined to run Control-M Reporting Facility reports.

Defining a Control-M Report Job in the CLI

This procedure describes how to define a Control-M Report job in the CLI using the Control-M Automation APIClosedA set of programmatic interfaces that provide developers and DevOps engineers access to the capabilities of Control-M SaaS within the modern application release process.

This procedure generates a report synchronously. An additional API command is available if you want to generate the report asynchronously. For more information, see the Control-M Automation API online documentation.

Begin

  • From the Command Line type the following:

    ctm reporting report::get <report name>|shared:<report name> [<pdf|excel|csv>] [-o <output file>] [-f <configuration file>]

    • Generate a report called Alerts1 in PDF and send the output to c:\tmp\alerts.pdf:
      ctm reporting report::get Alerts1 pdf -o c:\temp\alerts.pdf
    • Generate a shared report called Alerts2 in CSV and send the output to c:\tmp\alerts.csv:
      ctm reporting report::get shared:Alerts2 csv -o c:\temp\alerts.csv
    • Generate a reportcalled Alerts3 in XLSX and send the output to c:\tmp\alerts.xlsx:
      ctm reporting report::get shared:Alerts3 excel -o c:\temp\alerts.xlsx

    For information about the parameters included in this command, see CLI Parameters.

    CLI Parameters

    The following table describes the parameters for defining a Control-M Report job in the CLI through the Control-M Automation API.

    Parameter

    Description

    Name

    Name of the report you want to run.

    If the report name contains spaces, when typing the command, replace %20 between the spaces.

    In Job Report 1, type Job%20Report%201.

    Remove any special characters, such as # in the report name.

    Format

    (Optional) The output format.

    Values:

    • PDF

    • CSV

    • excel

    By default, the output format is in CSV. Use this parameter if you want to change to PDF, or Excel (.xslx file extension).

    For PDF output, type a command such as the following:

    ctm reporting report::get Alerts1 -o c:\temp\alerts.pdf

    File Path

    (Optional) Full file name of the output file, which is overwritten if it existed previously.

    If you want the output to be in the D:\ directory in a PDF file named alerts.PDF, the output file path is D:\alerts.pdf.

    If you do not want the output to be placed in a directory, do not type -o and the path.

    ctm reporting report::get Alerts1 format pdf

    This output is generated to a URL.

    Configuration File

    (Optional) A JSON file that contains additional customized parameters, such as date and time formats or new filter values.

    For information about the configuration file and the settings that you can include, see Reporting configuration in the Control-M Automation API documentation.