This procedure describes how to define a Control-M Report job in the CLI using Control-M Automation API.
NOTE: 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.
To define a Control-M Report job in the CLI:
ctm reporting report::get <report name>|shared:<report name> [<pdf|excel|csv> -o <output file>] [-f <configuration file>]
EXAMPLE: To order report, Alerts1 in PDF, and to send the output to c:\tmp\alerts.pdf type the following:
ctm reporting report::get Alerts1 pdf -o c:\temp\alerts.pdf
EXAMPLE: To order a shared report, Alerts2 in csv and send to c:\tmp\alerts.csv:
ctm reporting report::get shared:Alerts2 csv -o c:\temp\alerts.csv
EXAMPLE: To order a report, Alerts3 in the Excel format, with the .xslx file extension, and send to c:\tmp\alerts.xlsx:
ctm reporting report::get shared:Alerts3 excel -o c:\temp\alerts.xlsx
NOTE: If your report name contains spaces, when typing the command, replace %20 between the spaces. For example, for Job Report 1, type Job%20Report%201. Remove any special characters, such as # in the report name.
For information about the parameters, see CLI parameters.
Parent Topic |