Page 1 of 2
running the job in UNIX
Posted: Wed Feb 18, 2009 1:57 pm
by kittu.raja
Hi,
I am trying to run a job in UNIX. I am using dsjob -run -mode NORMAL -param user=raj password=aaaa ETL Jp_raj
but I am getting an error saying
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>
Status code = -9999 DSJE_DSJOB_ERROR
Can you help me out I searched in forumsbut didnt find it.
Posted: Wed Feb 18, 2009 2:05 pm
by DSguru2B
YOu need the literal -param before each parameter value. You are missing it before the second parameter.
Posted: Wed Feb 18, 2009 2:07 pm
by kittu.raja
DSguru2B wrote:YOu need the literal -param before each parameter value. You are missing it before the second parameter.
Should we keep inverted commas for the parameter values??
Posted: Wed Feb 18, 2009 2:09 pm
by chulett
![Confused :?](./images/smilies/icon_confused.gif)
Are you asking if you need to quote them? No, not typically, unless perhaps the parameter value has a space in it.
Posted: Wed Feb 18, 2009 2:09 pm
by DSguru2B
You dont have to, but you could. In that case make sure you have the entire string after the '-param' in inverted commas. So your command above will become.
Code: Select all
dsjob -run -mode NORMAL -param 'user=raj' -param 'password=aaaa' ETL Jp_raj
Posted: Wed Feb 18, 2009 2:10 pm
by chulett
Not sure I've ever seen quotes referred to as 'inverted commas' before.
Posted: Wed Feb 18, 2009 2:13 pm
by kittu.raja
DSguru2B wrote:You dont have to, but you could. In that case make sure you have the entire string after the '-param' in inverted commas. So your command above will become.
Code: Select all
dsjob -run -mode NORMAL -param 'user=raj' -param 'password=aaaa' ETL Jp_raj
thank you for your response, but I am getting an error saying
Error -3 getting information for parameter 'user'
Status code = -3 DSJE_BADPARAM
Posted: Wed Feb 18, 2009 2:27 pm
by DSguru2B
Do you have these parameters defined in your job, identical parameters?
Posted: Wed Feb 18, 2009 2:28 pm
by chulett
Must not... note that they must exactly match the parameter name, case and spelling.
Posted: Wed Feb 18, 2009 2:32 pm
by kittu.raja
chulett wrote:Must not... note that they must exactly match the parameter name, case and spelling.
I copied and pasted then also I am getting the same error
Posted: Wed Feb 18, 2009 2:45 pm
by DSguru2B
Try without the quotes. If that does not work then post your exact command.
Posted: Wed Feb 18, 2009 3:41 pm
by ray.wurlod
Are these actually job parameters or are you intending to use the -user and -password options to the dsjob command itself?
Posted: Wed Feb 18, 2009 4:02 pm
by dspxguy
ray.wurlod wrote:Are these actually job parameters or are you intending to use the -user and -password options to the dsjob command itself? ...
As Ray mentioned, if that is the case then run the command
Code: Select all
$dsjob -server ServerName:portnumber -user raj -password aaaa -run -mode NORMAL -wait -jobstatus ProjectName JobName
Posted: Wed Feb 18, 2009 6:02 pm
by chulett
If that's the case, what it was that they "copied and pasted", I wonder?
![Confused :?](./images/smilies/icon_confused.gif)
Posted: Wed Feb 18, 2009 8:18 pm
by ray.wurlod
My guess is from this thread into their DataStage environment.