Using Environment Variables

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

danjm wrote:I'm understanding the 'bottom line' to be that DS does not use 'operating system environment variables' at all then (IE: it does not read and use their valuest at runtime)
Oh, trust me, they do!

Just not the ones YOU want to use for your jobs. Just the ones they uses for their own engine.

But then it makes the job much more portable. The way Windows handle their environment variables are entirely different than the way UNIX handle their. A job is expected to be able to run on both platform with VERY MINOR changes.
If I have to edit the job to use modified environment variables then there is no advantage over simply modifying string values in the job! I've still modified the job so I have no guarantee of tested repeatability at runtime. Once you edit ANYthing, you've possibly altered something else unintentionally.
This is what a job parameter is for. To allow you to pass on to the job any difference in values you want to employ for that particular run without recompiling the job itself. You can pass different values using a third party scheduler tool, or with Parameter Manager as plugged by someone else in this thread. Just do not expect that the job parameter values will change when migrated between projects, at least for now.

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
danjm
Participant
Posts: 34
Joined: Tue Sep 09, 2003 8:44 am
Location: Canada
Contact:

Post by danjm »

Just an update for anyone who's still watching. I placed a support request with Ascential for assistance/direction on this matter. They indicated that they have seen some instances where environment variables are appearing to be 'ignored' so will look into what I'm trying to do and get back to me. I will update everone again when I hear something further.
Happy New Year to everyone!!
Dan Marshall
Alberta Education
Edmonton, AB
danjm
Participant
Posts: 34
Joined: Tue Sep 09, 2003 8:44 am
Location: Canada
Contact:

Post by danjm »

Latest...
Ascential engineer indicates:
"I have read your problem again and can recreate it. In order for the job to pick up the changes that were made in the Administrator you would have to delete the parameter in the job and re-add it through the Add Environment Variable setting.
This is a known issue and has been entered as ecase 18178."

I've asked what they are planning for this case and when we might expect to see some different behaviour in the product. When I hear back, I will share that response with everyone here.

Happy New Year everyone. See you all in '04!
Dan Marshall
Alberta Education
Edmonton, AB
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Using Environment Variables

Post by bigpoppa »

A work around:

Set your global env vars in a file. Source that file in a new "osh" executable in the PX bin directory.

- BP
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Re: Using Environment Variables

Post by Teej »

bigpoppa wrote:Set your global env vars in a file. Source that file in a new "osh" executable in the PX bin directory.
Woah. Can you please expand on this?

Are you saying that for our specific global variables, make a shell script (equivalent to .profile) out of it, and put it in $pxhome/bin directory?

Is it possible to reference it anywhere else? Say, in a project-specific directory? Or is that set while DataStage Server starts up?

I'm trying to understand the scope of this idea -- is it yet another dsenv-equivalent file, or what?

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
Sohail
Participant
Posts: 10
Joined: Wed Jul 02, 2003 3:08 pm
Location: USA

Re: Using Environment Variables

Post by Sohail »

There should be a file in your project directory the name of the file is "DSParams", this contains all the environment variables which you define using Administrator. The format of each variable defined is given below, in this format 6th item is <SetAction>, please see following different options to reset the variables. I have included an example of LD_LIBRARY_PATH which is set to 3, please let me know how it goes:)

******** Extract from DSParams file ********

* Contains environment variable definitions that can be set for DataStage jobs
/* Format is: <EnvVarName>\<Category>\<JobType>\<Type>[+]\<Default>\<SetAction>\ <Scope>\<PromptText>\<HelpText>


/* <SetAction> What action should be taken when setting the environment variable at job run time:
/* 0 = Always set if the environment variable has been overriden.
/* 1 = Only set the environment variable if its value is different to its default
/* 2 = Explicitly unset the environment variable if the value is set to the default, otherwise same as 1
/* 3 = Always set the environment variable

For Example
LD_LIBRARY_PATH\General\-1\DirPath+\/usr/lib:/lib\3\Project\LD library path\
Post Reply