Hi,
I need to create a sequential file based on a condition. I'll be running a SQL query in one of the jobs. I want this job to call another job only when the count of rows retrieved by the SQL query is zero (0).
How can I design my sequence?
Cheers,
Mohan
Creation on a sequential file based on a condition
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 66
- Joined: Tue Dec 07, 2004 12:48 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The problem is, what becomes of the result of the SQL query in the first job? Presumably this is being written to a sequential file.
Your Job Sequence, therefore, should run the first job then introduce some way to determine whether the file has zero length or not (use a Command Activity with the test -s command is probably easiest, or use a Routine Activity and write your own routine to test for the same thing). Based on this result you can trigger or not trigger a second Job Activity to run your second job.
Your Job Sequence, therefore, should run the first job then introduce some way to determine whether the file has zero length or not (use a Command Activity with the test -s command is probably easiest, or use a Routine Activity and write your own routine to test for the same thing). Based on this result you can trigger or not trigger a second Job Activity to run your second job.
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.