How to run a job in multiple instances
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 82
- Joined: Fri Jun 03, 2005 5:23 am
- Location: Bangalore
- Contact:
How to run a job in multiple instances
Hi,
i have a question that is it possible to run a single job in multiple instances , i mean is it possible to run a job in a multithreading way, as of i know if we open same job repeatedly it displays some message like ' Job is using some other person' .
So can u any body clarify this.
Regds
i have a question that is it possible to run a single job in multiple instances , i mean is it possible to run a job in a multithreading way, as of i know if we open same job repeatedly it displays some message like ' Job is using some other person' .
So can u any body clarify this.
Regds
Rajasekhar
irajasekharhexa ,
DataStage jobs can be declared as "multi instance" and can run any number of times in parallel. Since these jobs are completely separate from each other you need to make sure that they don't attempt to write to the same sequential files or have similar concurrency-related issues.
You can use the "search" facility to see many post on multi-instantiation.
DataStage jobs can be declared as "multi instance" and can run any number of times in parallel. Since these jobs are completely separate from each other you need to make sure that they don't attempt to write to the same sequential files or have similar concurrency-related issues.
You can use the "search" facility to see many post on multi-instantiation.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Charter Member
- Posts: 15
- Joined: Mon Jan 31, 2005 1:53 pm
- Location: CO, USA
I tried checking "Allow multiple instances" in the job that is called by other jobs. However, when two jobs call my shared job, one will fail while the other is accessing the shared job. The shared job is fully parameterized so that no source files, hash files or target files are overwritten.
Any suggestions?
Thanks much,
Pam
Any suggestions?
Thanks much,
Pam
Sport,
each job calling the multi-instance job has to use a different instance name.
each job calling the multi-instance job has to use a different instance name.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Titto,
the instance id is alway provided by the caller, either in a Job Sequence (if you call a multi-instance job the job-activity will let you enter an instance, which may be a variable or a parameter; or when you start a job from the Director or even command-line you may also give it an instance name.
The calling jobs do not need to be multi-instance in order to call a multi-instance job.
the instance id is alway provided by the caller, either in a Job Sequence (if you call a multi-instance job the job-activity will let you enter an instance, which may be a variable or a parameter; or when you start a job from the Director or even command-line you may also give it an instance name.
The calling jobs do not need to be multi-instance in order to call a multi-instance job.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
How about using the system time as the invocation ID, or some other value.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I should have added you can call the job using {YourJobName}.{Instance}, so you just have to modify your scheduler's command line to include a differing instance.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 68
- Joined: Sat Feb 05, 2005 4:59 am
- Location: India
HiArndW wrote:How about using the system time as the invocation ID, or some other value.
We're calling a common job (multiple instance toggled on) from a routine which may be called parallely
My doubt is even if do use the time returned by a timedate() function, it does not guarantee uniqueness of invocation id value...timedate gives me a value to the second not microseconds...
Is there any other way to fetch the lowest free invocation id value...
any Ideas?
The invocation ID is a string value, and you would be retrieving from a sequencer, so you might have timing issues there as well. You can use a combination of system date/time and the PID of the sequencer. I'm not at a DS machine now, but I think you could get this either through a command stage or a routine - if you look in the BASIC manual under the SYSTEM() function you will see that one of them returns your process id. That, coupled with a timestamp, will be guaranteed to be unique.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Or the should give you a unique number everytime.
Code: Select all
RND (expression)
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
Have you tried it? Are you sure 100% of the time two simultaneous processes won't generate the same random number? What will prevent that?ameyvaidya wrote:Or theshould give you a unique number everytime.Code: Select all
RND (expression)
The easiest solution is to use the process ID. Two job control processes will be executing under their own process ID (PID), so you're safe to use that.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Sorry People(And thanks Ken),
I had not tried it out and it does not work for multipe parallel processes.
It generates the same numbers for multiple processes running in parallel.
The way out is to use the randomize(@NULL) before calling rnd().
I had not tried it out and it does not work for multipe parallel processes.
It generates the same numbers for multiple processes running in parallel.
The way out is to use the randomize(@NULL) before calling rnd().
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
Using RANDOMIZE(@NULL) will not do what you expect. You should use a seed to ensure the beginning position in your random number sequence is as random as possible, and @NULL will always return the same series. I usually seed a random series with @DATE+@TIME+@USERNO and this will get a different number every time.
Please note that random numbers by their nature are repeatable; so by adding a random number to your unique identifier you are reducing the likelihood of a collision but not guaranteeing it. If you stick with the UNIX PID you are guaranteeing uniqueness and it is simpler to understand as well.
There are some great uses for pseudo-random number generators. This is not one of them.
Please note that random numbers by their nature are repeatable; so by adding a random number to your unique identifier you are reducing the likelihood of a collision but not guaranteeing it. If you stick with the UNIX PID you are guaranteeing uniqueness and it is simpler to understand as well.
There are some great uses for pseudo-random number generators. This is not one of them.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>