It is currently 28 Jul 2017 6:44


Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Shout to Program
PostPosted: 18 Jan 2010 10:44 
Offline
Nouveau
Nouveau
User avatar

Joined: 09 Jan 2010 12:00
Posts: 6
Hi guys,

I want to set up shouts to a program, the idea being that the program will then update a database of job failures and overruns, which we can use for automation and trend analysis.

I think i have a good idea of what is required, i will outline the steps i plan to take, please correct if needed!

1) run ctmsys and add a shout destination like the following

Destination = P
Adr = S
Logical Name = myName
Physical Name = /bin/myprogram.sh

note: i assume the only difference between Adr = S and A is the server the physical Name points at, if it's S it's on the ctm server if its A then it will point to the server specified in the node ID/Group, please confirm if this is correct.

2) Add a shout to the job as follows (I don't remember the exact options)

WHEN: NOTOK
Destination: myName
Severity: Urgent
Message: "Jobname: %%JOBNAME RUN: %%RUNCOUNT DESCRIPTION: %%DESCRIPTION STATUS: NOTOK command: %%COMMAND PARM1: %%PARM1 Date:$$ODATE"

Is this kind of message valid? I assume this is how it will work!

What will my program see, i assume it will be eqivelant to
/bin/myprogram.sh <Message> <Urgency>

What happens if the program fails, and returns a non 0 exit code?

Is there any parameter that include the SYSOUT (or the path to the sysout?)location


Top
   
 Post subject:
PostPosted: 19 Jan 2010 6:54 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Jun 2007 12:00
Posts: 1148
Location: Ile de France
1)
all correct
2)
try it , i know that you can

regards
philmalmaison


Top
   
 Post subject:
PostPosted: 19 Jan 2010 7:19 
Offline
Nouveau
Nouveau
User avatar

Joined: 07 Jan 2010 12:00
Posts: 149
creaseypaul,
regarding the sysout, if the question is to access the sysout as part of the shout script, you may use ctmpsm -LISTSYSOUT.
Since ctmpsm is ORDERID driven, you shoul pass %%ORDERID as part of the message text.
Regarding your message text, it looks OK. If you intend to parse it inside your script, you have to determine which parameter is which. I dont remember which is $1 (or %1), but I think the urgency of the shout is always passed as first parm.
Check that by running a first sript which simply echo $1, $2 etc..

At last, it happened in some tests I did that some response to SHOUT script commands appear in the jobs sysout

Good luck
Nicolas_mulot


Top
   
 Post subject:
PostPosted: 20 Jan 2010 4:27 
Offline
Nouveau
Nouveau
User avatar

Joined: 09 Jan 2010 12:00
Posts: 6
Does anybody know a variable that can be used to pass the job description as part of the shout, like %%DESCRIPTION (that doesn't work!)


Top
   
 Post subject:
PostPosted: 20 Jan 2010 6:01 
Offline
Nouveau
Nouveau
User avatar

Joined: 07 Jan 2010 12:00
Posts: 149
creaseypaul,

What you need and does not exist, create it.

You can develop a routine which scans the entire list of job def, and insert for any object (either job or SG) a %%DESC local variable which contain all or part of the DESCRIPTION field. Check for length compatibility between description and AutoEdit value.

The method used depends on your skills:
You can perl against an expordeftable output or a ctmexdef output
You can SQL against the EM database
You can SQL against the ctm database
..others ..

Be careful however. I bitterly experienced that AutoEdit variable abuse can lead to considerable performance degradation. I have to admit I exagerated.

Cheers
Nicolas_Mulot


Top
   
 Post subject:
PostPosted: 04 Mar 2014 3:34 
Offline
Nouveau
Nouveau
User avatar

Joined: 17 Sep 2010 12:00
Posts: 7
hello,


does it still the same for V.7 version of CTM still not %%DESC variable ?
=> already searched and no its not handled by CTM


to be more clear what i'm triying to do:
export a flat files for CTM server with fields:
Datacenter:jboname:orderid:description

and try to recover it in an autoedit variable

like in shell :
%%DESC=grep %%DATACENTER:%%JOBNAME vartest.lis | cut -d : -f 3

but i dont think such syntax works with autoedit Vars.

i'm stuck cause i cannot find enough documentation / info on the subject..
only doc / post speaks of Date calculation / or fixed Var in autoedit.

in order not to decrease DB performances.

thx in advance.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved