MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP file via email from MVS.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Wed Sep 28, 2022 9:24 am    Post subject: FTP file via email from MVS. Reply with quote

Hi,

My requirement is to send dataset in mainframe via email. I have written the below JCL. I am getting email, but the attached text file is blank. Please give suggestion where it went wrong.

JCL is as below.

Code:

//STEPNAME EXEC PGM=SYNCGENR,REGION=2M                         
//*                                                             
//SYSUT1   DD   DSN=DATASET1,DISP=SHR                 
//         DD   DSN=DATASET2,DISP=SHR       
//         DD   DSN=DATASET3,DISP=SHR                 
//SYSUT2   DD   SYSOUT=(B,SMTP)                                 
//SYSPRINT DD   SYSOUT=*                                       
//SYSUDUMP DD   SYSOUT=*           
                             

DATASET1 CONTENTS ARE AS BELOW
Code:

HELO SYSA                                                       
MAIL FROM: <EMAIL ID>                 
RCPT TO: <EMAIL ID>                   
DATA                                                           
FROM: <EMAILID>                       
TO: <EMAILID>                         
SUBJECT: SUBJECT DESCRIPTION                 
MIME-VERSION:1.0                                               
CONTENT-TYPE:MULTIPART/MIXED;BOUNDARY=MIME_BOUNDARY             
                                                               
--MIME_BOUNDARY                                                 
CONTENT-TYPE:TEXT/PLAIN                                         
CONTENT-DISPOSITION:INLINE                     

----TEXT HERE

--MIME_BOUNDARY                                                         
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="FTP.TXT"   
CONTENT-TYPE: TEXT                                                                 
     

DATASET 2 CONTAINS THE ACTUAL DATA TO BE TRANSMITTED VIA EMAIL
DATASET 3 CONTENTS ARE AS BELOW.
Code:

.     
QUIT 


JCL AFTER executing sending blank file without contents. Please help.
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Wed Sep 28, 2022 10:09 am    Post subject: Re: FTP file via email from MVS. Reply with quote

tvssv wrote:

--MIME_BOUNDARY
CONTENT-TYPE:TEXT/PLAIN
CONTENT-DISPOSITION:INLINE


tvssv,

You are requesting that content to be INLINE and hence no attachment.

If you had searched the forums for "email attachment" you would have found this

https://www.mvsforums.com/helpboards/viewtopic.php?t=439&highlight=attachment
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group