View previous topic :: View next topic
|
Author |
Message |
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Manigandan,
Search the forum as this had been discussed before.
I had used IEBGENER to send mails. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
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. |
|
Back to top |
|
|
|