How can a job be initiated whenever a as/400 database is updated.
We currently have a job that runs every hour even when there is no data to process. When there is data, it is processed then the database is cleared. Is there a way to trigger the job to run only whenever the database is populated?
Software/Hardware used:
iseries, V6R1M0, rpgle, rpg, sql, ifs,
ASKED:
July 20, 2011 9:56 PM
UPDATED:
March 31, 2012 8:38 PM
Is there a way to trigger the job to run only whenever the database is populated?
Easiest way is probably to add a “trigger” to the file with the ADDPFTRG command. See the Triggering automatic events in your database topic in the Information Center for an introduction. At its minimum, you might have a CL trigger program that’s little more than two dummy parms and a SBMJOB command.
It would likely be a little more complex than that, but technically that would satisfy your specific request.
Tom