Adding enviornmental Variable

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Adding enviornmental Variable

Post by sjordery »

Hi All,

Can any body will suggest me ow to add enviornment variable in datastage parallel job.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Could you explain bit more on you question.
You can add User defined Variable through Datastage Adminstrator client.
And you can use the same in jobs, optionally with $PROJDEF default value.
$ENV is used to access the OS variables in you jobs.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Post by sjordery »

Hi,

Actually I want to assign some values to the enviornment variables from a particular job during run time and I want to refer these values in the sequence job.
please let me know whether it will work or not.
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

Post by Narayana »

you can create the env variable under user-defined category either in the job properties option or in the DS administrator and can pass defalut values during run time.
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Post by sjordery »

okay.
but there are several options avaliable in job properties like

1-general
2-parallel
3-compiler
4-operator specific
5-reporting

so please be specific how I have to add the enviornment variable.

I am using recent 7.5x ds version parallel job in unix platform.
Another thing can reffer these variables in sequence job.

please suggest me.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Go to parameters tab in job properties, you will find Add Environment Variable bottom right, click on that and hit on New. Follow the commands then.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? I don't believe the question as asked is being addressed:
sjordery wrote:Actually I want to assign some values to the enviornment variables from a particular job during run time
It's not about creating and using variables during runtime but about creating and setting variables during runtime.

Carry on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Adding enviornmental Variable

Post by ray.wurlod »

sjordery wrote:Hi All,

Can any body will suggest me ow to add enviornment variable in datastage parallel job.
Do you mean:
(a) add a new environment variable that a job can use as a job parameter?
(b) add an environment variable to a job as a job parameter?
(c) change the value of an environment variable while a job is running?
(d) something else?

The first requires use of the Administrator client or editing the EnvVarDefns section of your DSParams file (which has implications for promoting into test/production).

The second involves clicking the Add Environment Variable button in the job's properties (Parameters tab).

The third is unsupported.

The fourth involves you responding to this post.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Post by sjordery »

Hi Wurlod,

Sorry for late reply.

Actually I want to pass values of some attributes to the enviornmental variable in a parallel job so that I can reffer these values in the sequence job to use in the email notification activity.

So will you please tell me for this purpose how I have to add the enviornmental variable and pass the values to those variables.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Isn't that (c) in Ray's list? If so, you're going to need to take another path.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Post by sjordery »

Hi Craig,

About which path you are telling.
Please mention
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Forget about my 'path' statement. You need to resolve the confusion about what exactly it is you are trying to accomplish. Ray posted a list of four possible meanings - which one is correct? Any? None? :?

To me, it sounds like (c) which is the third item in his list and as mentioned, it is unsupported. Hence my assertation that - if (c) is the answer - you'll need to find another way to solve your problem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Post by sjordery »

Hi,
You can take the option (d) (something else)from ray's given options..
Actually I want to assign values to the ENV from a job.
And that value will be reffered in the sequence job.
If without ENV my problem can be solved then please suggest.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Its similar to passing values between jobs. Write your value to a flat file and in the sequence job activity, define a parameter to the job that needs to read that value. In the derivations you can call a small routine that cats the file and reads its contents using DSExecute().
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

sjordery wrote:You can take the option (d) (something else)from ray's given options.. Actually I want to assign values to the ENV from a job.
Umm... that's (c).

As noted, pass this value via a flat file or User Status.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply