For Programmers: Free Programming Magazines  


Home > Archive > Cobol > May 2005 > Email with attachments using IEBGENER









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Email with attachments using IEBGENER
kathie

2005-05-05, 3:55 pm

Hello,

I'm a newbie in COBOL and trying to setup a JCL to send email with
mutiple attachments. It works fine if I let it auto-define the names
of each file. But if I want to assign a specific name to each of the
attached files, it appends all files into the first one.

Can someone shed me some lights on this? Thanks.

This is my JCL...

//STEP01 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=ABC.DEF.HEADER1,DISP=SHR
// DD DSN=ABC.DEF.FILE1,DISP=SHR
// DD DSN=ABC.DEF.HEADER2,DISP=SHR
// DD DSN=ABC.DEF.FILE2,DISP=SHR

This is HEADER1...
HELO CCC01
MAIL FROM:<JDOE@MYEMAIL.COM>
RCPT TO:<JDOE@MYEMAIL.COM>
DATA
SUBJECT: TEST REPORT ATTACHMENTS (FILE1 AND FILE2)
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;BOUNDARY="MIME.PART"
<blank line>
--MIME.PART
<blank line>
--MIME.PART
CONTENT-TYPE: MULTIPART/MIXED;NAME="FILE1.TXT"
<blank line>

This is HEADER2...
--MIME.PART
CONTENT-TYPE: MULTIPART/MIXED; NAME="FILE2.TXT"
<blank line>

jce

2005-05-07, 3:55 am

Doesn't answer you question but you could look into XMITIP which I think can
do this without having to send the smtp commands directly.

JCE

"kathie" <kktbva@yahoo.com> wrote in message
news:1115136705.702138.86770@f14g2000cwb.googlegroups.com...
> Hello,
>
> I'm a newbie in COBOL and trying to setup a JCL to send email with
> mutiple attachments. It works fine if I let it auto-define the names
> of each file. But if I want to assign a specific name to each of the
> attached files, it appends all files into the first one.
>
> Can someone shed me some lights on this? Thanks.
>
> This is my JCL...
>
> //STEP01 EXEC PGM=IEBGENER
> //SYSIN DD DUMMY
> //SYSUT2 DD SYSOUT=(B,SMTP)
> //SYSOUT DD SYSOUT=*
> //SYSPRINT DD SYSOUT=*
> //SYSUT1 DD DSN=ABC.DEF.HEADER1,DISP=SHR
> // DD DSN=ABC.DEF.FILE1,DISP=SHR
> // DD DSN=ABC.DEF.HEADER2,DISP=SHR
> // DD DSN=ABC.DEF.FILE2,DISP=SHR
>
> This is HEADER1...
> HELO CCC01
> MAIL FROM:<JDOE@MYEMAIL.COM>
> RCPT TO:<JDOE@MYEMAIL.COM>
> DATA
> SUBJECT: TEST REPORT ATTACHMENTS (FILE1 AND FILE2)
> MIME-VERSION: 1.0
> CONTENT-TYPE: MULTIPART/MIXED;BOUNDARY="MIME.PART"
> <blank line>
> --MIME.PART
> <blank line>
> --MIME.PART
> CONTENT-TYPE: MULTIPART/MIXED;NAME="FILE1.TXT"
> <blank line>
>
> This is HEADER2...
> --MIME.PART
> CONTENT-TYPE: MULTIPART/MIXED; NAME="FILE2.TXT"
> <blank line>
>



jce

2005-05-10, 8:55 pm

Doesn't answer you question but you could look into XMITIP which I think can
do this without having to send the smtp commands directly.

JCE

"kathie" <kktbva@yahoo.com> wrote in message
news:1115136705.702138.86770@f14g2000cwb.googlegroups.com...
> Hello,
>
> I'm a newbie in COBOL and trying to setup a JCL to send email with
> mutiple attachments. It works fine if I let it auto-define the names
> of each file. But if I want to assign a specific name to each of the
> attached files, it appends all files into the first one.
>
> Can someone shed me some lights on this? Thanks.
>
> This is my JCL...
>
> //STEP01 EXEC PGM=IEBGENER
> //SYSIN DD DUMMY
> //SYSUT2 DD SYSOUT=(B,SMTP)
> //SYSOUT DD SYSOUT=*
> //SYSPRINT DD SYSOUT=*
> //SYSUT1 DD DSN=ABC.DEF.HEADER1,DISP=SHR
> // DD DSN=ABC.DEF.FILE1,DISP=SHR
> // DD DSN=ABC.DEF.HEADER2,DISP=SHR
> // DD DSN=ABC.DEF.FILE2,DISP=SHR
>
> This is HEADER1...
> HELO CCC01
> MAIL FROM:<JDOE@MYEMAIL.COM>
> RCPT TO:<JDOE@MYEMAIL.COM>
> DATA
> SUBJECT: TEST REPORT ATTACHMENTS (FILE1 AND FILE2)
> MIME-VERSION: 1.0
> CONTENT-TYPE: MULTIPART/MIXED;BOUNDARY="MIME.PART"
> <blank line>
> --MIME.PART
> <blank line>
> --MIME.PART
> CONTENT-TYPE: MULTIPART/MIXED;NAME="FILE1.TXT"
> <blank line>
>
> This is HEADER2...
> --MIME.PART
> CONTENT-TYPE: MULTIPART/MIXED; NAME="FILE2.TXT"
> <blank line>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com