View previous topic :: View next topic
|
Author |
Message |
pearl1
New User
Joined: 04 Aug 2009 Posts: 3 Location: india
|
|
|
|
I have been told to write a cobol progrm for this requirement:
1st i need to check in a table if two fields(i.e Handler_name and Email_alert_field) have some value then we need to send a mail to Handler.
And this program should run after every five minutes. So basiclly i need a Delay of 5minutes after every run and how to send mail thru use of cobol program.
Please give some suggestion on the topic.
Thanks |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
And this program should run after every five minutes |
Is this an online program and if so which online system? |
|
Back to top |
|
|
pearl1
New User
Joined: 04 Aug 2009 Posts: 3 Location: india
|
|
|
|
Thanks for the answers. Actually i am working on Content Manager V7.1. |
|
Back to top |
|
|
pearl1
New User
Joined: 04 Aug 2009 Posts: 3 Location: india
|
|
|
|
I need to send through SMTP server.
thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There are many examples on this forum on how to send emails using SMTP -- search on SMTP for example. COBOL can write the email lines directly to a DD statement pointing to the appropriate SYSOUT class and started task name.
However, if you're planning on having a batch job do this, then delay for five minutes and so forth -- do not do this. Batch processes do not work well with delays and you can find many, many, many suggestions to avoid doing so on this forum. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
And this program should run after every five minutes. |
Suggest you talk with the people responsible for scheduling jobs on your system and have this scheduled as appropriate.
Then the process can be a simple 2-step job that runs the cobol program that writes the data to be e-mailed and sets a return-code depending on whether to send the e-mail or not. The second step would conditionally execute to send the e-mail when needed. |
|
Back to top |
|
|
|