Page 1 of 1

Difference between $ENV and $PROJDEF

Posted: Fri Apr 09, 2010 8:36 am
by dodda
Hi All,

Can anyone tell me the difference between $ENV and $PROJDEF values specifying for the environmental variables.

Posted: Fri Apr 09, 2010 8:56 am
by DSguru2B
$ENV gets the parameter value from the environment (env. wide). $PROJDEF get the value set in the project via the administrator (project wide).

Posted: Fri Apr 09, 2010 9:17 am
by dodda
Thanks DSGuru.

Could you please be more specific. If possible can you explain with an example

Posted: Fri Apr 09, 2010 3:40 pm
by Ananda
Environment variables like APT_CONFIG_FILE are specific for that datastage server on which many projects are running.

Whereas $PROJDEF which is mostly used for passwords is project specific which is set through Administrator.

Posted: Fri Apr 09, 2010 6:25 pm
by ray.wurlod
When a UNIX process runs it runs in a shell in which there are some shell variables and environment variables defined. Exported environment variables are available to any sub-shells invoked from that shell.

When you run a DataStage job, your shell starts a number of sub-shells. Some of these run uv, uvsh, dssh or osh. Any of these has access to the exported environment variables. The special default value $ENV is an instruction to obtain the actual default value from the exported environment variables available to the shell.

Each DataStage project can have a list of other environment variables defined. These are configured in the Administrator client and stored in the DSParams file for that project. These environment variable values are the ones that are accessed via the special default value $PROJDEF for a job parameter environment variable.

To complete the picture there is a third special value $UNSET which instructs the job to unset the environment variable unless a non-default replacement value is supplied. This is useful for those environment variables that switch on diagnostics/tracing if they are set.

Posted: Sat Apr 10, 2010 8:45 am
by dodda
Thanks ray for the information