Multiple instances in parllel jobs

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

Multiple instances in parllel jobs

Post by UPS »

Hi
I have a job that extracts data from a table in oracle database and puts it into a dataset.this job takes the a parmeter 'period' and runs the job.how can I run 'n' number of these jobs (all these jobs should be running at time not one at a time) each taking a different parametre value.


in other words how can I run multiple instances in parllel jobs
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Re: Multiple instances in parllel jobs

Post by kris »

UPS wrote: in other words how can I run multiple instances in parllel jobs


In the designer, in the Job Properties tab, select allow multiple instance.

That will allow you to run an instance of the job using invocation id. But you have to be careful as you are talking about instanciating a parallel job. Make sure you do not overload your server.

Best regards,
~Kris
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Re: Multiple instances in parllel jobs

Post by kris »

UPS wrote: in other words how can I run multiple instances in parllel jobs


In the designer, in the Job Properties tab, select allow multiple instance.

That will allow you to run an instance of the job using invocation id. But you have to be careful as you are talking about instanciating a parallel job. Make sure you do not overload your server.

Best regards,
~Kris
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Make the job a multiple instance job and make sure that you incorporate the instance name/number as part of the dataset name to ensure that each instance has a unique dataset to write to.
Fire off each instance at the same time using a sequence job or an enterprise scheduler. Does that answer your query or you are looking for something else?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post by anandkumarm »

Hi
THank you for the reply...i dont think using a sequencer will help me in my situation coz i want all the instances to be running at atime and in a sequencer if you use a loop they will be executed one after the other...please do correct me if i am wrong....
and about the invocation id can you be more specific about passing the invoaction id...in parllel jobs....
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You are correct in that the Job Activity will issue a wait and not continue until the called job has finished. If you don't care how many instances are run concurrently, replace the Job Activity stage with a Command stage and build the command line for dsjob manually in the sequence, but don't add the '-wait' option.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need a loop - just multiple Job activities each referring to the same multi-instance job but with different invocation IDs.

<irony>Create as many as you like - everyone knows that a DataStage server has an infinite supply of CPU, memory, disk and network resources!</irony>
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

One issue we have run into when running multiple instances is that if you are trapping the logs on the server side (ex. you have a Unix script that runs the DS job and captures logging), the logging traps logs for all instances that are running at that time.

Say I have 3 instances running at the same time. I may try to trap the logs for each in their own individual logs. However, what I end up with is each log containing the logs of the other 2 instances. I am not sure why this is happening.

In Director, you will see that instances are color coordinated and you can easily identify one instance from another. For some reason, this does not work on the log retrieval side (sorry, not on my work laptop, so I don't have access to the documentation adn don't remember the name of the Unix program for retrieving logs - is that dsjob or something else?).

Now, I will put in a disclaimer. It is entirely possible that it is our process for pulling logs that is not working correctly. If someone else has run into this problem, let me know. If they have not and are able to easily retrieve logs to a Unix file for a specific instance, LET ME KNOW!

Brad.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't know of any way to do it with the API (that is, dsjob or one you wrote yourself). It would, of course, be possible using DataStage/SQL; for example

Code: Select all

$DSHOME/bin/dssh "SELECT columns FROM RT_LOGnnn WHERE ..." > file
I too don't have DataStage readily available at the moment, hence the sparse information in the above.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gaurav_shukla
Participant
Posts: 12
Joined: Wed Jun 13, 2007 2:12 am

Re: Multiple instances in parllel jobs

Post by gaurav_shukla »

We can make job multiple instance by checking the Multiple Instance Check button in Job Properties window.

Now you need to run the job through unix script with parameter as your period for which you want to run the job.

And this period will also be your invocation id.

Let me know this works or not.
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Re: Multiple instances in parllel jobs

Post by anandkumarm »

Hi
THank you for the reply...I want to know how the job takes the period as the invocation id when we are not specifing anything about it saying the period is the invocation id also...
dsjob -run -param period='june-05' projectname jobname

is there anyother command for passing the invocation id also
mujeebur
Participant
Posts: 46
Joined: Sun Mar 06, 2005 3:02 pm
Location: Philly,USA

Re: Multiple instances in parllel jobs

Post by mujeebur »

Try this :

dsjob -run -param period='june-05' projectname jobname.period
Post Reply