Re-run DS Job using script

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
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Re-run DS Job using script

Post by vinaymanchinila »

Hi

We run our jobs from Control-M and sometimes the DS job when kicked off aborts due to resource issues, so what I am planning to do is , re-run the DS job 3 times before we get a page, is this possible through a script or other means.

In control-M, we can set up a job to rerun for a certain number of times on a non-zero return code. This will still, however, send an alert to Operations and cause a Ticket to be opened.

Thanks,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

How are you controlling the jobs. Is it via a script or Basic Control Job? Plus I dont think its a very good idea on running your job three times due to resources issue or any other issue. But its certainly do-able.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

Control-M calls the DataStage job, so I am not sure what you mean by the basic control job, can you elaborate?

Thanks,
Thanks,
Vinay
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

I would build the jobs using Loops in Job Sequence.
Run the x number of times, till i get a desired result, then exit the loop.
That way, everything is handled in the job and it would be one Control-M call.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I meant about job execution control. How is your process controlled? However it is controlled you can handle the re-runs within it. If its via job sequence then you can do as narasimha suggested. But if I were in your place I would re-evalute the direction your heading. But thats just me.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

If a database query fails due to deadlock, you wait a brief period of time and try again. If a program runs and fails due to lack of space (memory, disk, etc.) you can wait and try again later - especially if you know that the resource constraint is temporary (some jobs take more resources than others).

What is the difference between those situations and rerunning your DataStage job if it fails due to some resource constraint? I would certainly add the caveate that you need to be SURE that is why it failed, so that you are not running a job that has failed for some other (i.e. non-restartable) issue.

Just playing devil's advocate here... :twisted:

Brad.
Post Reply