When Unix script starts, it spawns its own session. That is, it runs in its own environment. It will adopt some of the existing environment (that is accessible at the command line), but only the stuff that is exported.
For example, if I have 2 aliases (or variables or functions) - 1 is export, and 1 is not. The first will be available in the script, but the second will not.
You will need to source in the dsenv file within the script that calls orchadmin, as in the (very simple) example below:
Code: Select all
#!/usr/bin/ksh
. /opt/myAscentialDir/dsenv
ds_to_delete=$1
orchadmin rm -f ${ds_to_delete}
rc=$?
exit $rc
Please note, if $DSHOME is defined and exported in your .profile, then you could change the 2nd line of code to
Hope this helps,
Brad.