Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8200
Location: East Dubuque, Illinois, USA

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: 8200
Location: East Dubuque, Illinois, USA

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 Prblem with mail having MIME contents harsh.saxena579 JCL & VSAM 2 Tue Dec 12, 2017 3:48 pm
No new posts Unable to send mail with SMTP commands harsh.saxena579 JCL & VSAM 10 Tue Dec 12, 2017 1:58 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us