Regarding EnvVariable

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Regarding EnvVariable

Post by das_nirmalya »

i want to use environment variable to specify the path, where the job create a log file through afterjob subroutine from job property.

i am using 1;$<env_var>/ as the input parameter in after job subroutine , but it is not working ,, pls tell me how can i fullfill the requirement
nsd
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Re: Regarding EnvVariable

Post by Krazykoolrohit »

das_nirmalya wrote: 1;$<env_var>/
Is this what you are writing in after-job subroutine? or is it a part of the command?

What does the above do?
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Re: Regarding EnvVariable

Post by sreddy »

Nirmalya


You can do like this. :idea:

Create an Environment variable $Projdef at DS Admin, put complete path where you kept the script.

That you have to use in JobProperty level
You can put at After Job Subroutine -- Input Value are.
SReddy
dwpractices@gmail.com
Analyzing Performance
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

To use job parameters in before/after job subroutines. You need to enclose them in a pair of # symbols. And it's the same even with environment variables added in job parameters. For instance, If you want to pass the value of an environment variable "foo" (added in job parameters) to a dummy script in /tmp you need to use:

Code: Select all

/tmp/dummy.sh #$foo#
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What precisely do you mean by "it is not working"? Without that information I am loath potentially to waste my time answering the wrong question.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Re: Regarding EnvVariable

Post by das_nirmalya »

Krazykoolrohit wrote:
das_nirmalya wrote: 1;$<env_var>/
Is this what you are writing in after-job subroutine? or is it a part of the command?

What does the above do?
yea , i have use this in after-job subroutine.
nsd
Post Reply