Page 1 of 1

problem with DSExecute

Posted: Tue Aug 22, 2006 7:27 am
by vinodpatel
Hi,
I am calling a shell script through DSExecute also giving option with it e.g. test.sh -D 20060101 & this parameter I m using in test.sh

But when i run this null value goes into that parameter.

Is there any routine to execute the same ???

thanks,
Vinod

Posted: Tue Aug 22, 2006 7:34 am
by kcbland
What's the EXACT command line string you are passing?

Posted: Tue Aug 22, 2006 8:06 am
by vinodpatel
this my test.sh

getopts "D" option
STARTDATE=${OPTARG}
echo ${STARTDATE}
cd /prop/shr/tng/data/cim
ftp -v -n servername <<EOF
user username password
cd /prod/shr/tng/data/tinaarbor/rejects/tina
mget CDR_DATA_ARCHIVE_${STARTDATE}.dat
bye
EOF


to execute this i am calling routine
DSExecute("UNIX", "test.sh -D 20060101", Output, SystemReturnCode)

Posted: Tue Aug 22, 2006 9:14 am
by kcbland
I don't think your syntax for getopts is correct. You can verify this by echo'ing $0, $1, $2, $3 to see command line arguments passed. You'll see that your command line contains the date.