Page 1 of 1

pass environment variable in value file of parameter set

Posted: Tue Feb 25, 2014 2:16 am
by bhaskarjha
Hello,
We have a scenario where same job is used to load two database tables in different environment (for disaster recovery).
We have used parameter set & have created parameter value file to achieve this. For now we are passing $PROJDEF for SYSA & hardcoded values for SYSB parameter.
Parameter Set looks like below
$LogDir $TempDir
SYSA $PROJDEF $PROJDEF
SYSB /app/Proj_SYSB/Log /app/Proj_SYSB/Temp
Now we do not want hardcoded values.

We have created another environment variables for SYSB & tried passing like below
$LogDir $TempDir
SYSA $PROJDEF $PROJDEF
SYSB $LogDir_SYSB $TempDir_SYSB
But this is not working - error unable to resolve $LogDir_SYSB

Posted: Tue Feb 25, 2014 3:37 am
by ray.wurlod
It is not permissible what you are trying to do. DataStage does not include the ability to use one environment variable with the value of another.

You might be able to accomplish it within a sequence, but you'd have to read the values of $LogDir_SYSB and $TempDir_SYSB into, for example, activity variables and use those to provide the values for the $LogDir and $TempDir job parameter environment variables in a Job activity.