DSJE_DSJOB_ERROR

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
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

DSJE_DSJOB_ERROR

Post by poorna_76 »

I am trying to execute a job using Execute Command Activity inside the Sequence.

When i don't specify any parameters, the job executes fine.

When i specify the parameters, Sequence aborts does not execute the job.

It looks like some syntax error, but not sure where the error is:
**************************************
jsTestSeq.JobControl (@Execute_DataStageLog): Executed:dsjob -run -mode NORMAL -param paramRecLmt = 10 DEV TestdsjobExecute
Reply=255
Output from command ====>
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
****************************
Inside the Execute Command Activity

On the command , i am specifying the following:
dsjob -run -mode NORMAL

On the Parameters, i am specifying the following:
-param paramRecLmt = 10 DEV TestdsjobExecute

Thanks in Advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What happens if you enter the command as "dsjob" and parameters as "-run -mode NORMAL -param paramRecLmt = 10 DEV TestdsjobExecute
"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why in the heck would you not use a Job Activity stage for this? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

chulett wrote:Why in the heck would you not use a Job Activity stage for this? :? ...
For testing purpose, i had hardcoded the jobname here,
but my actaul intention was to run 2 different similar jobs (for 2 different process) generating jobname dynamically based on some parm values.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... ok. How "dynamic" are we talking about? If the number of different jobs are a small number, consider just branching to multiple Job Activity stages using triggers or the Nested Conditon stage.

If you are going to stick with the dsjob solution, make sure you include one of the WAIT options, probably "-jobstatus".
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

ArndW wrote:What happens if you enter the command as "dsjob" and parameters as "-run -mode NORMAL -param paramRecLmt = 10 DEV TestdsjobExecute
" ...
Hi ArndW,

I am getting the same error, even after trying the way you mentioned above.
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

chulett wrote:Hmmm... ok. How "dynamic" are we talking about? If the number of different jobs are a small number, consider just branching to multiple Job Activity stages using triggers or the Nested Conditon stage. ...
Hi Chulett,


The no of jobs are very high, that's the reason i am trying this method.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Get rid of the spaces around the equal sign in the parameter name/value pairs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

chulett wrote:Get rid of the spaces around the equal sign in the parameter name/value pairs. ...
Thanks Chulett.

It worked after removing the spaces around the equal sign in the parameter name/value pairs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Cool. Make sure you include one of the "wait" options with dsjob so that you know if it runs ok or not.
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

chulett wrote:Cool. Make sure you include one of the "wait" options with dsjob so that you know if it runs ok or not. ...
Hi Chulett,

Now i am running into a different problem.

jsTestSeq.JobControl (@Execute_DataStageLog): Command dsjob -run did not finish OK, reply = '2'

Since my actual job is finishing with warnings, once the job is completed, my sequence is throwing exception, since ExecuteCommand Stage did not finish OK.

Even though i specified the trigger as Unconditional on ExecuteCommand stage, the next job is not getting triggered, it simply goes to exception.

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do you have the 'Automatically handle activities that fail' option enabled in the Sequence job?
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

chulett wrote:Do you have the 'Automatically handle activities that fail' option enabled in the Sequence job? ...
Yes.
Post Reply