How to use an Environment Variable into Userdefine routine
Moderators: chulett, rschirm, roy
How to use an Environment Variable into Userdefine routine
Is it possible to use an Environment Variable into any User Define Datastage routine.If so then please help me by a piece of code as an example.
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
If you have a job attached inside the routine:
Code: Select all
DSGetParamInfo(hJob1, "$VarName", DSJ.PARAMDEFAULT)
where hJobName is the job attached using DSAttachJob
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is also the "UniVerse" command ENV (that you might execute using DSExecute subroutine), which will return all environment variables, and you could process that string with FINDSTR to locate the one(s) in which you're interested.
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.
How about running the job and assigning that environment variable as a parameter to it?
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org