It is currently 14 Dec 2018 3:34


Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 20 Mar 2012 9:41 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Aug 2009 12:00
Posts: 3
Hi all,

can i set a job to force ok another job upon successful completion.
please advice
thanks


Top
   
 Post subject:
PostPosted: 21 Mar 2012 4:23 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Aug 2009 12:00
Posts: 3
thanks chookgate on the reply but it seems im trying ctmpsm -LISTJOB command to obtain the order id of the other job

Quote:
Job A - job (in waiting confirmation status) to be FORCE OK
Job B - job to run ctmpsm to obtain order id & force ok A

CMD:

+ ctmpsm -LISTJOB WAITCONFIRM -SORT A

Jobs Waiting for Confirmation
ORDERID JOBNAME TYPE ODATE STATE STATUS FROMTIME UNTIL
-------- ----------------- ---- ------- ------- ------ -------- -----
.
.
0000gu8n A CMD 20120321 Wait Con Hold
.
.


should i change the command on job B to below?

ctmpsm -LISTJOB WAITCON -SORT A


Top
   
 Post subject:
PostPosted: 22 Mar 2012 3:45 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Dec 2008 12:00
Posts: 14
Location: Texas
I currently do this very task with a shout to a script I created called "killjob.sh":

When job A finishes, it sends a shout to destination "Kill_job". The message of the shout contains the name of job B.

In the steps panel of job B I added the following lines:

On Statement Stmt=* Code= COMPSTAT=143
Do OK

The script I created below "kills" job B:

#!/bin/ksh
#
# This script can be used to "kill" a running job in BMC.
#
# $2 is the "JOBNAME" of the job that you want to "kill".
#

ctmkilljob -JOBNAME $2 &

exit

#
# EOF
#

I know that it doesn't force job B OK but with the addition of the DO OK for completion code 143, it basically does the same thing.


Top
   
 Post subject:
PostPosted: 22 Mar 2012 8:30 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Dec 2008 12:00
Posts: 14
Location: Texas
Ignore my earlier post, I was assuming that Job B was already executing. My solution was for two filewatches looking for the same file to be created on different servers.


Top
   
 Post subject:
PostPosted: 22 Mar 2012 9:01 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Dec 2008 12:00
Posts: 14
Location: Texas
sjnbilko,

To get the order id of Job B you could use this command:

ctmpsm -listall allfields |grep <job_name> | awk '{print $1}'

Hope this helps.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


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