How to read Project environment variable in a Routine

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
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

How to read Project environment variable in a Routine

Post by reddy »

Hi guys,

I have a requirement to retrieve the value of a project parameter in a before/after routine.

I tried DSListEnvVars("PROJECT NAME"), but gives compilation error.

Any help is appreciated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

While you can use GetEnvironment() in PX, for BASIC you'll just need to DSExecute an "echo" of the variable.
-craig

"You can never have too many knives" -- Logan Nine Fingers
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

That works, thanks for the help
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Has the project parameter been passed to the job as a job parameter? If so you can use DSGetParamInfo() with DSJ.ME as the first argument.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshv
Participant
Posts: 11
Joined: Wed Feb 27, 2008 11:14 pm

Re: How to read Project environment variable in a Routine

Post by rameshv »

In unix read project environment variables
Post Reply