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
 

 

Send Mail using COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Fri Jun 19, 2009 9:58 am    Post subject: Send Mail using COBOL
Reply with quote

Dear Friends is there any way to send mail using COBOL program.

Following is my requirement:
While the execution of program, If the count of two variables are not in match then i need to send a mail.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7990
Location: Bellevue, IA

PostPosted: Fri Jun 19, 2009 4:30 pm    Post subject:
Reply with quote

While I haven't done it, if you assign a DD name to your site SMTP and write properly formatted records to that file, the email should be sent when you close the file. If you don't know the record formats, Google RFC 2821 and that IETF document will give you the details.
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Fri Jun 19, 2009 5:15 pm    Post subject:
Reply with quote

We use to invoke pgm SMTPMAIL while sending mail thru JCL.
Is there any possible way to invoke it from COBOL....
Like call 'SMTPMAIL' USING <some parameters> needed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7990
Location: Bellevue, IA

PostPosted: Fri Jun 19, 2009 5:30 pm    Post subject:
Reply with quote

Now that would depend upon your site, wouldn't it? You need to contact your site support group, find out where the SMTPMAIL program came from, and proceed based on that. If SMTPMAIL is nothing but a pass through for the SMTP commands, then it will be trivial to use it from COBOL. If SMTPMAIL is a vendor product, someone from your site will need to contact the vendor for details about using the product as a subprogram.
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Fri Jun 19, 2009 6:05 pm    Post subject:
Reply with quote

I can find the load of the program SMTPMAIL from Linklib. Where do i found code or how can i understand the machine language.........
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jun 19, 2009 6:11 pm    Post subject:
Reply with quote

Manigandan Aravindhan wrote:
how can i understand the machine language.........
LOL-- probably no one can. You may try your luck searching for SMTPMAIL under ISRDDN though or in the base library of source module at your shop -- that's site specific.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jun 19, 2009 6:51 pm    Post subject: Reply to: Send Mail using COBOL
Reply with quote

Manigandan,

Search the forum as this had been discussed before.

I had used IEBGENER to send mails.
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: Fri Jun 19, 2009 11:21 pm    Post subject:
Reply with quote

Hello,

One way to do what you want is to code your program to set a specific non-zero return code when then e-mail needs to be sent and then use a conditional iebgener step to send the mail as Aaru mentioned.

You also could try writing the e-mail directly out of the cobol program to the same destination you would use to send via iebgener/smtp.

Suggest that you do not make this overly complicated. . .
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Wed Jun 24, 2009 6:05 pm    Post subject:
Reply with quote

Dear All,
Thanks for the suggestions given by you all.
I had did it in cobol pgm by caling the program SMTPMAIL.

The suggestion gave by Dick is really a good one but my client didnt accepted that to happen.

once again thanks a lot to everyone to spend yours valuable time in this topic. icon_smile.gif
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 how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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