getting error while performing shout from POSTPROC

Everything about Control-M Server installation or setup.
Post Reply
User avatar
sharas
Nouveau
Nouveau
Posts: 76
Joined: 13 Nov 2007 12:00
Location: Hyderabad
Contact:

getting error while performing shout from POSTPROC

Post by sharas » 19 May 2010 1:46

Hi,

I had created a new shout destination as below

4 P S KILLJOB $EXUHP/test_kill123.sh

content of test_kill123.sh is as below

cat test_kill123.sh
#!/bin/ksh
ORDERID=`$EXUHP/cat order.txt`
ctmkilljob -ORDERID $ORDERID -NODEID ctmint

I have defined in POSTPROC tab of job to send SHOUT to KILLJOB when exectime >001

I got below error in Control-M job's log

19/05/10 13:36:54 TR5202 SHOUT TO KILLJOB FAILED

Any ideas ?

appreciate your comments.

Thanks,
Sharas

hipikll

Post by hipikll » 19 May 2010 8:51

i do not know, what is the
$EXUHP variable?

Maybe I have no knowledge about it, but if i'm correct, the ctmserver does not know the value of this variable and can not shout to //test_kill123.sh, as can not find the script.

But I'm not 100% sure.

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 20 May 2010 12:12

Hi,

How did you extract the orderid value put in order.txt ?

I suggest this:

Step1
Your new Shout destination Table

Destination Type: Program
Address Type: Server
Logical Name: KILLJOB
Physical Name: $EXUHP/test_kill123.sh (must be accessible by Control-M Server and the script must be executable)


It seem OK in your case

Step2
Your 'test_kill123.sh' is : ctmkilljob -ORDERID $2 &

NOTE: The & must be present at the end to resolve the %%ORDERID value

If you want, add in your script this additional line (shout a message to GAS for this explicite action):

ctmshout -ORDERID $2 -USER CONTROLM -MESSAGE "This job was killed cause : Long running job " -SEVERITY U &

Step 3
Define your job (PostProc panel)

When = EXECTIME or LATETIME
Param = <your_value>
To = KILLJOB (in Shout Destination)
Msg = %%ORDERID (in Message box)
Best regards
Walty

Post Reply