Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stay Connected to Work Away from Work: A Simple Approach to Send Emails from SAS® using VBScript Paper #124-2018.

Similar presentations


Presentation on theme: "Stay Connected to Work Away from Work: A Simple Approach to Send Emails from SAS® using VBScript Paper #124-2018."— Presentation transcript:

1 Stay Connected to Work Away from Work: A Simple Approach to Send Emails from SAS® using VBScript
Paper #

2 Walkthrough Introduction Purpose Existing methods Approach
Code Snippets system Conclusion

3 Introduction “The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency” -Bill Gates A simple, efficient and reliable standalone approach of sending s through SAS® and VBScript Builds Dynamic contents

4 Purpose Periodic statistical report generation Review of reports
Share with cross functional teams Avoid Manual Errors Increase efficiency Automation

5 Existing methods SAS® supports three interface methods to send e-mail
MAPI SMTP VIM Downside – Need to tweak SAS® configuration file

6 (Recipients, Attachments, HTML files/links)
Approach Collaboration Data Objects (CDO) SMTP Server SAS Code (Recipients, Attachments, HTML files/links) VBSCRIPT

7 SAS® Code Get required macro variables (&name &date &day &month &year)
Create a format to represent the months of the year

8 Embedded VBScript file in SAS® code to generate e-mail

9 VBScript code Input to VBScript code may contain 3 strings:
Optional flag to alter the Subject to inform recipients of an error Full path to attachment Semicolon separated list of addresses

10 Step by Step Approach Specify VB arguments and build an object to pull the username from the network.  Set My =CreateObject("CDO.Message") Set objNetwork = CreateObject("Wscript.Network") Get current date stamp for log file y = year(now) m = month(now) d = day(now) if m < 10 Then m = "0" & m end if if d < 10 Then d = "0" & d end if isoDate = y & m & d

11 Step by Step Approach Confirm your script is called as expected
Enter subject, attach username to the domain and specify the To, Cc and Bcc parameters

12 Step by Step Approach Create Body from SAS® DataSet to HTML
'My .CreateMHTMLBody "<your file path>.html" Mechanism to send messages cdoSendUsingPickup (1) cdoSendUsingPort (2) cdoSendUsingExchange (3) Port Used: My .Configuration.Fields.Item ("

13 Step by Step Approach Once the messages have been picked up, they are sent to an SMTP server  My .Configuration.Fields.Item(" Specify the SMTP port number and send the . My .Configuration.Fields.Item(" ort")=25 My .Configuration.Fields.Update My .Send set My =nothing

14 system

15

16

17 Contact Information Name: Nikita Sathish Company: Seattle Genetics City/State: Bothell, Washington Phone: (425)


Download ppt "Stay Connected to Work Away from Work: A Simple Approach to Send Emails from SAS® using VBScript Paper #124-2018."

Similar presentations


Ads by Google