Solved

SAS Email Chart as attachment code

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
allStar challenge 1 43
wordmultiple challenge 12 92
Possible ways to recover from drive crash 29 67
Installed softare without GUID 6 55
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is an explanation of a simple data model to help parse a JSON feed
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
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.

746 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

10 Experts available now in Live!

Get 1:1 Help Now