I want to add new parameter to all jobs like owner_stg. Also, I want to modify user defined query with #owner_stg# and table name in the target. Please advise if there any easy way to do this. I have around 500 jobs in a folder.
Thanks,
Moses
Add new parameter to all jobs
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Get Parameter Manager for DataStage.
You can find out about it from here
You can find out about it from here
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
There is a way to do it by exporting the folder to a sequential file and adding the parameter using search and replace commands in MS Word.
In an export file find a parameter that is in all jobs, it looks something like this:
In MS Word search and replace part of that text string to add a marker to each parameter section to indicate where the new parameter will go. In Word you can use ^p to find and replace end of line characters.
Now replace the |ZZ| with the new parameter.
Should give you this before each job in the export file:
Not as good as parameter manager. There is a good chance that this could corrupt your export file so don't go overwriting anything you haven't got backed up!
In an export file find a parameter that is in all jobs, it looks something like this:
Code: Select all
BEGIN DSSUBRECORD
Name "CODE"
Prompt "Enter a code"
Default "MONARO"
ParamType "0"
END DSSUBRECORD
Code: Select all
Find: BEGIN DSSUBRECORD^p Name "CODE"
Replace With:|ZZ|^p BEGIN DSSUBRECORD^p Name "CODE"
Code: Select all
Replace:|ZZ|
With: BEGIN DSSUBRECORD^pName="NewParamName"^pPrompt="New Prompt"^pDefault="Whatever"^ParamType=0^pEND DSSUBRECORD
Code: Select all
BEGIN DSSUBRECORD
Name "NewParamName"
Prompt "New Prompt"
Default "Whatever"
ParamType "0"
END DSSUBRECORD
BEGIN DSSUBRECORD
Name "CODE"
Prompt "Enter a code"
Default "MONARO"
ParamType "0"
END DSSUBRECORD
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn