Page 1 of 1

Running a Job in CMD prompt using dsjob -run

Posted: Thu Jan 28, 2010 1:51 am
by rohithmuthyala
Hi,

Im trying to run a job using the option dsjob -run,

The syntax followed by me is,

dsjob -server <server> -user <UserID> -password <XXXXXX> -run -param param1=value param2=value param3=value param4=value <Project> <Jobname>

The error which Im getting is like Invalid Arguments.....

When Im trying to run a job having just one parameter its working fine.

Is it something to do with the number of parameters.Is there any limitation for the number of parameters?

Can anyone help me out..!!

Posted: Thu Jan 28, 2010 3:08 am
by ray.wurlod
Be more precise about the actual error messages. For example you may be supplying values for parameters that are actually not legal values, such as "FRED" for a Date parameter.

Posted: Thu Jan 28, 2010 3:17 am
by rohithmuthyala
It says Invalid arguments....

Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-useid]
<project> <job|jobid>

Status code = -9999 DSJE_DSJOB_ERROR

Posted: Thu Jan 28, 2010 3:20 am
by rohithmuthyala
One more thing to add is that the number of parameters are more..... Is it due to the length of the command...!!

Posted: Thu Jan 28, 2010 6:37 am
by chulett
No. You have to repeat "-param" for each parameter/value pair on the command line.

Posted: Thu Jan 28, 2010 7:02 am
by nagarjuna
-param param1=value -param param2=value -param param3=value -param param4=value

Posted: Fri Jan 29, 2010 2:10 am
by rohithmuthyala
Yes i've even tried this out for each parameter value i've repeated -param....... Actually it was working for jobs with just 4 or 5 parameters.......but it ditn waork out with the job having about 17 parameters...!!

Posted: Fri Jan 29, 2010 5:36 am
by abhijain
Alternatively, you may create a param file for all of your parameters and use the path of the param file during execution through command prompt.

Posted: Fri Jan 29, 2010 8:17 am
by chulett
I can't imagine that all of those 17 parameters need to be passed to the job. If the default value is fine for that run, then leave them out of the dsjob command line.