Control M specific job status to a excel

859 Views Asked by At

I have configured control-m batches to execute complex job/workflows. Is there a way to get the specific job/workflow status to a excel or csv ?

1

There are 1 best solutions below

0
On

You could make use of the ctmlog listmsg Control-M utility. This utility needs to be run on the server that hosts the control-m server.

I run the following powershell daily to extract all failures to a text file. You could do the same for ended OK jobs - just change the message number from 5134 to 5133.

#Get Today's and Yesterday's date
$date = Get-Date -Format 'yyyyMMdd'
$m1Date = (get-date).AddDays(-1).ToString('yyyyMMdd')

#Generate and execute Control-M Utility command
$cmd = "ctmlog listmsg 5134 $m1Date 0000 $date 0000 C:\Temp\Todays_Failures.txt"
iex $cmd