Command to give a total number of jobs run in the AJF

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
TRAVO

Command to give a total number of jobs run in the AJF

Post by TRAVO » 31 May 2007 2:25

Is there a way to run a command in a Control M job that will give me a total number of jobs run in the AJF before new day starts. I have Control M 6.2.01 for distributed systems running on Unix Solaris 8.

Thanks,

Travo

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 31 May 2007 3:19

Hi

You can try to use ctmpsm utility.

Here is command line to see all executing jobs.

ctmpsm -LISTJOB Executing

TRAVO

Post by TRAVO » 31 May 2007 3:31

I'll try that,

Thanks,

Travo

TRAVO

Command to give a total number of jobs run in the AJF

Post by TRAVO » 31 May 2007 4:19

That gave me a list of what I was looking for, great! To take it one step further what do I need to add to the command to get a total number of jobs run on that same report?I tried -total and I didn't see a total.

ctmpsm -LISTJOB Executing %%PARM1 0700 %%ODATE 0659

Thanks,

Travo

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 31 May 2007 4:38

Hi

If you want all detail about ctmpsm type ctmpsm -h
In your case you must use SQL command.

You can find some examples in script existing in that Download Part

Fraser

Post by Fraser » 04 Jun 2007 8:56

Ask Graham Harper (via your account manager) at BMC. He has a free script to count the number of jobs on the AJF.

Also if you open all active jobs or the all jobs viewpoints it will have the number of jobs on that viewpoint in the bottom right hand corner. (You could amend the viewpoint).

TRAVO

Command to give a total number of jobs run in the AJF

Post by TRAVO » 04 Jun 2007 2:42

Thanks, for some reason when I use
ctmpsm -LISTJOB Executing %%PARM1 0700 %%ODATE 0659
I get a list of 6 or 7 jobs when we process over 400 jobs nightly. Do you see something wrong in the command I have listed above?

I am aware of the total at the bottom of the AJF, however I need a report sent to an outlook folder with a total number of jobs in the AJF before new day everyday.

Thanks,

Travo

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 04 Jun 2007 3:29

Hi TRAVO

The result is normal.

"ctmpsm" utility don't give you number of execution during the Day(Odat).
It only give you result in progress when you launched your command.

In addition here is the syntax for ctmpsm and LISTJOB parameter.

ctmpsm -LISTJOB (OK|NOTOK|EXECUTING|CYCLIC|WAITTIME|WAITCONFIRM) [-SORT (ORDERID|JOBNAME)]

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Command to give a total number of jobs run in the AJF

Post by philmalmaison » 14 Jun 2007 2:08

if you want to have this kind of informations, use the ctmruninf as follow:
ctmruninf -list <fromtime> <untiltime> [<filter>] [-total]
ctmruninf -delete <fromtime> <untiltime>
ctmruninf -purge

fromtime, untiltime : YYYYMMDDHHMMSS
filters : -JOBNAME <jobname>
-MEMNAME <memname>
-MEMLIB <memlib>
-NODEID <nodeid>
-ORDERID <orderid>
The <filter> parameter is optional.

-total : Prints number of records, total CPU & ELAPSED times

Example:
ctmruninf -list 19970121100000 19970121101900
ctmruninf -list "*"
:wink:

User avatar
arno76
Nouveau
Nouveau
Posts: 24
Joined: 29 Aug 2008 12:00

Post by arno76 » 05 Sep 2008 9:58

hello,

it works well from command line, but is there a methode to copy the sysout into a file? or must we do a script to d that?

thanks

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 05 Sep 2008 2:44

ctmpsm -LISTSYSOUT <orderid> [-SYSOUTNUMBER <number>]

ex :

ctmpsm -LISTSYSOUT 000006c6 -SYSOUTNUMBER ALL
You will obtain list of sysout

ctmpsm -LISTSYSOUT 000006c6 -SYSOUTNUMBER 43 > Sysout.txt
you save sysout 43 for that job in Sysout.txt

User avatar
arno76
Nouveau
Nouveau
Posts: 24
Joined: 29 Aug 2008 12:00

Post by arno76 » 05 Sep 2008 2:46

thanks, but after where can i find the file sysout.txt? on the server?

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 05 Sep 2008 2:55

ctmpsm exist with all Unix Control-M Agent.
You can do that on your own server having an agent.

Post Reply