Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

to send email thru cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: to send email thru cobol program
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    Post subject:
Reply with quote

Hi pearl,

Below links will help you

http://www.ibmmainframes.com/viewtopic.php?t=10181&highlight=cobol+email
http://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: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Tue Aug 04, 2009 5:59 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Wed Aug 05, 2009 4:45 pm    Post subject:
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

Site Director


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

PostPosted: Wed Aug 05, 2009 8:31 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us