Home > Archive > Cobol > December 2004 > Email from JCL with attachment
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 from JCL with attachment
|
|
| Bill Gentry 2004-12-20, 8:55 pm |
| OK, I've been spinning my wheels on this for a bit.
I want to send an email from a JCL *with an attachment*.
I'm able to send the email, but I can't get a file to attach.
The following JCL ( with some particulars changed to protect the innocent )
is what I have that works, so far:
//IMAUSERA JOB (,,0000,0000,0,00),'SEND AN EMAIL',
// CLASS=N,MSGCLASS=Q,MSGLEVEL=(1,1),NOTIFY
=IMAUSER
//IEBGENER EXEC PGM=IEBGENER
//OUTPUT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
HELO MBPGHA
MAIL FROM:<IMAUSER@THECO.COM>
RCPT TO:<BILL.GENTRY@NOSPAM.COM>
DATA
TO:BILL.GENTRY@NOSPAM.COM
SUBJECT: THIS IS A TEST!
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
BOUNDARY="----_=_NEXTPART_000_01C0DFAD.3EF4A2D0"
THIS MESSAGE IS IN MIME FORMAT...
------_=_NEXTPART_000_01C0DFAD.3EF4A2D0
CONTENT-TYPE: TEXT/PLAIN;
CHARSET="ISO-8859-1"
THIS IS A TEST!
FIRST MESSAGE!
SECOND MESSAGE!
------_=_NEXTPART_000_01C0DFAD.3EF4A2D0--
/*
//SYSUT2 DD SYSOUT=(X,ZSPTCPM)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
Anyone have any idea *how* I code the attachment???
Any input is appreciated!
| |
| Richard 2004-12-20, 8:55 pm |
| Anyone have any idea *how* I code the attachment???
There must be a blank line between the MIME header and the body of each
part:
Each attachment would be within its own set of bondaries.
TO:BILL.GEN...@NOSPAM.COM
SUBJECT: THIS IS A TEST!
MIME-VERSION: 1.0
CONTENT-TYPE:
MULTIPART/MIXED;BOUNDARY="----_=_NEXTPART_000_01C0DFAD.3EF4A2D0"
<blank line here>
THIS MESSAGE IS IN MIME FORMAT...
----_=_NEXTPART_000_01C0DFAD.3EF4A2D0
CONTENT-TYPE: TEXT/PLAIN; CHARSET="ISO-8859-1"
<blank line here>
THIS IS A TEST!
FIRST MESSAGE!
----_=_NEXTPART_000_01C0DFAD.3EF4A2D0
CONTENT-TYPE: TEXT/PLAIN; CHARSET="ISO-8859-1"
<blank line here>
SECOND MESSAGE!
------_=_NEXTPART_000_01C0DFAD.3EF4A2D0--
| |
| YukonMama 2004-12-21, 3:55 am |
| >From: "Bill Gentry" Bill@nospam.com
>Date: 12/20/04 8:25 P.M. Eastern Standard Time
>
>OK, I've been spinning my wheels on this for a bit.
>
>I want to send an email from a JCL *with an attachment*.
Check out Lynol B Dick's XMIT/IP. It's written in REXX and it's free! You
can do a Google search and find it several places.
We had it installed about a year ago and the users have gone e-mail attachment
happy. About 90% of our inventory reports are now going out as comma delmited
files and some of my financials. Since auditors want paper some go out as
both.
We still haven't explored many of it's capabilities, and they are many more
besides the use we put it to.
| |
|
|
|
|
|