Page 1 of 1

dsenv & orchadmin

Posted: Tue Feb 27, 2007 1:34 pm
by njanopoulos
I am running the following Unix commands via a DS Routine:

cmd=". /dm/Ascential/DataStage/DSEngine/dsenv; orchadmin ls myfile.ds"

I am getting the following error:

SH: orchadmin: not found

When I run the same command (as the same user) at a Unix command line, everything works fine.

What is different in the DS logon that would cause something like this?

Posted: Tue Feb 27, 2007 3:42 pm
by DSguru2B
Welcome Aboard,
Dont you have to give the fully qualified path of myfile.ds ???

Posted: Tue Feb 27, 2007 3:52 pm
by njanopoulos
You are correct - I took the path out for the post because it is very long. I should have put something in its place. Assume a fully-qualified path before 'myfile.ds'.

Posted: Tue Feb 27, 2007 4:01 pm
by ray.wurlod
The orchadmin command is in $APT_ORCHHOME/bin - I'm prepared to bet this is not in your PATH.

To use orchadmin you need APT_CONFIG_FILE set also. This is usually not set in the dsenv script.

Posted: Thu Mar 01, 2007 2:08 pm
by njanopoulos
Both PATH and APT_CONFIG look good. I'm wondering now if it is .profile related.

Posted: Thu Mar 01, 2007 4:15 pm
by lstsaur
No, it's not a problem with .profile. As Ray said you also must set the APT_CONFIG_FILE variable.

Posted: Thu Mar 01, 2007 7:11 pm
by ray.wurlod
Does PATH contain $PXHOME/bin ?

Posted: Thu Mar 01, 2007 8:10 pm
by csrazdan
Execute following commands before you use orchadmin utility

# Set DataStage Environment
$ cd `cat /.dshome`
$ . ./dsenv

# Add PXEngine lib path to LIBPATH variable
$ export LIBPATH=$LIBPATH:$APT_ORCHHOME/lib

# Add PXEngine bin path to PATH variable
$ export PATH=$PATH:$APT_ORCHHOME/bin

# Optional - You may also want to set configuration file if you do not want orchadmin to use the configuration file from the DataSet descriptor file.
$ export APT_CONFIG_FILE=/opt/tools/ds/Ascential/DataStage/
Configurations/<Your Configuration file name>


Now execute the orchadmin command.
$ orchadmin check

NOTE: You will have to give full path of the DataSet descriptor file in the orchadmin command.

Hope this helps....

Posted: Thu Nov 29, 2007 10:54 am
by ZDC
Hi csrazdan,

I tried it and it worked

cheers,
ZDC

Posted: Thu Oct 21, 2010 2:18 am
by asyafrudin
Glad I found this post. I'm also having problems executing orchadmin and the steps below really solved my problems. All I need to change was the path for APT_CONFIG_FILE to match with the location of my configuration file.
csrazdan wrote:Execute following commands before you use orchadmin utility

# Set DataStage Environment
$ cd `cat /.dshome`
$ . ./dsenv

# Add PXEngine lib path to LIBPATH variable
$ export LIBPATH=$LIBPATH:$APT_ORCHHOME/lib

# Add PXEngine bin path to PATH variable
$ export PATH=$PATH:$APT_ORCHHOME/bin

# Optional - You may also want to set configuration file if you do not want orchadmin to use the configuration file from the DataSet descriptor file.
$ export APT_CONFIG_FILE=/opt/tools/ds/Ascential/DataStage/
Configurations/<Your Configuration file name>


Now execute the orchadmin command.
$ orchadmin check

NOTE: You will have to give full path of the DataSet descriptor file in the orchadmin command.

Hope this helps....