×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sending email attachments from MVS COBOL

Sending email attachments from MVS COBOL

Sending email attachments from MVS COBOL

(OP)
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?
 

RE: Sending email attachments from MVS COBOL

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)?  

RE: Sending email attachments from MVS COBOL

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close