Making jobs in a sequence wait for specified time

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
ashik_punar
Premium Member
Premium Member
Posts: 71
Joined: Mon Nov 13, 2006 12:40 am

Making jobs in a sequence wait for specified time

Post by ashik_punar »

Hi Everyone,

I have a requirement in which i have no of jobs in a sequence.The first job in the sequence is comparing the data in one Sybase table with the data in one Oracle table.If the data in the Sybase table is having a higher timestamp than the data in the Oracle table then the rest of the jobs in my Sequence will be running.But if the timestamp of Oracle data is more than the timestamp of Sybase data then i am suppose to send an email and wait for 2 hours so that the Sybase table gets loaded with the latest data and i can run the rest of the jobs in the sequence. There is one exception to this logic,which is that during the wait process of 2 hours if the user gives a go ahead to the sequence it should run the rest of the jobs in the sequence,for example if after waiting for 1 hour the user gives a command for the running of the rest of the jobs then it should be done.

Can anyone please guide me on how i can do the waiting for 2 hours in the sequence in addition to the exception.


Thanks in advance,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I would write the sequence so that it waits for a file activity (i.e. a file on the DS server machine either appearing or disappearing) before continuing. Then you can have any type of a process touch or delete this control file and the DataStage job will continue processing. This makes it easy for any script or user to manually modify this trigger or watch file to start the job, and also lets a remote program triggered by the Oracle load process do the same so you no longer wait for <n> minutes but can start as soon as the load is finished. You could even write a DataStage job to do this if you have some condition in the database that you can use to find out whether the load is finished.
Post Reply