Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sending a dataset as a mail attachment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sending a dataset as a mail attachment
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

Moderator Team Head


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

PostPosted: Mon Mar 19, 2007 5:52 pm    Post subject: Re: Sending a dataset as a mail attachment
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us