.pptx) using the ODS PowerPoint destination and properly closed it with:FILEEXIST=1).FCOPY successfully copies the PPTX to a local WORK directory (RC=0)..pptx files rather than a problem with the PowerPoint file itself..pptx attachments being truncated or corrupted when sent through the SAS Email engine? If so, were there any recommended workarounds or configuration changes?You might try something like zipping the pptx file before emailing it, if you suspect it's getting corrupted by SAS or your mail server. Maybe that's a silly idea, since pptx is literally a zip file.
You could try changing the extension on the .pptx to something neutral like .txt in case your email system has blocker on sending .pptx files.
If you have IT support, you might want to check with them to see if they can see if the mail server logs say anything interesting.
I guess it's possible SAS somehow munged the file during upload. If you do a simple .pptx with just one slide from PROC PRINT, does the email work?
The usual way to add an email attachment that is for a specific application is to use the CONTENT_TYPE option. Try something like this:
filename mymail email "[email protected]"
subject="PPT Test"
attach=("MyPPT.pptx" content_type="application/pptx");
data _null_;
file mymail;
put 'Hi Me,';
put 'This is a test.';
run;
If you copy a BINARY file as TEXT it can become corrupted.
Please share the code you used for FCOPY , in particular how you defined the two FILEREFs used. Make sure your are not using RECFM=V. Using RECFM=F is best, RECFM=N might work also.
RECFM= option was specified.RECFM= option was specified.
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →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.
Ready to level-up your skills? Choose your own adventure.