Hi there
I need help on building a SAS job to send an email from mainframe. The email has 2-3 lines of content and an attachment. The attachment is a PDS file to attach as a text file. I was able to send mail without attachment. but the attachment part not working for me.
//xxxxxxx JOB MSGCLASS=J,MSGLEVEL=1,NOTIFY=&SYSUID
//SAS9 EXEC SAS
FILENAME MAILBOX EMAIL;
DATA _NULL_;
FILE MAILBOX TO=('xxxxxxx@xxxxx.com')
SUBJECT='MONTHLY FILE';
PUT "Hello xxxx,";
PUT " ";
PUT "This is to inform you that xxxxxxxxxxxxxxxxxx.";
PUT "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.";
PUT " ";
PUT "Best regards,";
PUT "xxxxxxxxxxxxxxxxxxxx";
RUN;
//*
Thank you so much Lasen
It worked exactly as I expected. you made my day.
I think the normal style is to put the email options in the FILENAME statement, rather than in the FILE statement, e.g.:
//xxxxxxx JOB MSGCLASS=J,MSGLEVEL=1,NOTIFY=&SYSUID //SAS9 EXEC SAS FILENAME MAILBOX EMAIL TO=('xxxxxxx@xxxxx.com') SUBJECT='MONTHLY FILE' attach="user.misc.pds(member)"; DATA _NULL_; FILE MAILBOX; PUT "Hello xxxx,"; PUT " "; PUT "This is to inform you that xxxxxxxxxxxxxxxxxx."; PUT "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx."; PUT " "; PUT "Best regards,"; PUT "xxxxxxxxxxxxxxxxxxxx"; RUN; //*
Thank you so much Lasen
It worked exactly as I expected. you made my day.
how do i do that?. I am new to this blog );
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: