Control-M Workload Management Overview | Generated by AI
Control-M is a workload automation tool by BMC Software used to manage, schedule, and monitor batch jobs and workflows. Below, I’ll address your queries about Control-M order, customized filters, folder, sub-application, application, freeing a job, running a job, job output, and advanced usage, based on the provided context and general knowledge of Control-M.
1. What is “Order” in Control-M?
In Control-M, ordering a job or folder refers to scheduling or submitting it to the Active Jobs Database for execution, either manually or based on predefined scheduling criteria. Ordering determines when a job or folder is processed by the Control-M/Server, which monitors and submits jobs to Control-M/Agents when their dependencies (e.g., prerequisites, events, or resources) are met.
- How it works:
- Jobs or folders are ordered into the Active Jobs Database, typically during the “New Day Procedure” (a daily process that schedules jobs based on their definitions) or manually via utilities like
ctmudly
or the Control-M GUI. - Example: The
ctmudly
utility allows ordering a folder at a specific time/date using a syntax likectmudly -DAILY_NAME <USER_DAILY_NAME>
(limited to 10 characters for the daily name). - You can specify an OrderMethod (e.g., “Manual” for manual ordering) at the folder level.
- Ad hoc ordering: Ordering an ad hoc job may lead to issues in some versions (e.g., Control-M 9.0.21), where a different job from the same folder might be ordered if the folder contains more than 10 jobs.
- Jobs or folders are ordered into the Active Jobs Database, typically during the “New Day Procedure” (a daily process that schedules jobs based on their definitions) or manually via utilities like
- Key Points:
- Ordering respects scheduling criteria (e.g., calendars, weekdays, or specific dates) and dependencies (e.g., events or resources).
- Use the Control-M/EM or Automation API to order jobs programmatically or via the GUI.
2. Customized Filter for All Jobs, Folder, Sub-Application, Application
Control-M allows customized filters to search, view, or manage jobs, folders, sub-applications, and applications in the Monitoring domain or through utilities like ctmpsm
. Filters help refine the view of jobs or folders based on specific attributes.
- How to Create Customized Filters:
- In the Monitoring Domain:
- From the Monitoring domain, use the Find or Advanced Find feature to filter jobs by attributes like job name, filename, run ID, application, sub-application, or status (e.g., OK, NOTOK).
- Example: In the Quick Find toolbar, type a job attribute (e.g.,
Application:Billing
) or use the Advanced Find dialog box to specify multiple criteria (e.g.,Application = Billing AND SubApplication = Payable
). - Filters can include pattern matching (e.g., using
*
for wildcards, likeJob*
to match all jobs starting with “Job”).
- Using Control-M Plug-in:
- Using Control-M Reports:
- In the Monitoring Domain:
- Key Attributes for Filtering:
- Application: A logical grouping of jobs related to a specific business process (e.g., “Billing”). Used to organize jobs at a high level.
- Sub-Application: A subset of an application for finer categorization (e.g., “Payable” under “Billing”).
- Folder: A container for jobs or subfolders, with scheduling criteria or dependencies applied at the folder level. Folders can be Regular, SMART (with advanced scheduling and dependency logic), or Simple (basic container without folder-level configurations).
- Job Attributes: Includes job name, status, host, run ID, or custom fields like
BusinessFields
(e.g.,Department:HR
).
- Example Filter:
3. Free a Job
Freeing a job in Control-M releases a job that is in a Held state, allowing it to proceed to execution if its dependencies are met.
- How to Free a Job:
- Using the Monitoring Domain:
- Using the
ctmpsm
Utility: - Using Automation API:
- Use the REST API or CLI to issue a
free
command for a specific job. For example:ctm run job:free <job_id>
- Use the REST API or CLI to issue a
- When to Free a Job:
4. Run a Job
Running a job in Control-M executes it immediately, overriding its scheduling criteria or prerequisites.
- How to Run a Job:
- Using the Monitoring Domain:
- Using the
ctmpsm
Utility: - Using Automation API:
- Key Points:
- Running a job manually is useful for testing or urgent executions.
- Ensure the job’s dependencies (e.g., resources or events) are available, or use Force to bypass them.
5. Job Output
Job output in Control-M refers to the logs, system output (sysout), or results generated by a job’s execution.
- How to View Job Output:
- In the Monitoring Domain:
- Using the
ctmpsm
Utility: - Using Automation API:
- Retrieve job output via the REST API:
ctm run job:output::get <job_id>
- Retrieve job output via the REST API:
- Control-M Reports:
- Sysout Archiving:
- Example:
6. Advanced Usage in Control-M
Advanced usage in Control-M refers to leveraging its more sophisticated features for complex workflow automation, dependency management, and integration with modern DevOps practices. Below are key aspects:
- Advanced Scheduling:
- Rule-Based Calendars: Define specific days for job execution using calendars and advanced rules (e.g.,
MonthDays
orWeekDays
with parameters like+2
,-3
,>4
). Example:json "When": { "MonthDaysCalendar": "Summer2017", "MonthDays": ["1", "+2", "-3", ">4", "<5", "D6", "L7"] }
- Cyclic Jobs: Jobs that rerun at specified intervals (e.g., every 2 hours). Configure using
Cyclic
parameters. - Date/Time Constraints: Specify ranges when jobs can or cannot run (e.g.,
FromDate
andToDate
).
- Rule-Based Calendars: Define specific days for job execution using calendars and advanced rules (e.g.,
- Event Management:
- Control-M Automation API:
- Manage job workflows as code using JSON, integrated with source control systems like Git. Example:
{ "FolderSample": { "Type": "Folder", "Job1": { "Type": "Job:Command", "Command": "echo I am a Job", "RunAs": "controlm" } } }
Deploy and test job flows using the Control-M Workbench or CLI.
- Supports provisioning agents, configuring host groups, and automating deployments.
- Manage job workflows as code using JSON, integrated with source control systems like Git. Example:
- Reference Sub-Folders:
- Job Dependencies and Flows:
- Resource Management:
- Custom Notifications:
- Environment-Specific Configurations:
- Reuse jobs across environments (e.g., UAT, Prod) by defining environment-specific variables in files like
UAT.txt
orPROD.txt
. Example:/home/controlm/cntrlm_server/UAT.txt: %%CM_ORA_SERVR=UAT %%CM_ORA_DBASE=UA01 %%CM_ORA_SCRPT=/opt/oracle/local/custom/bin
Reference these in the SubApplication field to dynamically resolve variables.
- Reuse jobs across environments (e.g., UAT, Prod) by defining environment-specific variables in files like
- Mass Updates:
- JCL Verification:
- Integration with Third-Party Applications:
Summary
- Order: Submits jobs or folders to the Active Jobs Database for execution, manually or via scheduling.
- Customized Filters: Use Monitoring domain,
ctmpsm
, or reports to filter jobs by application, sub-application, folder, or other attributes. - Folder, Sub-Application, Application: Organize jobs hierarchically; folders contain jobs/subfolders, applications group related jobs, and sub-applications provide finer categorization.
- Free a Job: Releases a held job using GUI,
ctmpsm
, or API. - Run a Job: Executes a job immediately, overriding criteria, via GUI,
ctmpsm
, or API. - Job Output: View logs/sysout via Monitoring domain,
ctmpsm
, or API; configure formats for database jobs. - Advanced Usage: Includes rule-based calendars, event management, Automation API, reference sub-folders, flows, resource management, notifications, and integrations.
For further details, refer to the official BMC Documentation (https://docs.bmc.com) or the Control-M Automation API guide (https://x.ai/api). If you have specific scenarios or need examples, let me know!