I would like to run the same job 5 times with different parameter values.
I want to do this with a batch script.
I want to write something like below.
dsjob -run -wait -param ParamName=Value1 Myproject Myjob
dsjob -run -wait -param ParamName=Value2 Myproject Myjob
dsjob -run -wait -param ParamName=Value3 Myproject Myjob
dsjob -run -wait -param ParamName=Value4 Myproject Myjob
dsjob -run -wait -param ParamName=Value5 Myproject Myjob
Is that good approach or not?.
any input would be greatly appreciated.
Thanks in advance.
Batch script
Moderators: chulett, rschirm, roy
Thats a fine approach. Make sure you put enough error handling mechanisms in there.
A suggestion: If the running of one job will not affect the running of another then you can probably make this job a multi-instance job and call the instance with different parameters.
A suggestion: If the running of one job will not affect the running of another then you can probably make this job a multi-instance job and call the instance with different parameters.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For example:
dsjob -run -wait -param ParamName=Value1 Myproject Myjob.1
dsjob -run -wait -param ParamName=Value2 Myproject Myjob.2
dsjob -run -wait -param ParamName=Value3 Myproject Myjob.3
dsjob -run -wait -param ParamName=Value4 Myproject Myjob.4
dsjob -run -wait -param ParamName=Value5 Myproject Myjob.5
If you run them at the same time, make sure they're not all trying to write to the same sequential file, or lock the same row in any database table.
dsjob -run -wait -param ParamName=Value1 Myproject Myjob.1
dsjob -run -wait -param ParamName=Value2 Myproject Myjob.2
dsjob -run -wait -param ParamName=Value3 Myproject Myjob.3
dsjob -run -wait -param ParamName=Value4 Myproject Myjob.4
dsjob -run -wait -param ParamName=Value5 Myproject Myjob.5
If you run them at the same time, make sure they're not all trying to write to the same sequential file, or lock the same row in any database table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
My requirement is First one should be finished before second one starts. That's why i put 'wait' option.kumar_s wrote:If you are planning to run in parallel, you can remove the "-wait" option in the suggest command list. ...
am i in the right path?. and Myjob is not multi instance one.
Thanks in advance