Running a Job in CMD prompt using dsjob -run

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Running a Job in CMD prompt using dsjob -run

Post 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..!!
Rohith
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post 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
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post by rohithmuthyala »

One more thing to add is that the number of parameters are more..... Is it due to the length of the command...!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No. You have to repeat "-param" for each parameter/value pair on the command line.
-craig

"You can never have too many knives" -- Logan Nine Fingers
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

-param param1=value -param param2=value -param param3=value -param param4=value
Nag
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post 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...!!
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post 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.
Rgrds,
Abhi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply