1 question in Datastage assessment. help thanks.

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

1 question in Datastage assessment. help thanks.

Post 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.
wuruimao
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Re: 1 question in Datastage assessment. help thanks.

Post by wuruima »

it's better if have some simple explaination.
wuruimao
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Operating system environment variables ARE case sensitive.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Re: 1 question in Datastage assessment. help thanks.

Post by wuruima »

thanks all.
wuruimao
Post Reply