Page 1 of 1

dsrecords not found

Posted: Tue Jan 20, 2015 9:16 pm
by phanikumar
Hi,

I am trying to execute the following shell script from my job sequence

#!/bin/sh
cd /proj/DataSets/
Count=`dsrecords Test.ds |awk -F ' ' '{ print$1 }'`
if [ "$Count" == 0 ]; then
echo "PREVIOUS"
else
echo "CURRENT"
fi;

Upon execution I get the following message.

/home/test.sh[3]: dsrecords: not found.

When executed directly on Unix server it works fine.

Is there something I am missing here.

Regards
Kumar

Posted: Tue Jan 20, 2015 9:28 pm
by qt_ky
Yes, you're missing the path to the dsrecords executable. Prefix the program with its full path.

Posted: Tue Jan 20, 2015 9:51 pm
by phanikumar
Thanks for your prompt reply.

All good. Working now.

Regards
Kumar