Page 1 of 1

$Projdef

Posted: Wed Sep 07, 2005 3:34 am
by pongal
Hi,
i have read some posts regarding $Projdef project specific env variable.
i am not still understanding the use of $Projdef env variable.
how to use exactly this variable ?
i have created some env variables at dsadmin like
$Par_SrcFilePath
$Par_TrgFilePath
$Par_remoteUserID
$SRC_DBNAME etc where some of the env variables have values that does not change in all the environments (DEV,INT,PROD)
where can i define all the static env variables using $Projdef ?

Re: $Projdef

Posted: Wed Sep 07, 2005 3:50 am
by tusharzade
Hi Pongal,

$PROJDEF is a default value assigned in the job parameter of any Datastage job. Now consider the scenario where administrator wants to keep some password which should not be accessed by the developer. Then in this scenario administrator can set the password for Suppose DB login in a administraor for user defined varialble. Then You can use the same variable in your job but with the default value as $PROJDEF. So that whenever you administrator wants to change the password he do not need to inform you. Your job will take the value which is defined in the administrator.

Regards,
Tushar

Re: $Projdef

Posted: Wed Sep 07, 2005 5:32 am
by PhilHibbs
Which version of DS are you using? $Projdef doesn't work on 7.0.1.

Posted: Wed Sep 07, 2005 6:08 am
by pongal
i am using DataStage v 7.5.1a.
i have another doubt that using $Projdef, can we define any number of user defined env variables ?
how could we define the below user defined env variables having default values using $Projdef?
$Par_SrcFilePath
$Par_TrgFilePath
$Par_remoteUserID
$SRC_DBNAME

Posted: Wed Sep 07, 2005 4:21 pm
by trokosz
You define the user defined environment variables in Administrator. Now give them the values you want. Then when you create your Job in Designer you select those environment variables relevant that you defined....and for the value you say $PROJDEF or it gets the value entered in Administrator.

Now this comes to a big topic on how to change environment variables without entering dataStage....or creating a *.ini or *.config file that is inherited by DataStage.....but thats not what you asked but consider it.....

There is a known bug with $PROJDEF and that is if you use this technique and use the DRS Stage.....then then View data on the DRS Stage fails.....

Good luck

Posted: Wed Sep 07, 2005 5:49 pm
by vmcburney
There is a FAQ on this topic. You can read it at:
viewtopic.php?t=92038

Or you can view the modifiable version at:
http://wiki.ittoolbox.com/index.php/HOW ... _variables