IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sending a dataset as a mail attachment


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rarvins

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Mon Mar 19, 2007 3:01 pm
Reply with quote

I have the following JCL which sends a dataset by mail. It's working fine and I am getting the dataset. But the content of the dataset is present in the body of the mail. But my requirement is that it should be as an attachment. Can somebody suggest an option to send the dataset as an attachment:

Code:

//PS070    EXEC PGM=IKJEFT01,PARM='%NOEMAIL'                   
//DATA2SND DD  DSN=datasetname,DISP=SHR           
//PARMFILE DD  DSN=CNTLCARD,DISP=SHR
//SYSPROC  DD  DSN=FIX.ISPF.EXECS,DISP=SHR                     
//         DD  DSN=PROD.ISPF.EXECS,DISP=SHR                   
//         DD  DSN=SYS7.ISPF.EXECS,DISP=SHR                   
//SYSTSPRT DD  SYSOUT=*                                       
//SYSOUT   DD  SYSOUT=*                                       
//SYSTSIN  DD  DUMMY                                           
//*       


Cntlcard:
SUBJECT=** TEST MAIL **
TO=recipent
FROM=sender
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Mar 19, 2007 5:52 pm
Reply with quote

Code:

//SASSTEP  EXEC SAS,                                           
// OPTIONS='EMAILHOST=nn.nnn.n.nnn EMAILSYS=SMTP EMAILPORT=25'
//SAS.SASLOG  DD SYSOUT=*                                     
//SAS.SYSDUMP DD SYSOUT=*                                     
//SAS.SASLIST DD SYSOUT=*                                     
//SYSIN    DD *
FILENAME OUTBOX EMAIL                                         
  TO=('RECIPIENT@DOMAIN.COM')       
  SUBJECT='MY SAS OUTPUT'                                     
  TYPE='TEXT/PLAIN'                                           
  ATTACH="DATASET.TO.ATTACH";                                 
DATA _NULL_;                                                   
FILE OUTBOX;                                                   
PUT 'THIS IS JUST A TEST';                                     
RUN;                                                           
/*                                                             
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top