While You Were Sleeping… SAS Is Hard At Work Andrea Wainwright- Zimmerman.

Slides:



Advertisements
Similar presentations
11-Jun-14 The assert statement. 2 About the assert statement The purpose of the assert statement is to give you a way to catch program errors early The.
Advertisements

Microsoft ® Office 2007 Training Security II: Turn off the Message Bar and run code safely P J Human Resources Pte Ltd presents:
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Save time with templates Create your own templates Say you often use a certain invoice whose basic content stays the same except for certain details that.
City of Chicago Cyber Grants Instruction Manual
11-Jun-15 Exceptions. 2 Errors and Exceptions An error is a bug in your program dividing by zero going outside the bounds of an array trying to use a.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
16-Jun-15 Exceptions. Errors and Exceptions An error is a bug in your program dividing by zero going outside the bounds of an array trying to use a null.
Exceptions. Errors and Exceptions An error is a bug in your program –dividing by zero –going outside the bounds of an array –trying to use a null reference.
1 of 6 Parts of Your Notebook Below is a graphic overview of the different parts of a OneNote 2007 notebook. Microsoft ® OneNote ® 2007 notebooks are digital.
Virtual Library Workshop. To access the Virtual Library you must be signed into Campus Connect. Once you are signed in: 1. Click on the Library tab at.
Scams Stevie's Scam School videos
SharePoint document libraries I: Introduction to sharing files How to add and edit files Wondering how to actually work with a document library? You’re.
Get up to speed A new file format One more big change in the new version of Word: an improved file format. What does that mean to you? The new file format.
Internet Research Finding Free and Fee-based Obituaries Online.
Computer Technology Part 5 Megan Rees ERMS 5/13.  Set of program instructions that attaches itself to a file, reproduces itself, and/or spreads to other.
Get up to speed Send and receive attachments and pictures Sending and receiving attached files in Outlook 2007 is just as easy as it’s always been—and.
While Loops and Do Loops. Suppose you wanted to repeat the same code over and over again? System.out.println(“text”); System.out.println(“text”); System.out.println(“text”);
This is group I have made.  Deleted all the s we didn’t need to clear out our .  Then created folders for the s we would receive.
Automating Tasks with Macros. Macro Essentials  A macro is a list of actions that happen when you run the macro.  Creating a Macro: − Choose Create.
Information guide.
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
Back to content Final Presentation Mr. Phay Sok Thea, class “2B”, group 3, Networking Topic: Mail Client “Outlook Express” *At the end of the presentation.
LBTO IssueTrak User’s Manual Norm Cushing version 1.3 August 8th, 2007.
Quick Reference Guide New functionalities within your hotelcareer company center.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
BZUPAGES.COM. PRESENTED TO: SIR AHMED KARIM PRESENTED BY: MUHAMMAD FAISAL RAO Malik Shabaz Asif BIT Department Of Information Technology Institute.
The KS3 online test -The software. - You must be really familiar with this application to show what you can do! In the test all the detailed.
In addition to Word, Excel, PowerPoint, and Access, Microsoft Office® 2013 includes additional applications, including Outlook, OneNote, and Office Web.
OCAN College Access Program Data Submissions Vonetta Woods HEI Analyst, Ohio Board of Regents
1 IE in the Classroom The Internet Explorer Web Browser EDW647 Internet for Educators Roger Webster, Ph.D. Millersville University Department of Computer.
Program Development Life Cycle (PDLC)
1. Chapter 25 Protecting and Preparing Documents.
SharePoint document libraries I: Introduction to sharing files Sharjah Higher Colleges of Technology presents:
© 2012 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 1 © 2012 Cisco and/or its affiliates. All rights reserved. 1 Voice Mailbox.
Macro Overview Mihaela Simion. Macro Facility Overview Definition : The SAS Macro Facility is a tool within base SAS software that contains the essential.
© 2013 Cisco System Inc. All rights reserved Cisco Confidential 1 © 2013 Cisco System Inc. All rights reserved. 1 System Backup And Restore Utility.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
STAYING SAFE: Here are some safety tips when using Change your password regularly and keep it in a safe place. Don’t share your password with anyone.
Using the remote access option on the lab computers Fall 2005.
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
1 © 2005 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Cisco Public Cisco Unity Connection Notification Jane Rygg Core Services.
1 of 3 Microsoft ® Office Communicator 2007 can help you perform a wide range of tasks including secure Instant Messaging (IM). With its rich collaboration.
Matthew Glenn AP2 Techno for Tanzania This presentation will cover the different utilities on a computer.
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
WHAT IS CCB? Community Church Builder. No really, what IS CCB? It’s a Website! You log on with a username and password, just like when you check your.
HEI/OCAN College Access Program Data Submissions.
Using Workflow With Dataforms Tim Borntreger, Director of Client Services.
M STREAM IT running dos C :/ dommand delete D :/ freesize D :/ load D ;/ dagger C :/ toloadtype dag D :/ dag Loading operating win 96 Loading disk.
The OASIS Feedback Process Using OASIS to Drive Improvement.
Configuration File – ProdigyView. Overview Objective Learn how to configure the system through the xml file. Requirements Understanding of the Defines.
SchoolSuccess for Coordinators
A step-by-Step Guide For labels or merges
Getting Started with.
SQL and SQL*Plus Interaction
GLAST Release Manager Automated code compilation via the Release Manager Navid Golpayegani, GSFC/SSAI Overview The Release Manager is a program responsible.
Things To Avoid: 1-Never your password to anyone.
Download from App Store or Google Play Not available on Windows Phones
Exceptions 10-Nov-18.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Automating SAS through the Power of VB Script
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.
Inside a PMI Online Course
Exceptions 25-Apr-19.
Exceptions 22-Apr-19.
Exceptions 10-May-19.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Exceptions 5-Jul-19.
Presentation transcript:

