Page 1 of 1

DSJE_DSJOB_ERROR

Posted: Mon Aug 11, 2008 9:32 am
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.

Posted: Mon Aug 11, 2008 9:51 am
by ArndW
What happens if you enter the command as "dsjob" and parameters as "-run -mode NORMAL -param paramRecLmt = 10 DEV TestdsjobExecute
"

Posted: Mon Aug 11, 2008 9:54 am
by chulett
Why in the heck would you not use a Job Activity stage for this? :?

Posted: Mon Aug 11, 2008 10:03 am
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.

Posted: Mon Aug 11, 2008 10:20 am
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".

Posted: Mon Aug 11, 2008 11:17 am
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.

Posted: Mon Aug 11, 2008 11:18 am
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.

Posted: Mon Aug 11, 2008 11:20 am
by chulett
Get rid of the spaces around the equal sign in the parameter name/value pairs.

Posted: Mon Aug 11, 2008 11:30 am
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.

Posted: Mon Aug 11, 2008 11:44 am
by chulett
Cool. Make sure you include one of the "wait" options with dsjob so that you know if it runs ok or not.

Posted: Tue Aug 12, 2008 11:16 am
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.

Posted: Tue Aug 12, 2008 11:38 am
by chulett
Do you have the 'Automatically handle activities that fail' option enabled in the Sequence job?

Posted: Wed Aug 13, 2008 11:43 am
by poorna_76
chulett wrote:Do you have the 'Automatically handle activities that fail' option enabled in the Sequence job? ...
Yes.