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=('[email protected]')       
  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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Free space of a mulitvolume PS datase... TSO/ISPF 7
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts Identify Number of Multivolume Dataset All Other Mainframe Topics 5
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
Search our Forums:


Back to Top