The SAS Output Delivery System and reporting techniques

ODS and JPEG

Reply
Frequent Contributor
Posts: 89

ODS and JPEG

has somebody an example how to direct the oupput of a PROC REPORT to a JPG, PNG, GIF, ..... and email this jpg (imbedded in the mail) ??

regards,
Herman
SAS Super FREQ
Posts: 8,864

Re: ODS and JPEG

Hi:
No answers, just some general comments.

Aside from any issues of SAS and ODS, whether you can embed images (JPG, GIF or PNG) into an automated email message is probably a function of your mail client and the capabilities of the mail software. For example, on a Windows platform, if mail comes to me as plain text from someone, any pictures come as attachments. On the other hand, some folks send me mail in other formats (RTF or HTML) where the image seems to load when I open the mail, but I see that the images are actually attachments and Outlook apparently opens the image for me when I open the mail. When I send mail to someone, if I have images (like pictures from my camera), all those images appear on my system as being in the body of the mail when I compose the mail...but when someone gets the mail -- especially if they're on an older system, their mail client will not automatically open the images. So -- before you go down this road -- do you know whether your mail system actually allows the embedding (true embedding) of images in mail messages?

Next, there used to be a procedure called PROC GPRINT (not much used anymore, since the advent of ODS) that essentially allowed you to send an ASCII text file (such as an output report from the LISTING window) to a GRSEG entry in a graph catalog. So that meant that first, you had to capture your LISTING output into a text file and then second, you had to use PROC GPRINT to turn the TXT or LST file into an image and then third, you had to do whatever you were going to do with the image (like export from the SAS/GRAPH catalog to an external file). Of course, you can do all those things programmatically -- but do folks really want a LISTING look and feel report emailed to them as an image in the body of an email (assuming you can even embed the image in a mail message)???

Personally, I'd create a PDF file of the PROC REPORT output using ODS and then use the email FILENAME engine to email the PDF file as an attachment -- you'd get all the ODS style used for the output look and feel. Nobody would be able to change the PDF file unless they went to a LOT of work with Adobe Acrobat or PageMaker or an Adobe editing product and, unlike HTML files, PDF files will embed any images into the PDF format, so you do not have to worry about any external image files (if you were combining a PROC REPORT and SAS/GRAPH output). If you REALLY wanted to make a file that could only be printed, then you could look at creating a PostScript file or a PCL (HP Printer Control Language file) -- to send as an attachment -- but folks might have trouble figuring out how to print that version of the file if they didn't automatically see a PRINT menu choice.

For more information on emailing ODS output as an attachment, refer to the examples in these notes:
http://support.sas.com/kb/24/969.html (specific z/OS and PDF example)
http://support.sas.com/kb/23/636.html (more general examples)

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 247 views
  • 0 likes
  • 2 in conversation