Page 1 of 1

Add Parameter - Script

Posted: Tue Mar 31, 2015 7:51 am
by oacvb
Hi,

I have around 200 Jobs, How to add a parameter (Same parameter) in all 200 jobs. We would like to do it either through script or batch file. Any suggestion please

Posted: Tue Mar 31, 2015 8:05 am
by AshishDevassy
Here is what you can try.
Take the DSX of all the jobs. If you open the DSX in the edit mode the section of declaration of Parameter sets is towards the beginning (and its a standard kind of declaration).
You can probably write a simple shell script to edit the DSXs and add these lines. Hopefully that should do the trick.

Posted: Tue Mar 31, 2015 9:53 am
by oacvb
Thanks for the details. Identifying the patterns and writing script for dsx will be very complex. Is it any other suggestion?

Posted: Tue Mar 31, 2015 10:03 am
by PaulVL
Why are you adding a parameter to 200+ jobs and not modifying the job design?

Are you planning on affecting ALL jobs in that project or just 200 out of 500 (or so)?

If you want to affect all jobs in the project, just modify the project env variables.

It would help us if you explained what you plan on doing and what that parm is.

Posted: Wed Apr 01, 2015 2:37 am
by trenicar
There was a script to do this written and made available , you may be able to look it up on DSxchange - see below

Script Name: ReplaceParameterBlock.pl
# Author : John Miceli
# Create Date: 10/10/2006

Posted: Wed Apr 01, 2015 2:50 am
by trenicar
This is a link to a series of perl scripts that can help
viewtopic.php?t=113429

Posted: Mon Jun 01, 2015 11:02 am
by oacvb
I am trying to add parameter only for specific jobs in a project. We are going to migrate jobs from Cluster to Grid, hence we need to add parameters. This is going to be in phases.

Posted: Mon Jun 01, 2015 11:32 am
by chulett
OK, good to know. And?

Posted: Mon Jun 01, 2015 3:13 pm
by ray.wurlod
It should take about a minute per job to do manually, so you could do all 200 in about half a day. This is almost certainly less time than you would spend faffing around creating scripts.