IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

to send email thru cobol program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pearl1

New User


Joined: 04 Aug 2009
Posts: 3
Location: india

PostPosted: Tue Aug 04, 2009 12:08 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 04, 2009 1:05 pm
Reply with quote

Hi pearl,

Below links will help you

www.ibmmainframes.com/viewtopic.php?t=10181&highlight=cobol+email
www.ibmmainframes.com/viewtopic.php?t=28445&highlight=cobol+email
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 04, 2009 5:59 pm
Reply with quote

Quote:
And this program should run after every five minutes
Is this an online program and if so which online system?
Back to top
View user's profile Send private message
pearl1

New User


Joined: 04 Aug 2009
Posts: 3
Location: india

PostPosted: Wed Aug 05, 2009 11:38 am
Reply with quote

Thanks for the answers. Actually i am working on Content Manager V7.1.
Back to top
View user's profile Send private message
pearl1

New User


Joined: 04 Aug 2009
Posts: 3
Location: india

PostPosted: Wed Aug 05, 2009 12:39 pm
Reply with quote

I need to send through SMTP server.
thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 05, 2009 4:45 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 05, 2009 8:31 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top