Add Parameter - Script

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Add Parameter - Script

Post 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
AshishDevassy
Participant
Posts: 32
Joined: Fri Nov 07, 2014 11:18 am

Post 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.
that's wierd ?
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Thanks for the details. Identifying the patterns and writing script for dsx will be very complex. Is it any other suggestion?
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post 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.
trenicar
Premium Member
Premium Member
Posts: 51
Joined: Thu Sep 18, 2003 4:38 am

Post 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
trenicar
Premium Member
Premium Member
Posts: 51
Joined: Thu Sep 18, 2003 4:38 am

Post by trenicar »

This is a link to a series of perl scripts that can help
viewtopic.php?t=113429
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, good to know. And?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply