SAS Software Development with the V-Model Andrew Ratcliffe RTSL.eu Coders Corner Paper 124-2011.

Slides:



Advertisements
Similar presentations
Axio Research E-Compare A Tool for Data Review Bill Coar.
Advertisements

CS 450 Module R4. R4 Overview Due on March 11 th along with R3. R4 is a small yet critical part of the MPX system. In this module, you will add the functionality.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
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.
Lecture 10: Heap Management CS 540 GMU Spring 2009.
Scope and Lifespan of Identifiers. Every function has a scope What does that mean? That means that every identifier that is created in a function (that’s.
Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
MP IP Strategy Stateye-GUI Provided by Edotronik Munich, May 05, 2006.
HORIZONT 1 ProcMan ® The Handover Process Manager Product Presentation HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89.
VBA Modules, Functions, Variables, and Constants
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Pet Fish and High Cholesterol in the WHI OS: An Analysis Example Joe Larson 5 / 6 / 09.
Using Proc Datasets for Efficiency Originally presented as a Coder’s NESUG2000 by Ken Friedman Reviewed by Karol Katz.
Software System Integration
PROC_CODEBOOK: An Automated, General Purpose Codebook Generator
Chapter 18: Modifying SAS Data Sets and Tracking Changes 1 STAT 541 ©Spring 2012 Imelda Go, John Grego, Jennifer Lasecki and the University of South Carolina.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
“SAS macros are just text substitution!” “ARRRRGGHHH!!!”
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Introduction to Shell Script Programming
Automated Data Analysis National Center for Immunization & Respiratory Diseases Influenza Division Nishan Ahmed Data Management Training Cairo, Egypt April.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Functions Part I (Syntax). What is a function? A function is a set of statements which is split off into a separate entity that can be used like a “new.
Instructor: Peter Clarke
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
SAS Macro: Some Tips for Debugging Stat St. Paul’s Hospital April 2, 2007.
INTRODUCTION TO SAS MACRO PROCESSING James R. Bence, Ph.D., Co-Director Quantitative Fisheries Center Professor Department of Fisheries and Wildlife March.
BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
Batch processing and sysparm A step towards scheduling.
Macro Overview Mihaela Simion. Macro Facility Overview Definition : The SAS Macro Facility is a tool within base SAS software that contains the essential.
June 12, 2009 Toronto Area SAS Society 1 What’s new in BASE SAS 9.2 Checkpoint/Restart Rupinder Dhillon Dhillon Consulting Inc.
1 Efficient SAS Coding with Proc SQL When Proc SQL is Easier than Traditional SAS Approaches Mike Atkinson, May 4, 2005.
Define your Own SAS® Command Line Commands Duong Tran – Independent Contractor, London, UK Define your Own SAS® Command Line Commands Duong Tran – Independent.
Introduction to SAS Macros Center for Statistical Consulting Short Course April 15, 2004.
COMP3190: Principle of Programming Languages
BMTRY 789 Lecture 10: SAS MACRO Facility Annie N. Simpson, MSc.
Used to manage the overall project PMN includes: – Project name and purpose – Desired deliverables/outcome – Record of the project results – List of required.
Common Sense Validation Using SAS Lisa Eckler Lisa Eckler Consulting Inc. TASS Interfaces, December 2015.
Lecture 13.  Failure mode: when team understands requirements but is unable to meet them.  To ensure that you are building the right system Continually.
S11-1 ADM , Section 11, August 2005 Copyright  2005 MSC.Software Corporation SECTION 11 MACROS: OVERVIEW.
Chapter 7: Macros in SAS  Macros provide for more flexible programming in SAS  Macros make SAS more “object-oriented”, like R 1 © Fall 2011 John Grego.
While You Were Sleeping… SAS Is Hard At Work Andrea Wainwright- Zimmerman.
CS212: Object Oriented Analysis and Design Lecture 19: Exception Handling.
Copyright © 2004, SAS Institute Inc. All rights reserved. SASHELP Datasets A real life example Barb Crowther SAS Consultant October 22, 2004.
T Project Review WellIT I2 Iteration
MAKING BUSINESS INTELLIGENT SSRS Subscriptions Bradley Schacht Blog:
SharePoint Workflow Prepared By: Eng. Rasha Farouk.
Automated Testing April 2001WISQA Meeting Ronald Utz, Automated Software Testing Analyst April 11, 2001.
QC – User Interface QUALITY CENTER. QC – Testing Process QC testing process includes four phases: Specifying Requirements Specifying Requirements Planning.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapter 25 By Tasha Chapman, Oregon Health Authority.
SAS ® Global Forum 2014 March Washington, DC.
Working Efficiently with Large SAS® Datasets Vishal Jain Senior Programmer.
SOFTWARE TESTING TRAINING TOOLS SUPPORT FOR SOFTWARE TESTING Chapter 6 immaculateres 1.
By Sasikumar Palanisamy
Software Testing.
Section 17.1 Section 17.2 Add an audio file using HTML
SECTION 3 MACROS: OVERVIEW.
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Global and Local Symbol Tables
Lisa Mendez, PhD & Andrew Kuligowski
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Automate Repetitive Programming Tasks: Effective SAS® Code Generators
Stata Basic Course Lab 2.
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.
HP Quality Center 10.0 The Test Plan Module
Writing Robust SAS Macros
Presentation transcript:

SAS Software Development with the V-Model Andrew Ratcliffe RTSL.eu Coders Corner Paper

Overview Best Practice in SAS software development Process… Flow from: requirements to deployment Via: design, build and test Coding specifics A tip for testing your code Andrew Ratcliffe First used SAS in 1983 Provide services through RTSL.eu Blogging on NOTECOLON.INFO »SAS and software development best practice

Best Practice Always driven and guided by business purpose Repeatable set of steps Allows us to plan »Time, cost, skills, effort Allows us to create templates and guidelines Helps newcomers contribute quickly and effectively Easier to transfer tasks between people Plan – Do – Review Make sure everything got done… got done right Barely adequate Barely adequate Good enough… but only just Good enough… but only just

Outline Development Process

Plan and Do Business Requirements System Requirements Design Specification Unit Specification

Traceability Business Requirements System Requirements Design Specification Unit Specification Well-structured text, not proseWell-structured text, not prose Uniquely identify every elementUniquely identify every element Make sure nothing is missedMake sure nothing is missed Make sure nothing is addedMake sure nothing is added Well-structured text, not proseWell-structured text, not prose Uniquely identify every elementUniquely identify every element Make sure nothing is missedMake sure nothing is missed Make sure nothing is addedMake sure nothing is added

Testing Business Requirements System Requirements Design Specification Unit Specification User Acceptance System Integration Unit Peer Review Coding Standards Coding Standards Defined objectivesDefined objectives Well-structured text, not proseWell-structured text, not prose Uniquely identify every elementUniquely identify every element Repeatable stepsRepeatable steps Test Strategy defines approach, coverage, etc.Test Strategy defines approach, coverage, etc. Make sure nothing is missed/addedMake sure nothing is missed/added Defined objectivesDefined objectives Well-structured text, not proseWell-structured text, not prose Uniquely identify every elementUniquely identify every element Repeatable stepsRepeatable steps Test Strategy defines approach, coverage, etc.Test Strategy defines approach, coverage, etc. Make sure nothing is missed/addedMake sure nothing is missed/added Test Strategy

How will you be sure the system does what it should? Types of testing Static / dynamic Inspection of results & data Baseline for comparison / expected results Automated / manual Coverage 100% Spot checks »How many / which & what Artefacts & evidence to be archived Test Strategy

Test Strategy - Detail Units will leave environments as they found them Aside from planned / designed behaviour No memory leakage (memory freed-up at appropriate times) No temporary libraries remain assigned No temporary data sets remain No macro variables remain 141 %tharness(testmacro=BestCodeEver); THARNESS: Starting execution of code to be tested NLOBS= THARNESS: Execution of code to be tested has finished THARNESS: Summarising results THARNESS: Macro variable has been added: scope=GLOBAL name=NLOBS THARNESS: Library assignment has been added: libname=NFIND_ME THARNESS: End of results summary Coding Standards Test Strategy

Deletes its own temporary WORK data sets Facilitated by the fact that the names of all of the macros WORK data sets are prefixed with _THARNESS_ (achieved generically with _&sysmacroname._ ) By using the same prefix, the data sets can be deleted at the end of the macro by specifying _THARNESS_: on PROC DATASETS DELETE statement Conditional upon &tidy (for debugging) %if %upcase(%substr(&tidy,1,1)) eq Y %then %do; proc datasets lib=work nolist; delete _&sysmacroname._: ; quit; options notes; %end; %mend tharness;

Approach: Snapshot then Compare Snapshot of elements of environment taken before and after execution of the macro-under-test, e.g. sashelp.vslib Comparison of before and after images done with DATA steps and PUT statements (more flexible than PROC COMPARE) data _null_; merge work._&sysmacroname._vslibbefore (in=before) work._&sysmacroname._vslibafter (in=after) end=finish; by libname; retain IssueFound 0; if before and not after then do; put "&sysmacroname: Library assignment has been removed: " libname=; IssueFound=1; end; else if not before and after then do; put "&sysmacroname: Library assignment has been added: " libname=; IssueFound=1; end; if finish and not IssueFound then put "&sysmacroname: No library assignment issues found"; run;

Approach: Snapshot then Compare Data work._&sysmacroname._vslibBefore; Set sashelp.vslib; Run; THARNESS: Library assignment has been added: libname=NFIND_ME data _null_; merge work._&sysmacroname._vslibbefore (in=before) work._&sysmacroname._vslibafter (in=after) end=finish; by libname; retain IssueFound 0; if before and not after then do; put "&sysmacroname: Library assignment has been removed: " libname=; IssueFound=1; end; else if not before and after then do; put "&sysmacroname: Library assignment has been added: " libname=; IssueFound=1; end; if finish and not IssueFound then put "&sysmacroname: No library assignment issues found"; run;

Echoes all of its parameters upon initiation Ensures that the values of those parameters taking default values (and hence not specified in the calling program) are known to anybody inspecting the log %macro tharness(testmacro =,tidy = y ); %put &sysmacroname: Parameters received by this macro are:; %put _local_; %put ; 141 %tharness(testmacro=BestCodeEver); THARNESS: Parameters received by this macro are: THARNESS TESTMACRO BestCodeEver THARNESS TIDY y

Summary Plan – Do – Review Barely Adequate What – How - Build Traceability (vertical) Testing Traceability (horizontal) Peer review – unit – integration – system - user

Thank you for listening. Enjoy your evening! Andrew Ratcliffe NOTECOLON.INFO