Restart variable in Sequence

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
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Restart variable in Sequence

Post by poorna_76 »

Hi All,
Is there any DataStage Macro/variable that can be used inside the Sequence, to determine if that particular run is normal run or a restart.


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

Post by ray.wurlod »

No.

You could look at the job sequence log in Director (or using API functions or dsjob command) - from memory a regular run request has "job run requested" while a reset has something different.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Post by poorna_76 »

ray.wurlod wrote:No.

You could look at the job sequence log in Director (or using API functions or dsjob command) - from memory a regular run request has "job run requested" while a reset has something different. ...
Thanks Ray.

What i am trying to accomplish here is, if the Sequence is executed from a previous abort(if i can determine if it is a Restart, from within the Sequence), i would like to execute a job which deletes the data from a table that got partially loaded.

If i can not determine if it is a Restart, from within the Sequence, is there a 'Before' stage command in OracleEnterprise stage to do the cleanup for the partial loaded table, in case of a restart?
I would like to cleanup the data that is already partially loaded into that table and rerun the same job.

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

Post by ray.wurlod »

I can still only suggest creating a server routine (and invoke it from a Routine activity) to read the job sequence's log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
infranik
Participant
Posts: 20
Joined: Tue Oct 11, 2005 8:11 am

Post by infranik »

Try to implement some logic as such
At the start of the sequencer, create an empty file. delete this file on successful completion of the sequencer. can use after-jopb subroutine.
When starting the sequencer, try to see if file is present. If its present it means the seq is restarted after abort - call your delete jobs and clean the table. conversely if the file is not present, then it means your sequencer has run properly.
Post Reply