Initiating a job when an as/400 database is updated

180 pts.
Tags:
AS/400 database
AS/400 jobs
IBM iSeries
RPGLE
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,

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can add a trigger to Physical file(ADDPFTRG), So that the program will be triggered when ever there is update to Database file.
Submit the Job from the corresponding program using SBMJOB command.

Pradeep.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following