parameter in a DB2/ODBC stage
Moderators: chulett, rschirm, roy
parameter in a DB2/ODBC stage
I use DB2 and ODBC stages all over the place. We usually have the exact same tables set up in both a "Test" area and a "Production" area. Right now, to switch between the 2, we have to go into each job, switch the "Server Name" and recompile. Is there a way to have that "Server Name" spot read a text file on the DataStage server each time? So we could just change that text file, and all jobs would automatically run from "Prod" instead of "Test", or vice-versa?
Eric
Re: parameter in a DB2/ODBC stage
Several different ways of doing that have been posted. Do a search on this forum and look e.g. at viewtopic.php?t=84590.
Ogmios
Ogmios
Re: parameter in a DB2/ODBC stage
ogmios wrote:Several different ways of doing that have been posted. Do a search on this forum and look e.g. at viewtopic.php?t=84590.
Ogmios
I checked out the topic you pointed me too. Thanks! I have to laugh. :> When we were first given this DataStage tool, we were told it was so simple, that the customers probably wouldn't need "programmers" any more. They could just use it themselves. The posts in that topic definitely lead me to believe otherwise. :> I haven't created my own function before in DataStage, but i'll see if i can use what was in that topic and create them.
Eric
Re: parameter in a DB2/ODBC stage
DataStage is also very good at retaining customers... try once in your life time moving around 2000 DataStage jobs to another ETL environment and then you'll be laughing
Ogmios
![Wink :wink:](./images/smilies/icon_wink.gif)
Ogmios
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: parameter in a DB2/ODBC stage
You can do this without any programming, by using job parameters. When you request a job run, you can provide non-default parameter values.EJRoufs wrote:I use DB2 and ODBC stages all over the place. We usually have the exact same tables set up in both a "Test" area and a "Production" area. Right now, to switch between the 2, we have to go into each job, switch the "Server Name" and recompile. Is there a way to have that "Server Name" spot read a text file on the DataStage server each time? So we could just change that text file, and all jobs would automatically run from "Prod" instead of "Test", or vice-versa?
Assuming that you have separate projects for DataStage development, testing and production, you can use the Director client to set appropriate defaults for each environment (Job > Set Defaults...).
Yet another possibility is to have your job parameters refer to environment variables, and set the values of the environment variables in a script or some such.
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.