problem with DSExecute

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinodpatel
Participant
Posts: 4
Joined: Mon Aug 21, 2006 10:23 pm
Location: Pune

problem with DSExecute

Post 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
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

What's the EXACT command line string you are passing?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vinodpatel
Participant
Posts: 4
Joined: Mon Aug 21, 2006 10:23 pm
Location: Pune

Post 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)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply