Purpose Real life scenario: I have a set of reports to refresh every month but data is only available at any day during Day 3 – 5 at beginning of each.

Slides:



Advertisements
Similar presentations
Little Used, but Powerful Features with GP Cathy Fregelette, CPA, PMP Practice Manager BroadPoint Technologies September 20, 2012.
Advertisements

Program Management Portal: Overview for the Client
GALVESTON COUNTY, TX P-CARD TRAINING GALVESTON COUNTY.
Outlook 2010 Quick Guide Table of Contents: Overview of client, Sending/Receiving , Using the address book………..……… Sent Items……………………………………………………………………………………………..…..8.
Newsletter Plugin The newsletter plugin allows you to create and send newsletters to a managed list or multiple lists of users. Your users can subscribe.
Using the Windows Event Viewer and Task Scheduler Chapter 5.
RIMS II Online Order and Delivery System Tutorial on Downloading and Viewing Multipliers.
Using Endnote Tiffany M. Bludau September 5, 2007.
A detailed guide on how to set-up your printing storefront. Please Note: Storefronts are compatible with all browsers, however for optimal use of the admin.
NAWD National Conference on Student Activities – 2009 can produce Yip-pees! Saturday December 5, 2009 – Fort Lauderdale, FL Lou Miller – Executive Director,
Copyright © 2010, Meta-Xceed, Inc. All rights reserved. BI Flash and all other Meta-Xceed Inc. product or service names are registered trademarks or trademarks.
Poster Template for a 30 x 40 Poster
Advanced User Guide to Outlook and all its features.
SqlReports Dean Dahlvang PSUG-MO March About Dean Dean Dahlvang Director of Administrative Technology for the Proctor.
Gadgets & More…. “Date Range” Gadgets Allows you to choose a specific date, before or after a date or a range of dates using the Workflows calendar.
Microsoft ® Office Access ™ 2007 Training Choose between Access and Excel ICT Staff Development presents:
1 Baltimore City Legislative Tracking System Enter UserID (typically firstname.lastname) Password: Initially.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Communication Tools Presented by: Lauren Velazquez Presented by: Lauren Velazquez.
Hello We are looking for a coder to code the following We have a network that has different sites: we need an application that will scan the network and.
Google Apps (Education Edition) A step guide to a successful deployment January 10 th, 2008 California Technology Assistance Project
How to Create a Document in Google Drive By Tressa Beckler.
My Workspace ELearning in Sakai Randy Graff, PhD HSC Training.
What is Web Site Administration Tool ? WAT Allow you to Configure Web Site With Simple Interface –Manage Users –Manage Roles –Manage Access Rules.
NetTech Solutions Microsoft Outlook and Outlook Express Lesson Four.
Online Surveys Jacqui James Malcolm Roberts School of Education.
Unit #7 Charts Questions? Comments?. MS PPT 2007: Presentations Made Easy; Planning and Preparing PowerPoint allows you to create a professional presentation.
While You Were Sleeping… SAS Is Hard At Work Andrea Wainwright- Zimmerman.
Thank you for looking into Policy Manager Two for your Head Start program Teresa K. Wickstrom Senior Associate Center for Community Futures
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
3M Partners and Suppliers Click to edit Master title style USER GUIDE Supplier eInvoicing USER GUIDE The 3M beX environment: Day-to-day use.
Invoices and Service Invoices Training Presentation for Raytheon Supply Chain Platform (RSCP) April 2016.
1 Terminal Management System Usage Overview Document Version 1.1.
MANAGEMENT REPORTER TIPS AND TRICKS DEREK KREBS | MSX GROUP.
Welcome POS Synchronize Concept 08 Sept 2015.
A step-by-Step Guide For labels or merges
Pre-Production Meet with the client to create a project plan:
5.2 Microsoft Excel.
Project Management: Messages
Your Name Proposal Creation Module 5 Your Name
Scheduled Report ing From CounterPoint.
An authorized user can make payments on your account by logging on with their own username and password. Click on the Authorized Users tab to add an authorized.
Mail Merge for Lotus Notes and Excel User Guide
SubAnywhere: Setup and Configuration
Focal Point Responsibilities
Microsoft Outlook By: Phuong Nguyen.
Mail Merge for Lotus Notes and Excel User Guide
Customer Online Ordering
CS3010 Beacon Module 3 Contacts
CS3015 Beacon Module 4 Messenger & Setting Preferences
Aeries Web Health Assistants & Nurses
How do I get started? Log in to your Google Account and click on Calendar OR, from your Inbox, click on Calendar in the top left corner Choose your view.
5.2 Microsoft Excel.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Oracle Sales Cloud Sales campaign
Poster Template for a 30x40 Poster
Beautiful PROC CONTENTS Output Using the ODS Excel Destination
Yoel Kortick Senior Librarian
Poster Template for a 30x42 Poster
Automating SAS through the Power of VB Script
Trigger %macro check_trigger_run;
Poster Template for a 30 x 40 Poster
SOP of Configuring Auto-mail Alarm
Data Manipulation (with SQL)
Using EDMODO In The Classroom
Product Overview.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Tips and Tricks for Using Macros to Automate SAS Reporting.
About Quick Base Technical notes
Using Veera with R and Shiny to Build Complex Visualizations
Presentation transcript:

Purpose Real life scenario: I have a set of reports to refresh every month but data is only available at any day during Day 3 – 5 at beginning of each month. What do I do to make it easier? This poster illustrates my solution to the scenario above that… Leverages ODS output, Email Access and built-in SAS EG Scheduler to … Set up an automatic process from data availability check to email delivery on final reports In an effort to save time & efforts for repeated work. Hope you will learn a bit of something new after reading this poster!

Basic Reporting Framework (All done in SAS) Trigger Main Code Module SAS ODS Output Reports SMTP access "Data not available" Email Check Point 1 Email Check Point 2 "Code completed with error. Check log" "Data available. Report is running now"

Does trigger file 201903 exist? Designed to start (if data is available) and to end (if code has run successfully in last iteration) How it works for our case - Schedule the SAS project to run each day on Day 3 – 5 of each month Check if a 'trigger file' exist – 'Have I run this project for this month?' If answer is NO: Check if data is available; only run the remaining of the project if data is ready. Save a 'trigger file' which could be read in next iteration to decide question in Step 2. Does trigger file 201903 exist? YES No action NO Is data available? Go to main module YES NO Reports No action Trigger_ File_201903 (Avoid duplicate efforts in next iteration)

Tips on Main Code Module Think of it as one 'task' instead of hundreds of code lines… 1. Macro your libraries – easy to organize (and to 'transition' to others too!) 2. Use %include – easy to slice and dice, debug and arrange your long, long code. 3. Save a copy of SAS EG for editing; one simpler version for scheduling to run. /*define libname*/ libname code 'M:\Katie_Zheng\_Code'; libname output 'M:\Pivot Creation\_Output'; /*generate pathname macro*/ %let path2code = %sysfunc(pathname(code)); %let path2output = %sysfunc(pathname(output)); /* Read code*/ %include "&path2code\Macro_Prep.sas"; /* Exporting data */ %let vint_f="&path2output\portfolio_tracking_output.csv"; proc export data=temp dbms=csv outfile= &vint_f. replace ;run ;

SAS ODS Output There are so many formats! Note 1: Choose format based on your reporting need A simple text email or attach a detailed report? One pager or multiple pages? Tables and charts? Note 2: Be careful with sensitive data - always check company policy before saving/outputting your data Summary data v/s. account-level data details? Customer data - PII? Example – a xml file with 2 pages of tables: ods tagsets.excelXP file ='&path2output\Digital_Acq_Summary.xml' options(sheet_interval ='no' sheet_name ='Vol Summary' embedded_titles = 'yes'); /*Page 1*/ title 'Volume Summary'; proc print data=vol_summary;run; title; /*Page 2*/ ods tagsets.ExcelXP options(sheet_interval='proc' sheet_name ='Volume by Segment' embedded_titles = 'yes'); title "Volume by segment"; proc print data=vol_by_seg;run; ods _all_ close;

SAS Email Method - SMTP Format 1: With attachment Format 2: Content only /******************** Email Setup************************/ filename eoutput email "katie.zheng@td.com" /*To list*/ cc = ("abc@mail.com","xyz@mail.com") /*CC list*/ subject="USBC Credit Risk Strategy Quick View" from="Katie Zheng <katie.zheng@td.com>" /*Shows sender name better*/ replyto="Katie Zheng <katie.zheng@td.com>" /* replies will not be sent to a unreachable systemic email address*/ Attach="&path_output\Weekly_View_Report.pdf"; /* Email it out*/ data _null_; file eoutput; put "Please see attached for Weekly Review Report"; /*email content*/ run; /******************** Email Setup************************/ filename eoutput email ("katie.zheng@td.com") subject="USBC DTI Decline Summary" from="Katie Zheng <katie.zheng@td.com>" content_type = "text/html"; ods html body = eoutput; ods html text="Expectation: No change pre/post implementation(2018-09-06)."; ods text = "DTI decline rate"; proc print data = app_sum noobs style(data) = [fontsize=9pt] style(header) = [fontsize=9pt];run; ods _all_ close;

SAS Scheduler "File" -> "Schedule project_name" -> Click tab "Triggers" -> Edit …

SAS Scheduler – additional notes 'Only run when user is logged on' – otherwise might require admin authorization. Save the SAS project at local drive/disk! Scheduler script name – be sure it is executed after renaming. Other helpful configurations… Check tab History for schedule failure info Additional settings

"Data available. Report is running now" A Final thought to make the process more fun Add in the beginning of the code with an email – to remind myself today is the day for reporting! "Data not available" Email Check Point 1 "Data available. Report is running now"