Thursday, January 9, 2014

Tasks performed during New Day Process


CONTROL-M processes execute as background processes on the server computer and remain active at all times except during NDP. Once a day, at the time specified by the CONTROL-M system parameter Day Time (starting time of working day), CONTROL-M starts the New Day Procedure (formerly known as the “General Daily procedure”).

The New Day procedure performs automatic functions that start a new day under CONTROL-M. This procedure is used as a master scheduler for all CONTROL-M
activities.

The following actions were performed during NDP till v6.2.01, on later versions these were disabled and a new utility can be executed as a batch job during the day to perform the cleanup

-> Agents cleanup

-> Statistics cleanup

The New Day Procedure performs the following sequence of operations:

  1. A new Odate (CONTROL-M date) is calculated (based on the system date and CONTROL-M system parameter Day Time).

  2. A partial cleanup of the CONTROL-M/Server log is performed, based on system parameter Maximum Days Retained By CONTROL-M Log. 

  3. A partial cleanup of job SYSOUT directories on agent computers is performed, based on system parameter Maximum Days to Retain Sysout Files.

  4. A selective cleanup of the Active Jobs file is performed. Jobs that have already executed and ended OK, and jobs whose parameter Max Wait has been exceeded (and are not Held), are erased from the Active Jobs file.

  5. A partial cleanup of the statistics in the CONTROL-M/Server database is performed. For each job, CONTROL-M retains statistical information regarding the last 20 successful executions. This value can be changed by defining the RUNINF_PURGE_LIMIT parameter in the CONTROL-M config.dat file. CONTROL-M must be shut down and restarted for this change to take effect.

  6. A selective cleanup of prerequisite conditions is performed. Prerequisite conditions are deleted if their date reference (month and day) is equal to the new CONTROL-M date +1 (tomorrow). This prevents jobs from being triggered by prerequisite conditions remaining from the previous year.

  7. Job orders are placed in the Active Jobs file according to job processing parameters contained in Scheduling tables (assigned to User Daily “SYSTEM”). These job orders can include the submission of User Daily jobs.

  8. CONTROL-M begins downloading the new Active Jobs file to the CONTROL-M Configuration Manager. During download, CONTROL-M processes are suspended.


Monday, January 6, 2014

What does it mean by "chmod 777 ." in Unix?

In general the below are the 5 values which we'll use for permissions  in unix.

  • 0 - No Access
  • 1 - Execute
  • 2 - Write
  • 4 - Read
  • 7 - Full Access
Usually file permission field is a 3 digit number. First digit denotes the OWNER of the file/folder, second digit denotes GROUP, third digit denotes EVERYONE.


chmod 400 file - Read by owner 
chmod 040 file - Read by group 
chmod 004 file - Read by world 
chmod 200 file - Write by owner 
chmod 020 file - Write by group 
chmod 002 file - Write by world 
chmod 100 file - execute by owner 
chmod 010 file - execute by group 
chmod 001 file - execute by world 

chmod 111 file - Allow execute permission to owner and group and world 
chmod 222 file - Allow write  permission to owner and group and world 
chmod 444 file - Allow read permission to owner and group and world 
chmod 777 file - Allow everyone to read, write, and execute file 


You can also use them by adding them. For example if you would like to give Read & Write access then you can use 2+4 = 6. If you would like to give Read and Execute access then you can use 1+4 = 5.

Sunday, January 5, 2014

How to Add a Condition using SHOUT (POSTPROC)

As most of us know that we can add conditions using "Conditions" tab or through steps tab.  Normally we can add/remove conditions based on the below scenario's.
  • When job Ended OK (using Conditions Tab)
  • When the job Ended NOTOK (using Steps Tab)
  • When a job failed with a specific return code (using Steps Tab)
  • When you find a particular string in Log/Sysout (using Steps Tab)
  • When Run Counter criteria met (using Steps Tab)
... there might be many other scenario's where we may need to add/remove conditions. few of them are When a job executing for longer time, or If the job not submitted by a particular time or If the job not completed by a certain time. In general we will trigger an ALERT in these scenario's using PostProc tab. Now I'm going to explain you how can we add a condition instead of generating an alert.

Like how we use LateTime/ExecTime/LateSub, we'll goto PostProc tab and select the particular event which you would like to check and add a condition.

A SHOUT WHEN EXECTIME > nnn (The range is 001 to 999 in minutes only) or 
A SHOUT WHEN LATE SUB > HHMM or 
A SHOUT WHEN LATE TIME > HHMM

If you want to Average time then use + and you can also use % (percentage) to limit above the average time.

Here is the example:



"condition" must be added in the shout destination table as a script i.e program as destination. You can name as you desire (something like add-condition.sh). The script should contain the below statement to add the condition.

ctmcontb –add $2
The ctmcontb utility performs different operations on prerequisite conditions in the Control-M/Server database (Like Add, Delete, List conditions).

In the same way you can also invoke any other utility depend upon the requirement.

Wednesday, January 1, 2014

Control-M 8 Changes vs Earlier Versions

I've started working on BMC Control-M lastest version which is 8.0 recently. I had experience in Control-M scheduling for around 6.7 years in various versions (v6.1, v6.2, v6.3 and v6.4). Till now what I learnt is completely different in V8.0. It took couple of days for me to understand the new concepts and Envitonment. This is really awesome, very simple GUI interface and many options were simplified. I just thought of sharing few of my findings. so here is my 1st blog post on Control-m 8.
ParameterPreviously Known As
Host/Host GroupNode/Node group
Run asOwner
Override PathOverride library
VariableAutoEdit
Sub ApplicationGroup
Created byAuthor
FolderTable
Order MethodUser daily
OutputSysout
Come back to this website for more info....

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





Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Awesome Deals | Bloggerized by Mahendra - 24x7FunOnline