variable to get DataStage Home directory path

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vganeshk
Participant
Posts: 3
Joined: Sun Mar 09, 2008 11:45 pm

variable to get DataStage Home directory path

Post by vganeshk »

Hi,

I am trying to write a routine where it has to execute dsadmin command from DataStage Home directory (which is on Unix box). For this requirement first I need to find directory of DataStage home directory, is there any variable or option where it retrieves DataStage home directory (otherthan using $DSHOME) ?

I see there is something called %SERVERPATH% variable under 'job properties' -> 'Dependency' tab, how this is going to help ?

Regards,
Ganesh
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are you trying to achieve by invoking a sparsely documented command from a routine? If you're in a routine System(32) may be easier than hacking around with 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.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

How about using system variable @PATH.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or perhaps you could do the same thing dsenv does:

Code: Select all

cat `./dshome`
-craig

"You can never have too many knives" -- Logan Nine Fingers
JITeam
Premium Member
Premium Member
Posts: 17
Joined: Mon Mar 24, 2008 9:43 am

Post by JITeam »

@PATH - takes me to the Project directory, not datastage home directory.
'cat /.dshome' from dsenv - there is no file created with name .dshome in the root directory, because of permission problem.

Any other possible options ?

Regards,
VGaneshK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? What DataStage version and O/S? My dsenv file uses that cat command to set $DSHOME, how is it done in yours?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

On sites with multiple DS instances there won't be a /.dshome file. I would prefer to stick with the simple, time-proven method that Ray suggested, "System(32)".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

However, you appear not to have noticed that the cat command was surrounded by back-quotes, not single-quote characters.

(System(32) remains the easiest approach.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ArndW wrote:On sites with multiple DS instances there won't be a /.dshome file. I would prefer to stick with the simple, time-proven method that Ray suggested, "System(32)".
Ah. Thanks.

However, curious about the 'because of permissions problems' statement. :?
-craig

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