It is currently 27 Jul 2017 4:42


Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 07 Aug 2013 4:28 
Offline
Nouveau
Nouveau
User avatar

Joined: 09 Oct 2007 12:00
Posts: 3
CONTROL-M/Enterprise Manager 7.0.00 400

I want to be able to kick off a control m job to kick off a script and use parameters to determine

• which machine to run it on
• pass arguments to the script

the arguments are coming from WebSphere API and we are able to add conditions from the API successfully but we are looking at a process for adding the arguments to each individual run of the script triggered in Control-M.


Top
   
 Post subject:
PostPosted: 16 Aug 2013 7:46 
Offline
Nouveau
Nouveau
User avatar

Joined: 25 Sep 2010 12:00
Posts: 10
Hi,

If you want to pass parameters from a Control-M job definition to a script then you may use auto edit variables in set tab of the jobs.

In case you want system parameters to be picked and a job needs to be created with those values, then you may use ctmcreate utility to achieve so.


Top
   
 Post subject: How to...
PostPosted: 16 Aug 2013 9:03 
Offline
Nouveau
Nouveau
User avatar

Joined: 24 Jul 2012 12:00
Posts: 28
Location: Long Beach, CA
Basics of passing parms to scripts/commands:
IF you are running a "Command" rather than a job, just put the %%var in your command line.
For an imbedded script in your "OS" job. First go to the "Set" tab in your job an create PARM1 and give it a value. Then use "$1" in your unix script or %1 in Windows bat, and you will get whatever you placed in your PARM1. You may do the same thing for PARM2 and so on.
BUT you seem to be getting the values from somewhere and want to create the PARM1 "on the fly". You will have to create a global or table variable using the control-m "setvar" command in one control-M job. And then in the job that runs the script Set tab will set PARM1 to %%WhatYouSet. It is round-about, but it will work.
Now, how to set the Execution node. I cannot help you there. %%vars will NOT work in the Execution Node ID field.
You COULD have the job which sets the %%WhatYouSet parm set a Condition which releases a cyclic job just waiting to run on that server. BUT you would have to have one cyclic job waiting for each possible server. How many possilbe servers? The overhead of cyclic jobs waiting for a condition is pretty low so this might work for you.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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