Sending alerts in Robotjob Iseries

50 pts.
Tags:
AS/400
AS/400 jobs
hi, I have a setup a robotjob.this job fetches time stamp difference of two fields if it is greater than 3 mins.I have scheduled this job every 30 mins. Hence this job will send an alert even though if there are no data fetched for the current date. For fetching the records greater than 3 mins i have used sequel queries. Please let me know how to modify this robotjob in such a way that to send an alert only when any records are fetched and not send a blank mail. thanks lot in advance. Please let me know if you need any more details.

Answer Wiki

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

One way to do this would be to set up a data area that your program changes when you find records that meet your criteria. If you find a record, update the data area with a “Y”. If no records are found, update the data area with a “N”. Before sending an email, check the data area. If it is “Y”, send the email. If it is “N” then do not send an email.

Another way would be to set up a counter in your program. Each time you find a record, increment the counter by one. At the end of your program, check the counter. If it is greater than zero, send the email.

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
  • PrashanthR07
    thanks for the reply.
    50 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