Solved

SAS Email Chart as attachment code

Posted on 2014-12-11
2
291 Views
Last Modified: 2016-02-13
Hello,

I am new to coding in SAS.  I have several control charts using the code below.
proc shewhart data=MyWork.TREND; by recCd;
xchart BALAMT * MonYr / sigmas=2;
      run;
I would like to attached the chart ,as a pdf, that has outlyers and send it via email to notify the owner.  
Is there Syntax that i could used to accomplish this?
0
Comment
Question by:Thomask23
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ShannonEE earned 500 total points
ID: 40495021
Dear  Thomask23,

SAS can connect and send emails.  The usual means is to write to a file which has been set to point to the e-mail system that is available to your running system.  You give it
To:
From:
Sender:
Subject:
and
Attach:
lines, all by just writing out the required values using sas put statements.

It is then up to you to ensure that the one or more attachments (be it a HTML, rtf, text or pdf files) have already been generated.

You can use sas ods statement to get results in pdf format, and specify where the pdf file will be temporarly (or permanently) stored.

The following link from a SAS user group conference gives a very good example, with explaination of the steps involved.

Sending SAS reports by email

Ian
0
 
LVL 8

Assisted Solution

by:ShannonEE
ShannonEE earned 500 total points
ID: 40495046
Dear Thomask23,

How you specify the ods statements and how you code up the filename and data step will depend on how you are accessing SAS.

Do you have a stand-alone copy of sas foundation or run from a server?
Are you using enterprise guide?
Are  you using sas add-in for ms office?
Do you access SAS through a browser and SAS Studio?

If you can set up and run code similar to that in the link above, well good.  If you are restricted by your current set up then we should be able to supple pointers on how to proceed to get a successful email link working.

Ian
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Facing problems with you memory card? Cannot access your memory card? All stored data, images, videos are lost? If these are your questions...than this small article might help you out in retrieving your lost or inaccessible data.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question