Hello,
I am trying to run job1 or job2 based on existance of data in a table. For example, if there is data in a table XYZ for selection criteria then run job1, if there is no data in table XYZ then run job2? Can any one please help me with this (with an example, would be a great) in IBM information server on Unix environment.
I tried using job activity, custom (conditional ) expression. But I do not know exactly how to use this.
Any help is highly appreiciated.
Thanks
Chandu.
IBM Information Server - How to run the jobs on condition
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 59
- Joined: Sat Jul 05, 2008 11:32 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
When you draw an arrow from one activity to another, there is an extra tab on the upstream activity called "Trigger". Some "canned" triggers are available, for example "OK", "Warning" and "Failure", and you can create your own custom triggers using the expression builder.
In your specific case, you would probably have an intermediate activity that tests for whether there are zero rows in table XYZ and use that trigger to determine whether to run Job2.
In your specific case, you would probably have an intermediate activity that tests for whether there are zero rows in table XYZ and use that trigger to determine whether to run Job2.
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.
-
- Participant
- Posts: 59
- Joined: Sat Jul 05, 2008 11:32 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can not rely on Job1. Job1 (except through use of an after-job subroutine) can only report the number of rows it sent to table XYZ, not how many were successfully inserted. You have to do something in between to test how many rows the table has. This could be a command or a routine, or another job, or the after-job subroutine as mentioned.
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.