Saturday, July 27, 2013

Why statistics are not correctly shown in the Control-M/EM GUI?


"ctmjsa" is used to collect statistics of all Control-M jobs.

Generally calculation of statistics can be done with Jobname or Memname. 

This is determined by the Operational Parameter Statistics Mode.

When it is set to Memname the statistics won't be shown right.


Change Statistics Mode to Jobname, recycle Control-M, run ctmjsa again, and now view Statistics of any job from Control-M EM GUI. You can see the difference.

Thursday, July 25, 2013

How can you say if the agent for a particular job is available?



While there is a continuous connection between CONTROL-M EM and Control-M/EM Server, the communication between CONTROL-M/Server and CONTROL-M/Agent is not constant.

CONTROL-M/Server is doing the following:

1. It sends a TRACK_ALL message for each agent that has running jobs every 'Polling Interval' (the default is 15 minutes).

2. There is no indication that an agent becomes unavailable unless there was a request to that agent.

While the agent waits for its time window it does not check if the agent is available. This will be checked only when the job will be submitted.

3. You can check the Agent status using Control-M Configuration Manager.

What can I do if my agents become unavailable sometimes?

Solution: Run ctm_menu:

(5) Parameter Customization -> (4) Parameter Customization for Specific Agent Platform:

Communication Timeout (default 120)

Maximum Retries (default 12)

Increase the timeout parameters for the agent platforms. The same can be achieved using Control-M Configuration Manager. You can open Agent properties and change the parameters accordingly.

Wednesday, July 24, 2013

How do I check communication between Server and Agent?

From the Agent run:
   ag_diag_comm

From the Server run:
   ctm_diag_comm <Agent host name>

Compare the results. Specially check the following:

  1. Server-to-Agent Port Number is the same on both outputs
  2. Agent -to-Server Port Number is the same on both outputs
  3. Server-Agent Comm. Protocol is the same on both outputs
  4. Unix ping to Agent Platform, ctm_ping to agent, and Unix Ping to Server Platform all Succeeded
  5. Service "<agent service>" is Active
  6. Server Host Name, in ag_diag_comm output, is correct.


Thursday, July 11, 2013

How to KILL a Job using PostProc Tab



During our day to day activities sometimes we may come across a scenario to Kill a job during run time. The most commonly scenario is to kill a job when it is exceeding its normal time limit. We can achieve this using PostProc tab without any manual intervention.

To perform this you MUST have access to Control-M Server.
  1. You have to connect to Control-M Server using Telnet.
  2. From the "ctmsys" menu, goto "Shout Destination Tables" and define a shout destination with type "P" (process), Address Type "A" (agent), Logical Destination "Kill_Job" and Physical Destination"$HOME/ctm/exe_<architecture>/killjob.sh".
  3. Go to your CONTROL-M/Server home directory, and define a script under ctm/exe_<architecture>/. The script name will be "killjob.sh", which contains the following lines:

    #!/bin/csh
    ctmkilljob -ORDERID $2 &


    Note: the ampersand (&) at the end of the command. This must be present for this solution to work.
  4. Job definition
    • Goto the "PostProc" tab and define a shout WHEN LATETIME or EXECTIME
    • in the Destination put "Kill_Job" 
    • in the Message Box put "%%ORDERID" (the parameters for the "killjob.sh" script).

Wednesday, July 10, 2013

How to get a job to email the SYSOUT



Update the STEPS panel of the failing job with the following statements:

      On Stmt=*            Code=COMPSTAT!0 (or NOTOK or other specific return codes)
      DO Set-Var          %%\G_ORDERID                %%ORDERID
      DO Set-Var          %%\G_JOBNAME               %%JOBNAME
      DO Set-Var          %%\G_MAILADDRESS      youremail@domain.com
      Do Force-Job      Table=YourTable                 Jname=EMAILSYSOUT

Note: The “Do Set-Var” is setting global variables to be passed to another job. Global variables are defined using a backslash.
The global variables are used in the other job without the backslash.


Force job definition: Job name EMAILSYSOUT

On the command line:
ctmpsm -LISTSYSOUT 000%%G_ORDERID |mailx -s "Job %%G_JOBNAME failed. See sysout attached!" %%G_MAILADDRESS


Note: The Node-id on the Execute tab must be the home server for Control-M.


Tuesday, January 22, 2013

Control-M EM GUI



The CONTROL-M/Enterprise Manager application provides a single, centralized point of access and control of your batch processing environment. CONTROL-M/Enterprise Manager lets you to automate the scheduling and processing of your production jobs. Its main GUIs are CONTROL-M/Desktop and the CONTROL-M/Enterprise Manager window (simply called CONTROL-M/EM).

Logging into Control-M/EM:


Click on the Icon which is located on your Desktop.


Go to Start Menu\Programs\CONTROL-M Enterprise Manager 6.3.01\ Default\ CONTROL-M Enterprise Manager GUI





ViewPoint Manager

Defining ViewPoints

A ViewPoint builds a view of the active environment by retrieving and displaying data according to the criteria defined in the ViewPoint’s collection, hierarchy, and global filter definitions.

■ Collections determine the jobs to be loaded into memory.
■ Global filters determine which jobs to display.
■ Hierarchies determine the hierarchical structure in which to display jobs.

CONTROL-M/EM is supplied with a number of predefined ViewPoints, but you can create or modify definitions.

