Issue with cron job

Hi,

I have a script which I am able to run from command line. When I put this in cron, it fails and gives the following message:

ld.so.1: /d00/documentum/product/5.2.5/bin/dmbasic: fatal: libdmcl40.so: open failed: No such file or directory

The ksh script looks like this:

# Set this variable during installation
PFMS_HOME=/home/pfmstest
. $PFMS_HOME/methods/SET_METHOD_ENV

LOGFILE=$EXECDIR/render_objects.log

# Get the date for recording in the logfile
date +"%m/%d/%Y %T" | read current_date

# If there are no arguments call the render_objects.bas and enter the correct
# function.
if [[ $# -eq 0 ]]
then

echo "\\nExecuting render_objects at $current_date" >> $LOGFILE
$DM_BIN/dmbasic -f $EXECDIR/render_objects.bas $EXECDIR/StringUtils.bas -e EntryPoint -p $DOCBASE $DOCBASEOWNER >> $LOGFILE

elif [[ $# -eq 1 ]]
then
echo "\nExecuting render_objects for one Object ID: $1 at $current_date" >> $LOGFILE
$DM_BIN/dmbasic -f $EXECDIR/render_objects.bas $EXECDIR/StringUtils.bas -e EntryPointOneItem -p $DOCBASE $DOCUMENTUMOWNER $1 >> $LOGFILE

else
echo "Usage: render_objects.ksh [object_id]" >> $LOGFILE
exit 1
fi

# Exit Status
exit $?

Any ideas/suggestions.

Thanx

You have an environment variable in your command-line shell. Do this:

echo $LD_LIBRARY_PATH

That is where dmbasic is getting its function from... somewhere in the LIBRARY_PATH.

In your shell script above then, you would put:

export LD_LIBRARY_PATH=THE_STUFF_THAT_THE ECHO_COMMAND_SHOWED_YOU

Put that right after the #!/bin/ksh line... or anywhere near the beginning of your script.
-Mike