How can we connect datastage jonb to different db2 instances ?
eg : 1 job uses db2 instance a and 1 job uses db2 instance b
Is it possible to modify dsenv to set variable DB2INSTANCE ?
at first glance, it seems that this shell is executed only once when datastage server is set up, and not each time a job is started.
multiple instances of Db2
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 16
- Joined: Fri Aug 08, 2003 3:30 am
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The job itself can set an environment variable. So can an active stage.
In the Transformer stage that drives the connection to DB2, set up ExecTCL as a before-stage subroutine (in the Stage Properties window), and put the an ENV command into the Input Value field. The ENV command to set an environment variable has the syntax:
You can also:
In the Transformer stage that drives the connection to DB2, set up ExecTCL as a before-stage subroutine (in the Stage Properties window), and put the an ENV command into the Input Value field. The ENV command to set an environment variable has the syntax:
Code: Select all
ENV SET variable=value
Code: Select all
ENV CLEAR variable
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What do you mean by another variable? Another environment variable?
If you do this in a job control routine, you would invoke the command using the PERFORM statement (or via a call to DSExecute). Since controlled jobs run as child processes of control jobs, they inherit their parents' environment variables.
Or you can set them in the individual jobs, as advised earlier.
If you do this in a job control routine, you would invoke the command using the PERFORM statement (or via a call to DSExecute). Since controlled jobs run as child processes of control jobs, they inherit their parents' environment variables.
Or you can set them in the individual jobs, as advised earlier.
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.