Multiple Instance Usage - Best Practices

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
gsbrown
Premium Member
Premium Member
Posts: 148
Joined: Mon Sep 23, 2002 1:00 pm
Location: USA

Multiple Instance Usage - Best Practices

Post by gsbrown »

I've run into a situation where I need a job that can be called at many different times by many different control jobs. The chance that the job could be called at the same time by two different control jobs is VERY likely.

Therefore, I looked into making the job a multiple instance job. This sounded like a good idea until I realized that every instance has to have a unique invocation id and the jobs do not clean themselves up after running. I could make this work by having the control jobs create a numeric datetime string as the invocation id, but how do you handle the cleanup?

Would like to hear tips about ultilizing multiple instance the best way.

thanks,
Greg
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can set the log to clear itself after every 3 or 4 runs or whatever number you want. Clearing the instance ids is another problem.
Mamu Kim
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

Hi,

Can u plz exzplain " jobs do not clean themselves up after running" ??

May be I can then help...
Share to Learn, and Learn to Share.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Multi-instance jobs are intended for almost precisely the situation you're in, perhaps also for continuously-running jobs or jobs that use the RTI components (and might be invoked from lots of places).

I agree that non-selective log purge is an issue, but you can code around this or just rely upon auto-purge based on a run count.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Re: Multiple Instance Usage - Best Practices

Post by JoshGeorge »

gsbrown wrote: I could make this work by having the control jobs create a numeric datetime string as the invocation id, but how do you handle the cleanup?
If you make your control job<b>s</b> pass an invocation id which is specific to it (ie. same) every time to invoke the job which is set to 'reset and run if required', you can over write on the instances and avoid instance ids piling up on timestamps.
Note: This is under the assumption that same control job does not call the same job instance multiple times at the same time.
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