While You Were Sleeping… SAS Is Hard At Work Andrea Wainwright- Zimmerman

Overview Bomb-Proof The Code Handle Any Errors Store The Log Confirm Success Determine Possible Scenarios Schedule Code To Run

Bomb-Proof The Code Any SAS code that you plan to schedule needs to be as error free as possible. – No syntax errors – Run many time through all possible scenarios without errors or issues

Handle Any Errors No matter how well written the code, there still may be unavoidable errors. Where in the code can they happen? What methods can be used to catch these errors? How should they be handled? Examples: – Bad data provided – Database is down – Password has expired

Handle Any Errors - Bad Data Determine what types of bad data are possible. Code logic to catch such issues. Send notification of the data issue. – Both to you and the data provider if possible – Provide noticeable, clear subject line – Determine what useful details to include in the body Skip over sections of code that shouldn’t (or won’t) run on the bad data. – GOTO and LINK are helpful – If no more code is needed ENDSAS is an option

Handle Any Errors - Database Issue To capture an issue with the connection to a database, use the following %check libname macro immediately after the libname statement %macro check_libname; %if &sysdbrc ne 0 %then %do; %send_ (subj=LIBNAME FAIL,text=%superq(sysdbmsg)) endsas; %end; %mend;

Store The Log No matter how well you write the code, and no matter how well you plan for all possible issues, there still is a chance of failure. In these cases you’ll need to review the log to see what happened. proc printto log="C:\My Documents\ project\log_&sysdate..log" new; run;

Confirm Successes At certain points in the process you will want to be notified of successes. If there is a macro that loops s notifying you of the success of step X of Y can be helpful in catching anomalies. – For example, if you get a message about 2 of 2 but never got a message about 1 of 2, you’ll want to review the log.

Confirm Successes - Send_ %macro send_ ( to= &my_e_mail, from=&my_e_mail, subj=, cc= &my_e_mail, text= ); filename sendmail ; data _null_; file sendmail; put '!EM_TO!' "&to"; put '!EM_FROM!' "&from"; put '!EM_CC!' "&cc"; put '!EM_SUBJECT!' "&subj"; body="&text"; put body; run; %mend;

Confirm Successes - Outlook Issues Outlook will want to know if you really want the sent. This defeats the purpose of having the code run overnight and report on it’s progress. There are a few options to handles this.

Confirm Successes - Outlook Issues This is an optional Outlook behavior that can be turned off if you have the permissions or can influence those that do. There are free programs available on-line that will simply “Click Yes” for you that you can install if you have the permissions. You can edit the SAS CFG file to use SMTP instead. See for details.

Determine Possible Scenarios Will the code always produce something? Will there always be something the code needs to do? Are there iterative loops (macros) that notification would be beneficial for? Don’t leave yourself wondering what happened.

Determine Possible Scenarios

Schedule Code To Run Does this code need to run on a repeating schedule or do you just want it to run after hours? To run SAS after hours, use the SLEEP function. For repeating running, each environment has it’s own scheduling tool. For Windows, there is the Scheduled Task.

Schedule Code To Run - Sleep To SLEEP till a specific start time: data _null_; now=datetime(); start=’25JUN2010:19:00:00'dt; wait_sec=start-now; zzz=sleep(wait_sec); run;

Schedule Code To Run - Sleep To SLEEP for a set amount of time: data _null_; hour=5; min=30; wait_sec=(60*60*hour)+(60*min); zzz=sleep(wait_sec); run;

Questions? Andrea Wainwright-Zimmerman