Running multiple instances of the same job simultaneously

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ffillmorejr
Participant
Posts: 15
Joined: Tue Jul 27, 2010 1:33 pm
Contact:

Running multiple instances of the same job simultaneously

Post by ffillmorejr »

I have created seven DataStage Server Jobs each of which runs against hundreds of source databases. I would like to run the same DataStage Job against multiple source databases simultaneously.

I set the "Allow Multiple Instance" switch in the Job Properties of the Server Jobs.

I have a Sequence Job which runs the seven Server Jobs. I am puzzled by the following error which causes the Sequence Job to abort.

"Controller problem: Error calling DSRunJob(CDPOFIMAS), code=-2
[Job is not in the right state (compiled and not running)]"

This is the same error I got before I set the "Allow Multiple Instance" switch. What's wrong?
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

You could check couple of things:

1. See if the job is in aborted state or Not compiled state as the warning suggests.
2. Are you passing different invocation id's every time you are running the Job Sequence.
Kris

Where's the "Any" key?-Homer Simpson
ffillmorejr
Participant
Posts: 15
Joined: Tue Jul 27, 2010 1:33 pm
Contact:

Post by ffillmorejr »

kris007 wrote:You could check couple of things:

1. See if the job is in aborted state or Not compiled state as the warning suggests.
2. Are you passing different invocation id's every time you are running the Job Sequence.
All seven of the Server Jobs compiled successfully after I updated the Job Properties. All of the Sequence Jobs as well. I am using a parameter in the Sequence Job to identify the source database. Not sure about the "invocation id". How do I set/pass it?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I supppose by not passing the invocation id, you are trying to keep on triggerin the master job.
When you run the Job sequence from Windows, you will have small box with a display of Invocation id, when you see the pop up with prompts for Parameters.
Similarly, individual JobActivity will also be enabled with an extra input parameter.
This need to be uniqu across each run.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ffillmorejr
Participant
Posts: 15
Joined: Tue Jul 27, 2010 1:33 pm
Contact:

Post by ffillmorejr »

kumar_s wrote:I supppose by not passing the invocation id, you are trying to keep on triggerin the master job.
When you run the Job sequence from Windows, you will have small box with a display of Invocation id, w ...
That fixed it. Thanks.
Post Reply