Can any one explain the below Unix command ??

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
skhan2@gmx.us
Participant
Posts: 12
Joined: Wed Oct 07, 2015 4:14 am
Location: BANGALORE

Can any one explain the below Unix command ??

Post by skhan2@gmx.us »

Can any one explain the below Unix commands for the DataStage Jobs ??

. /export/dsadm/sdgw/.profile

dshome=`cat /.dshome`
export PATH=$PATH:$dshome/bin

HOME=/export/dsadm/sdgw/
export PATH=$PATH:$HOME
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, lots of people I'll bet. Doesn't anyone where you work 'speak UNIX' that could help you? Nothing about that is really all that specific to DataStage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

. /export/dsadm/sdgw/.profile
The "period space filename" is saying "execute the following file and activate any changes it makes to environment variables in the current session." This is usually called "sourcing" a profile because the source command can be used instead of the "period". That file probably contains some environment variable settings that are commonly used (or required).

dshome=`cat /.dshome`
The hidden file ".dshome" is located at the root of any server that contains a valid DataStage engine. Its contents are the path to the DataStage engine location on that server (usually something like /opt/IBM/InformationServer/Server/DSEngine). The back quotes are special, and mean "execute the command inside and place what it returns here". So it sets the temporary environment variable dshome to the path to the DataStage engine.

export PATH=$PATH:$dshome/bin
The /bin sub-directory underneath DSEngine contains commands some developers like to use in scripts. This puts the full path in the PATH variable so that the commands are available no matter where you are located .

HOME=/export/dsadm/sdgw/
export PATH=$PATH:$HOME

It looks like someone stores some common commands in /export/dsadm/sdgw/ and also wants those in the PATH variable so they are executable no matter which where you are currently located.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Andy, Andy, Andy... taking all the fun out of learning to fish. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply