Page 1 of 1

kicking off multiple instances in one dsjob command

Posted: Mon Apr 27, 2009 8:59 pm
by ag_ram
I have 2 queries.
- Is it possible to kick off multiple instances of a job with different instance ID in a single dsjob command?

- How can I check all the instances of a job is finished? As and when all the instances finished, I need the return the control to job invoker.

Thanks.

Posted: Mon Apr 27, 2009 10:38 pm
by ray.wurlod
1. No.

2. You must check them individually.

Posted: Tue Apr 28, 2009 11:38 am
by ag_ram
For answer 2:
Can I use ps -ef | grep "jobname" to find out the presence of process in unix server?
If I dont find anything, I will pass the control back to job invoker. This wait and check will continue until I dont find any process with that string. Is this suggestible?

Posted: Tue Apr 28, 2009 4:21 pm
by ray.wurlod
Only if you can guarantee that the job name will appear only in the process(es) involved in running the job. What if, for example, the job design were being monitored or open for editing in Designer? Even so, I regard that approach as a kludge - prefer to create a loop and check the individual jobs/instances.

Posted: Tue Apr 28, 2009 7:35 pm
by ag_ram
Thats correct. It is always better to check the status of the instnace in the loop.

Thanks Ray.