DSHOME on Windows

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
adamski
Charter Member
Charter Member
Posts: 54
Joined: Thu Mar 20, 2003 5:02 pm

DSHOME on Windows

Post by adamski »

Hi All

I am wanting to derive the location of $DSHOME\Engine\bin in a routine on a Windows installation. However it seems that this environment variable $DSHOME (or eqivalent) does not exist, or I just cant find it. It is mkdbfile I need run.

I have found the variable "SPackagePath" which returns "E:\Ascential\DataStage\Package". I know I can manipulate this to get what I want, however is there a more direct method.

Thanks in advance.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Just create a systems variable DSHOME and enter E:\Ascential\DataStage\Engine\bin in the value field. Then you can use %DSHOME% in your routine the same way as you use the $DSHOME variable in Unix environment.
adamski
Charter Member
Charter Member
Posts: 54
Joined: Thu Mar 20, 2003 5:02 pm

Post by adamski »

Thanks lstsaur, however I have considdered this and would prefer a dynamic solution that does not require re-configuration between environments. Unfortunately they differ from server to server.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm not aware of any more direct method, which is why I documented the scriptbeginning from DSPackagePath. Gee, that was so long ago! I'd forgotten it! Must get around to changing the accreditation notice.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
adamski
Charter Member
Charter Member
Posts: 54
Joined: Thu Mar 20, 2003 5:02 pm

Post by adamski »

Thanks Ray

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

Post by ray.wurlod »

Actually, that's not the case. You could create a small function (exposed by OLE Automation) that read the relevant registry entry and returned the pathname contained therein.

If you're already in DataStage, the System(32) function returns the pathname.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply