Solved

SAS Email Chart as attachment code

Posted on 2014-12-11
2
284 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now