Page 1 of 1

Environment Variable- Refresh

Posted: Sun Jan 07, 2007 10:54 pm
by Munish
Hi Everybody,
We are using environment variables for
1. Database related values like Server Name, UserID, Password etc.
2. Files related activities, InputPath, Out Put Path etc.

Everything was fine till now.

We were expecting that we can modify the values of Env values and that can be reflected in our jobs.
However it seems that eventhough the env values are changed but they are not refreshed in our jobs.

Do we need to restart DS once we modify the Env values.
Or there is anything we are missing.

Any input will be highly appreciated.

Thanks and regards,
Munish

Posted: Sun Jan 07, 2007 11:08 pm
by I_Server_Whale
No. There is no need to restart the DataStage Services.

Once you change the values of the Env variables in the properties window of the administrator, are you clicking on "OK" button on the properties window? Only then will the change be registered.

Whale.

Posted: Sun Jan 07, 2007 11:16 pm
by Munish
I tried that, but it is the same.

There are more than 50 odd jobs which will be using this variable.
If I delete and re-insert env variable, I could see new values otherwise it stores old value.

Still not sure, what might be happening.

Any other thoughts!!!!

Posted: Sun Jan 07, 2007 11:18 pm
by narasimha
What are you using as the default value?
If you use $PROJDEF, you should be fine

Posted: Sun Jan 07, 2007 11:24 pm
by Munish
Thanks Narasimha,
We were using hard coded value.
We have about 12 different env variable.
So if one job is using all of these variables
we should have $PROJDEF as default for every variable.

Cheers,
Munish

Posted: Sun Jan 07, 2007 11:30 pm
by I_Server_Whale
Munish wrote: We have about 12 different env variable.
So if one job is using all of these variables
we should have $PROJDEF as default for every variable.
Exactly, you need to use $PROJDEF.

Posted: Sun Jan 07, 2007 11:46 pm
by Munish
Thanks, I will give it a go.

Regards,
Munish

Posted: Mon Jan 08, 2007 2:55 am
by Munish
Hi,
I tried using $PROJDEF as default but DS takes it as string.
Is there anything else to do other than writing $PROJDEF for default value.

Thanks,
Munish

Posted: Mon Jan 08, 2007 5:14 am
by ray.wurlod
$PROJDEF must be the default value for the job parameter, in the job.

The environment variable (set up in Administrator) must have a "genuine" default value - that is, not $PROJDEF, $ENV or $UNSET.

Posted: Mon Jan 08, 2007 8:01 pm
by Munish
Thanks Everybody,
It worked fine.
Regards,
Munish

Posted: Mon Jan 08, 2007 8:39 pm
by narasimha
Good to know. :)
Can you share, as to why it was going wrong ?

Posted: Wed Jan 10, 2007 6:14 pm
by Munish
Hi,
'$PROJDEF' is working fine.
However it is not working with Passwords.

For encrupted password environmen variable, I have to delete and reload the environment variable.

Any Thoughts !!!!

As for Narasimha, I am not sure why it did not worked initially. I restarted my Datastage and it was bang on.


Thanks,
Munish

Posted: Wed Jan 10, 2007 7:24 pm
by DSguru2B
Read Ray's reply about encrypted passwords here.

Password can be set with $PROJDEF

Posted: Thu Jan 11, 2007 3:05 am
by arnabdey
Hi Munish

I think you brought up the issue of not being able to use the password with $PROJDEF in some other place. You can do one thing.... Whenever you type the default value for password, type it as $PROJDEF only. You will be able to enter it in encrypted format only (*s). But you can use that.

Posted: Thu Jan 11, 2007 6:15 am
by ray.wurlod
You can use cut-and-paste. Put $PROJDEF into the Description field (clear), cut it from there (Ctrl-X) and paste it (Ctrl-V) into the Password or Default Value field.

I presume you're aware that to enter a default value for an encrypted parameter you have to double-click in the Default Value cell to open the dialog where you have to enter the value twice?