$ENV issue

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
ajit
Participant
Posts: 16
Joined: Wed Oct 05, 2005 7:43 am

$ENV issue

Post by ajit »

Hi
I have a parameter say test_var1 which I defined in the DataStage Adimistrator to a particular value (say 10). When I use it in a job say jobx, during its design, I imported it from Environment Variable and set the value to 20 and then run the job successfully.
Now in another job say joby, I imported the same environment variable during design time, and set its default value to $ENV. So now when I run the job the value I get for the variable is 20. But when I try to run the job subsequently, without any change in the job, the job aborts with the message
Missing Parameters $test_var1 [$ENV]
Can anyone please help me by explaining why is this?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

$ENV tells DataStage to load the value from the executing user's operating system environment - you would have had to set up the environment variable in that user's .profile file, for example.

To have DataStage load the value you set up in the Administrator, make the default value of the job parameter $PROJDEF.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I agree, $PROJDEF tends to be more reliable than $ENV as it is all centralised in one place (the Administrator and the DSPARAMS file) and it can use DataStage encryption for passwords. One of the first Director log messages is a list of environment variables for that instance of the job and it is useful for debugging problems such as these.
Munish
Participant
Posts: 89
Joined: Sun Nov 19, 2006 10:34 pm

Post by Munish »

Hi,
I faced the same problem but get it sorted out using '$PROJDEF'.
However, '$PROJDEF' doesnot work with passwords.

Any suggestions !!!!

Thanks
Munish
MK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Upgrade to a version in which $PROJDEF does work with encrypted parameters. Make sure that the environment variable is defined (in Administrator) as encrypted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Munish
Participant
Posts: 89
Joined: Sun Nov 19, 2006 10:34 pm

Post by Munish »

Hi Ray,
We are using Datastage 7.5.2,
Which version is compatible with encrypted password env variables.

Or
Do I need some plugin?

Thanks and regards,
Munish
MK
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

We are using Datastage 7.5.2,
Which version is compatible with encrypted password env variables.
- It works fine with 7.5.1A, not sure why it is not available in 7.5.2

Do I need some plugin?
- No
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

I am using 7.5.1A EE on Linux; encrypted password works just great.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

lstsaur wrote:I am using 7.5.1A EE on Linux; encrypted password works just great.
I guess that confirms its existance in 7.5.1A

Now... did they take it away in 7.5.2 :roll:
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
arnabdey
Participant
Posts: 50
Joined: Wed Jan 10, 2007 5:56 am

Post by arnabdey »

Hi Munush

We can use passwords (ie encrypted data formats) with $PROJDEF. I have used it. You just need to imprt the variable and in the encrypted format itself (ie with *s) you need to enter $PROJDEF. I am sure it will work.

Arnab

[quote="Munish"]Hi,
I faced the same problem but get it sorted out using '$PROJDEF'.
However, '$PROJDEF' doesnot work with passwords.

Any suggestions !!!!

Thanks
Munish[/quote]
Arnab
Post Reply