To define a ViewPoint
  1. In CONTROL-M/Enterprise Manager, choose Tools => ViewPoint Manager.


  2. In the ViewPoint Manager dialog box, do one of the following:
    1. To create a new ViewPoint definition, select the ViewPoints node and click New. Then, in the ViewPoint dialog box that opens, enter a name for the ViewPoint.

    2. To edit an existing ViewPoint definition, select the definition under the ViewPoints node and click Edit.

  3. In the ViewPoint Properties dialog box, do the following:
    1. Enter a description for the ViewPoint (optional).
    2. Select a collection for the ViewPoint.
    3. Select a global filter for the ViewPoint.
    4. Select a Hierarchy definition for the ViewPoint.
    5. After selecting the hierarchy, select the Initial Level of the Hierarchy to display when the ViewPoint is opened.
    6. By default, the highest hierarchy level nodes are displayed in when the ViewPoint is opened.
    7. Click OK.

Wednesday, November 21, 2012

Using Wild card in File Watcher [ctmfw ]

Most of us know that ctmfw utility is used for File Watcher (create/delete). Normally most of us (all of us.. may be ???? I've used many times before knowing the exact usage ;-D ) will use the file name in quotes (" "), which is actually wrong. The correct way of using this is , placing the quotes only with the file name not with entire path.

Invalid: "test/mahi/touchfile.txt"

Valid: test/mahi/"touchfile.txt"

This will be very helpful while using wildcard character (*)

Eg: test/mahi/"touchfile*.txt"

This will give a flexibility to watch for any file like touchfile1.txt, touchfile2.txt, touchfile-random.txt... etc

Tuesday, November 20, 2012

Control-M Road Map [ History of Control-M ]


Control-M was a batch-scheduling tool originally developed for scheduling jobs on mainframe computer systems, by an Israel-based company New Dimension Software (the company was originally called 4th Dimension Software and later renamed to New Dimension Software). In the early 90's, Control-M also became available on the distributed environment (for example, Windows and Unix). Users can use Control-M either in a distributed/mainframe only or mixed environment. There are a number of other mainframe-focused products within the same product line such as Control-D, Control-M/Tape, Control-O, Control-V, and Control-M/Links. BMC software acquired New Dimension Software in 1999 and continued the product line. In the recent years, BMC software made Control-M to become part of its BSM strategy by integrating Control-M with BMC Atrium Configuration Management Database (CMDB). Today Control-M is one of the most widely used enterprise batch scheduling software on both mainframe and distributed environments, with customers around the world from every major industry.

The following are the milestones in the Control-M history:

  • 1985: Innovated the integrated approach for batch processing automation (mainframe)
  • 1993: Provided single focal point of control of the heterogeneous batch environment – Enterprise Control Station (later on, the name changed to Control-M/Enterprise Manager)
  • 1993: Release of control modules to extend Control-M's scheduling capability into external applications
  • 1996: Enabled event-based scheduling
  • 2000: Release of new control modules - integration with ERP applications
  • 2004: Added the support for SOA approach – Business Process Integration
  • 2004: Link batch scheduling with business SLAs – Batch Impact Manager
  • 2006: Release of Agentless technology - part of Control-M 6.3.01
  • 2007: Integration with BMC Atrium CMDB – BMC Batch Discovery
  • 2008: Workload Lifecycle Management - within Control-M 6.4.01
  • 2010: Workload automation – Control-M 7
  • 2012: The Power of Simple – Control-M 8

Reference: BMC Control-M 7: A Journey from Traditional Batch Scheduling to Workload Automation

May be Conditions (Manual Conditions)

Sometimes we will get different scenarios in Scheduling control-M jobs, one of that is like below.

Lets say there are JOB-A,JOB-B,JOB-C. JOB-C, is dependent on other 2 jobs.
  • If JOB-A & JOB-C are DAILY Jobs
  • JOB-B is Mon, Wed, Fri job 
If you try to implement the above change the first thing comes to your mind is using DUMMY job (in case if you are good in Scheduling though).

if it is a single scenario in your entire batch jobs then we can use Dummy jobs, lets say you have 100's of similar scenarios. then it would be difficult to have 100's of dummy jobs, it will make your scheduling solution complex, so it is better to use May Be Conditions or Manual Conditions.

Steps to Implement this:

  1. Out Conditions of JOB-A and JOB-B should be  #-JOB-A-OK and   #-JOB-B-OK
  2. In  Conditions of JOB-C is  #-JOB-A-OK and   #-JOB-B-OK
  3. Create 1 job with TASK TYPE as Command and use "ctmldnrs -CALCCOND -ADDMODE NO" as a commad
  4. Create 1 job with TASK TYPE as Command and use ctmldnrs -LOAD "#-*" as a commad
The job in Step3 will create a default output file in <controlm_user_dir/ctmldnrs.dat>

The job in Step4 will read the conditions from a default file <controlm_user_dir/ctmldnrs.dat> and load it on Conditions table. This means the jobs which are not in schedule for that day and if there are any jobs waiting for their conditions (#- Conditions) will be created in Conditions table.

Note:
  • Step3 job must run immediately after New Day Process
  • Step4 job must run after Step3 job
I hope it is clear. Please drop your comments in case if you have any queries.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Awesome Deals | Bloggerized by Mahendra - 24x7FunOnline