Multiple Instance

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
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Multiple Instance

Post by ajongba »

Hi everyone,
I have a problem in running a sequencer job as it use to change the job name into something like "jobname.invocationId" .I have 4 jobs made here, out of which two jobs were sent to us for inhancement, these jobs(inhancement) were sent to us with the allow multiple option enabled.But i did not enable the option in the other two new jobs that i created.Now all these four job is to be run from a sequencer job which in turn is called by a unix script.In my unix script i have given the original jobname without the dot seperated jobname,thus the job fails to ran as it use to change into jobname.invocationId.
Please help!!!!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Confusing. Is your Sequence job multi-instance? Shouldn't the two new jobs be multi-instance as well? What Invocation ID are you expecting to pass to the four jobs, the one used for the Sequence job itself? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Post by ajongba »

Only the two jobs sent for enhancement are enabled with multi instance option.No the sequencer job is not a multiple instance job(i did not enable as i don't know what to do with it :oops: ) similarly the other two jobs are also not multi instance enabled. The problem is while running the whole process the actual jobname say "abc" changes to abc.InvocationId.Thus the script and the sequencer job fails to run the job and it fails
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ajongba wrote:The problem is while running the whole process the actual jobname say "abc" changes to abc.InvocationId.Thus the script and the sequencer job fails to run the job and it fails
This isn't a 'problem' per se, it is the way multi-instance jobs work. Did you take a job that was MI and turn that off without correcting the Sequence job that runs it? That would be a problem. :?

Post your actual errors, copy/paste from the logs so we can see them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

do you want to make the rest job to be run in multiple instance then just enable the option in job to be run in multiple instance...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The first instance of a multi-instance job will run OK without an invocation ID. The second won't - it will report "job already running" (indirectly).

Were I your customer I would be angry that you arbitrarily and without consultation elected not to preserve my multi-instance settings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Post by ajongba »

There is no error as such but i'll try to explain it in a better way. I have 2 jobs ,say "One" and "Two" are the job names, to be enhanced by us(some modification) and 2 new jobs say, "Three" and "Four" are the job names ,to be created. Now all the four jobs are to be in a sequencer job in the following sequence as :One----->Two-------->Three-------->Four

The job One and Two are the jobs whose multiple instance(the invocationID's are "ID1" for job "One" and "ID2" for job "Two") are enabled.I did not do anything with the rest of the jobs i.e, i did not enable multiple instance with the other jobs. Now when i run the jobs the datastage director shows me the name of the jobs as :
One
One.ID1
Two
Two.ID2
Three
Four
sequencer
sequencer.InvocationId

The actual job is somehow made into two and i am getting confused as to which one to use for referring the jobname so that in future it does not cause any problem :shock:


The error that i get in the director is like this:
"JobDM15Sequence.invocationID.JobControl (@JBA_jobname_Update): Controller problem: Error calling DSRunJob(jobname.JBA_jobname_Update), code=-2
[Job is not in the right state (compiled and not running)]"
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

What you see in director is right. When multiple instance is invoked, jobs which are run from a sequencer requires an invocation id expression to be given. So in your case your job names for the instance jobs will be the one with "Jobname .InstanceId". Same is case with your sequence. Your job names for future reference are:
One.ID1
Two.ID2
Three
Four
sequencer.InvocationId
Note: Applicable only under the assumption you are not going to change the invocation id expressions. Even your sequencer, when ever you run has to be given the invocation id 'InvocationId'.

Controller problem: Error calling DSRunJob - Is because this job is not in a runnable state. You have to do a re-set and run.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's only one job, even if it is 'multi-instance'. However, you can run multiple copies of it at the same time, as long as the Invocation Ids in use at any given time are unique. The 'main' job will always show as 'Compiled' in the Director while any invoked instance will be where it shows 'Running', 'Finished', etc.

Since there's only one job, that implies there's only one log as well. View the 'main' job's log and you'll see entries from all used Invocation Ids. View the log from an instance and you'll just see the log entries for that instance. Think of them as 'views' that filter out everything but the records for the instance being examined.

And your 'not in right state' error is a typical issue when someone first starts dealing with MI jobs. I doubt it needs to be reset. More than likely it is not in a 'runnable' state because it is already running. That can easily happen when you mix non-MI and MI jobs together, or reuse invocation ids improperly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Post by ajongba »

So do you think that i should leave the settings as it is?????
The code that i am using in the unix script is something like this:
"dsjob -run -wait ${ParmList} -jobstatus $ProjName $JobName.InvocationId"
Will the dot seperator (InvocationId) actually recognise the invocation id mentioned in the job property??? What i mean is the actual invocation id is something different then the one i have shown in the code.Is is some sort of internal function(InvocationId)?????
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What "settings"? You said earlier that the Sequence job was not multi-instance, has that assertion changed? :?

You only use the "jobname dot invocation_id" form at the command line to run jobs that are actually multi-instance, not 'normal' jobs. And please tell me you are using something meaningful for your Invocation Ids and not the literal string "InvocationId" that you've posted here more than once.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Post by ajongba »

No nothing has changed ..I mean the sequence is not multi insatnce job...What i meant was for the other two jobs which have multiple instance enabled ..Shall i just leave it like that and use the jobname as jobname.InvocationId for those two jobs and the other jobs by their actual name for calling the jobs through unix as i am also resetting the jobs before running it thus i am looking at the status of the individual jobs and if it is not in a runnable state i am resetting it......
no :D The invocationId is not literally invocationId..It is different for both the jobs...
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Well from your job/sequence names it looks like your 'Sequence job' is also multiple instance.
ajongba wrote: Now when i run the jobs the datastage director shows me the name of the jobs as :
sequencer
sequencer.InvocationId
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ajongba
Participant
Posts: 31
Joined: Tue Apr 03, 2007 4:00 am
Location: Mumbai

Post by ajongba »

Sorry for that....It was a mistake :lol: ...... So finally i think i should use the jobname as jobname.InvocationId for those with multi instance option enabled and leave the rest of the jobs as it is????? Please verify
Thank you all for being so patience
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You don't have any other design option right. So go ahead with what ever you finally "thought" :)
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Post Reply