Page 1 of 1

1 question in Datastage assessment. help thanks.

Posted: Sun Jun 14, 2015 9:52 pm
by wuruima
Hi friend,

Which of the following is used to pickup values set in the operating system outside of datastage?

$env
$projdef
$unset
$dshome

Please help to give the answer.thanks so much.

I search in the network but still cannot get the answer.

Re: 1 question in Datastage assessment. help thanks.

Posted: Sun Jun 14, 2015 9:53 pm
by wuruima
it's better if have some simple explaination.

Posted: Mon Jun 15, 2015 1:50 am
by ArndW
Note that environment variables are case sensitive and these are in uppercase.

Using $ENV in the parameter will make DataStage use the environment value of that variable at runtime.

Posted: Mon Jun 15, 2015 4:50 am
by priyadarshikunal
Just to note, From a communication from IBM, environment variables are not case sensitive anymore. 8.5 and prior versions had case sensitive environment variables but that behaviour has been changed in 8.7. We figured that out when migrating a project from 7.5.3 to 8.7. But that doesn't change the answer Arnd posted.

Posted: Mon Jun 15, 2015 8:25 am
by ArndW
priyadarshikunal - could you explain that? I am at 11.3 and see both upper- and lowercase environment variables in use; and UNIX has always and will always distinguish environment variables by case.

Posted: Mon Jun 15, 2015 6:14 pm
by ray.wurlod
Operating system environment variables ARE case sensitive.

Posted: Mon Jun 15, 2015 6:16 pm
by ray.wurlod
$ENV, $PROJDEF and $UNSET are not environment variables.

They are reserved tokens that can be provided as default values for job parameters that are environment variables.

Posted: Tue Jun 16, 2015 12:21 am
by priyadarshikunal
Yes, Unix environment variables are case sensitive. You mentioned a generalized comment, hence clarifying that the datastage environment variables are not case sensitive anymore.

Here is an excerpt from the mail sent by support.

To followup on our phone call, the migration had an issue with the duplicate definition of the environment variables due to the case sensitive definitions in 7.5.3. version 8.5 should not have an issue with the case sensitive references (usage) of the variables. You should be able to remove one of the variable definitions and migrate without updating all of the references in the job.

Posted: Tue Jun 16, 2015 12:26 am
by priyadarshikunal
and they have mention that, such behavior can not be changed to match older version. They might be converting everything to uppercase under the covers but not much idea on why or if they are even doing. I am not on datastage box at the moment to check if I can define lower case unix env variables in administrator and use $ENV to prove if its changed under the covers. But I think should be easy to find out.

Posted: Tue Jun 16, 2015 12:38 am
by priyadarshikunal
Another excerpt from same communication with IBM support...

At some point in 7.5.x, there was a bove to make environment variables case insensitive. Case sensitive environment variables was considered a bug under the case referenced with the following title:

"Make environment variable not case sensitive"

When using environment variables in a job using, ... if the env variable is specified with case difference (for eg: SubDir in the job properties and specified as subdir) ...

Recommendation:
8.7 is operating as expected by treating the environment variables as case insensitive. Please remove case sensitive duplicates from the 7.5.3 job or sequence before migrating it to 8.7.

Re: 1 question in Datastage assessment. help thanks.

Posted: Thu Jun 18, 2015 3:58 am
by wuruima
thanks all.