Page 1 of 1

ds job run errors

Posted: Wed Feb 23, 2005 12:03 pm
by babbu9
Hi
I am working with running datastage job using the shell script on sun system. Eventhough I pass all the required parameters, datastage gives the following error mesaage. Can someone decipher this and inform me.

Thanks
Bob


Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-jobstatus]
[-userstatus]
[-local]
<project> <job>

Status code = -9999
AR03.sh[338]: -param: not found.
AR03.sh[342]: -param: not found.
AR03.sh[344]: -param: not found.
AR03.sh[355]: -param: not found.
AR03.sh[369]: -param: not found.
AR03.sh[374]: -wait: not found.


The parameters passed are :

$DSBINDIR/dsjob -run \
-param 1 \
-param 2 \
-param 3 \ , etc
-wait -jobstatus $DSPROJECT name of job
$DSBINDIR/dsjob -jobinfo name of job > jobinfo.hsh

Note:I did an echo on all parameters and all are showing valid values.

Posted: Wed Feb 23, 2005 1:09 pm
by kcbland
Parameters are fed as:

Code: Select all

 -param JOBPARAMETERNAME=value
You aren't specifying which parameter gets what value.

Posted: Wed Feb 23, 2005 1:40 pm
by babbu9
Thank you for the reply,
I did not mention it in my post but I
did assign the parameter with the values as you mentioned, but still the problem seems to persist.

Are there any other things that could have stopped the shell script?


kcbland wrote:Parameters are fed as:

Code: Select all

 -param JOBPARAMETERNAME=value
You aren't specifying which parameter gets what value.

Posted: Wed Feb 23, 2005 2:16 pm
by dsxuserrio
Babu
It looks like your Ar03.sh has some problems. Check the line numbers indicated in the square brackets.

And if you think it is a dsjob usage error please post your full command,

Posted: Thu Feb 24, 2005 12:22 pm
by babbu9
Thank you.

Posted: Thu Feb 24, 2005 12:32 pm
by kcbland
Look at this script, it shows you a good way to build a script to execute the dsjob command. You should form the entire command string and echo it, then execute it. That way you can debug it to see if it is formed correctly.

viewtopic.php?t=85578

Posted: Thu Feb 24, 2005 1:06 pm
by clshore
Since you didn't post *exactly* what you are submitting on the command line, it's harder to answer your question.

Remember that the shell gets first crack at anything you submit on the command line. So be sure thet there are no alias definitions or whatnot that match in your invocation. Make sure that none of your parmdefs have any embedded whitespace, ie, protect them from the shell with quotes:

parm1='what the heck'

Do you have valid defaults for all of your job parms? If so, what happens when you submit without any parmdefs? If that runs OK, start introducing the parms on the command line one-by-one until you encouter a problem, then analyze it to see why.

Carter