Loop condition
Moderators: chulett, rschirm, roy
Loop condition
I need to create a job that waits for a row with the value of current date to appear before the load can proceed. Say, the table is Load_Schedule and it has only one field called 'Load_date'. My job should wait for 1 hour for the Load_date to have a value equal to sysdate before it proceeds to the next stage. How do I do this??
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What happens if the hour elapses with no such file?
I'd run a job sequence with a loop containing a WaitForFile activity followed by a Job activity to process the file to determine what its date is, then probably a Nested Condition activity to check whether it's the right date.
I'd run a job sequence with a loop containing a WaitForFile activity followed by a Job activity to process the file to determine what its date is, then probably a Nested Condition activity to check whether it's the right date.
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.
Except there's no file.
I'd do something similar in a loop, but rather than WFF call a Server job that checks the table and passes back in USERSTATUS whether the condition was met or not. Add a 'sleep' Routine Activity so it doesn't just race around in the loop at high speed. Branch out of the loop when the condition is met and on to your followup processing steps or let the loop end naturally after your 60 minute window is up and go to your error condition.
I'd do something similar in a loop, but rather than WFF call a Server job that checks the table and passes back in USERSTATUS whether the condition was met or not. Add a 'sleep' Routine Activity so it doesn't just race around in the loop at high speed. Branch out of the loop when the condition is met and on to your followup processing steps or let the loop end naturally after your 60 minute window is up and go to your error condition.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's probably bearable particularly if you have a short auto-purge interval. Otherwise create your own custom routine or job control code.
Last edited by ray.wurlod on Wed May 27, 2009 4:23 pm, edited 1 time in total.
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.