$ENV issue
Moderators: chulett, rschirm, roy
$ENV issue
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?
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?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
$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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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]
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