Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending email attachments from MVS COBOL

Status
Not open for further replies.

weberm

Programmer
Dec 23, 2002
240
0
0
US
I have a JCL set up to email reports by merging files containing the headers and body (report) and copying it to a file with destination TCPSMTP. This creates an email which contains the report, but I would like to be able to send the data file as an email attachment. Has anyone else attempted this?
 
It may help if you post the jcl from the step that writes to your local SMTP and the content of the e-mail file.

If you are writing to SMTP directly, you will need additional control statements. . . i.e.:
Code:
MIME-VERSION: 1.0 
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY" 
--SIMPLE BOUNDARY 
CONTENT-TYPE: TEXT/PLAIN 
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=EMAILATT.TXT

Does your system have XMITIP installed (it is free)?
 
Here is the JCL used to send the email:
Code:
//STEP02   EXEC PGM=IEBGENER                        
//SYSPRINT DD SYSOUT=*                              
//SYSOUT   DD SYSOUT=*                              
//SYSUT2   DD SYSOUT=(A,TCPSMTP)                    
//SYSIN    DD DUMMY                                 
//SYSUT1   DD DSN=RDR.PSEMAIL.RDR60.HEADER,DISP=SHR 
//         DD DSN=RDR.RDR60.DOWNLOAD,DISP=SHR       
/*
This is what's in RDR.PSEMAIL.RDR60.HEADER (RDR.RDR60.DOWNLOAD is the file I wish to send):
Code:
HELO SAM                                                        
MAIL FROM:<weberm@state.fl.us>                                
RCPT TO:  <weberm@state.fl.us>                                
RCPT TO:  <francism@state.fl.us>                         
DATA                                                            
FROM: RCP_EMAIL                                                 
TO:   <francism@state.fl.us>,<weberm@state.fl.us>      
SUBJECT: *TEST* RCP Nightly Batch RDR60 file *TEST*
As far as I know, we do not have XMITIP installed. I once did something similar with a UNIX shell script that I recall required using UUENCODE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top