How to call environment variable in DB2-Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 51
- Joined: Fri Nov 07, 2008 8:03 pm
How to call environment variable in DB2-Stage
Hello!!!
has some one allready setting up the environment variables in the Administrator and then call the Database globales Parameters into a DB2-Stage without problem?
Sequentiel file and all other stages work well with my environment variables calling in this Stage. Only DB2-stage did not work well. To contourn the proble I'm oblige to set "server-name", "Userid", and "Password"-Parameters als Job parameters to run the job correctly. What is not gut. Because thise parameters must be define als Global Parameters.
Any Ideas will be very Helpful.
Thank' once more fore haven been given back your Idea. After populate the Target table I will say you if all work other no.
has some one allready setting up the environment variables in the Administrator and then call the Database globales Parameters into a DB2-Stage without problem?
Sequentiel file and all other stages work well with my environment variables calling in this Stage. Only DB2-stage did not work well. To contourn the proble I'm oblige to set "server-name", "Userid", and "Password"-Parameters als Job parameters to run the job correctly. What is not gut. Because thise parameters must be define als Global Parameters.
Any Ideas will be very Helpful.
Thank' once more fore haven been given back your Idea. After populate the Target table I will say you if all work other no.
Yollson Empereur
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Introduce the environment variables into your job as job parameters (or in a parameter set), then use job parameter references within your DB2 Enterprise stage or DB2 API stage.
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: 51
- Joined: Fri Nov 07, 2008 8:03 pm
hello,ray.wurlod wrote:Introduce the environment variables into your job as job parameters (or in a parameter set), then use job parameter references within your DB2 Enterprise stage or DB2 API stage. ...
thanks for your Reply. Is there an other way to do this, differently from the way you advise it to me? Because, before calling in DB2-Stage or into ORACLE-Stage any parameters, this must be introduice in Job-Parameters tab of the Job Properties.
All my environment parameters are already introduice in this Job parameters. That is the reason this work well in other stage like Sequentiel file and so one.
The probleme is that, after seting up environment parameters(server_name, UserId, PWD) connexion to database in administrator and calling this in DB2-Stage like this: #$server_name#, #$UserId#, #$PWD# , runing the Job failed.
But by setting the same parameters als Job parameters and call this like this:#server_name#, #Userid#, #pwd# , runing the Job succeeded.
Perraph's I'm making some thingh wrong. But like I say. The same setting in Oracle_stage which failed down in DB2-stage, work very well. Is there an other way to do this fur DB2-Stage?
Yhank's for any Idea in advance.
Yollson Empereur
Failed how?yollsonlegrand wrote:The probleme is that, after seting up environment parameters(server_name, UserId, PWD) connexion to database in administrator and calling this in DB2-Stage like this: #$server_name#, #$UserId#, #$PWD# , runing the Job failed.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 51
- Joined: Fri Nov 07, 2008 8:03 pm
I receive the followed Message Error:'DSTAGE-DB2CLI-0005': Unable to connect to DB@ server ' NOTLIKELYDSCAPIOP_$PS_DBPTTSOURCENOTLIKELY'.,chulett wrote:Failed how?yollsonlegrand wrote:The probleme is that, after seting up environment parameters(server_name, UserId, PWD) connexion to database in administrator and calling this in DB2-Stage like this: #$server_name#, #$UserId#, #$PWD# , runing the Job failed.
by running the Job with following parameters: #$server_name#, #$UserId#, #$PWD#. But if I set the same parameters als Job parameters all work well.
And I did another test by setting all the other stage(Sequentiel file, Lookup Set file etc..) with the environment parameters and only the DB2-Stage with the local parameters(job parameters). the job work very well.
Thank's for any Ideas
Yollson Empereur
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
You're SOL my friend. Those pesky IBM Developers didn't make environment variables work for all stages of a given job which limits the utility of environment variables for use in any DS job.
Bummer. Perhaps there is a DB2 patch?
The giveaway is seeing the DSCAPIOP_.
DataStage is not resolving this to a parameter value at runtime. It's not recognizing it as a parameter. We have the same problem with Teradata API stage. We're testing a patch.
Bummer. Perhaps there is a DB2 patch?
The giveaway is seeing the DSCAPIOP_.
DataStage is not resolving this to a parameter value at runtime. It's not recognizing it as a parameter. We have the same problem with Teradata API stage. We're testing a patch.
-
- Participant
- Posts: 51
- Joined: Fri Nov 07, 2008 8:03 pm
-
- Participant
- Posts: 51
- Joined: Fri Nov 07, 2008 8:03 pm