Get in Control! Configuration Management for SAS Projects John Quarantillo, Westat, Rockville, MD



Similar documents
REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS

MS SQL Server Database Management

Figure 1 - BI Publisher Enterprise Capabilities. OAUG Collaborate 08 Page 2 Copyright 2008 by Lee Briggs

Migrating helpdesk to a new server

DiskPulse DISK CHANGE MONITOR

Source Control Guide: Git

Power Update - Documentation Power Update Manager

Switching from PC SAS to SAS Enterprise Guide Zhengxin (Cindy) Yang, inventiv Health Clinical, Princeton, NJ

D83167 Oracle Data Integrator 12c: Integration and Administration

Improving Your Relationship with SAS Enterprise Guide

NETWRIX FILE SERVER CHANGE REPORTER

SAS System and SAS Program Validation Techniques Sy Truong, Meta-Xceed, Inc., San Jose, CA

Perceptive Intelligent Capture Solution Configration Manager

Emonitor INSTALLATION MANUAL INSTALLING EMONITOR SOFTWARE WITH A GUPTA SINGLE USER DATABASE

Business Insight Report Authoring Getting Started Guide

Proficy * Change Management for Proficy * Machine Edition

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Oracle Data Integrator 12c: Integration and Administration

NetWrix SQL Server Change Reporter

Applicatons Development. Paper 44-26

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Effective strategies for managing SAS applications development Christopher A. Roper, Qualex Consulting Services, Inc., Apex, NC

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on Oracle WebLogic Server

EnterpriseLink Benefits

Project management integrated into Outlook

SAS 9.3 Foundation for Microsoft Windows

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

TestManager Administration Guide

Oracle Fusion Middleware

Microsoft Project Server Integration with SharePoint 2010

ABSTRACT THE ISSUE AT HAND THE RECIPE FOR BUILDING THE SYSTEM THE TEAM REQUIREMENTS. Paper DM

E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide. E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide

Setting up a local working copy with SVN, MAMP and rsync. Agentic

Administering Windows-based HP Thin Clients with System Center 2012 R2 Configuration Manager SP1

Copyrights, Legal Notices, Trademarks and Servicemarks

Vector HelpDesk - Administrator s Guide

Voyager Reporting System (VRS) Installation Guide. Revised 5/09/06

User Guide. Making EasyBlog Your Perfect Blogging Tool

Setting Up a Windows Virtual Machine for SANS FOR526

Microsoft Access is an outstanding environment for both database users and professional. Introduction to Microsoft Access and Programming SESSION

2.3 - Installing the moveon management module - SQL version

From Database to your Desktop: How to almost completely automate reports in SAS, with the power of Proc SQL

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

TIBCO Spotfire Automation Services 6.5. User s Manual

Testing Web Applications for SQL Injection Sam Shober

Technical Paper. Defining an ODBC Library in SAS 9.2 Management Console Using Microsoft Windows NT Authentication

SUMMARY Moderate-High: Requires Visual Basic For Applications (VBA) skills, network file services skills and interoperability skills.

IBM Campaign Version-independent Integration with IBM Engage Version 1 Release 3 April 8, Integration Guide IBM

Document Digital Signature

Administration GUIDE. SharePoint Server idataagent. Published On: 11/19/2013 V10 Service Pack 4A Page 1 of 201

Spector 360 Deployment Guide. Version 7.3 January 3, 2012

IceWarp Server Windows Installation Guide

Installation & Maintenance Guide

SQL Server Integration Services with Oracle Database 10g

Oracle Data Integrator 11g: Integration and Administration

Custom Tasks for SAS. Enterprise Guide Using Microsoft.NET. Chris Hemedinger SAS. Press

SelectSurvey.NET IT Staff Training

PRESENTS... Reasons to Switch from SourceSafe: How to Make Your Life Easier with SourceAnywhere Standalone

NetWrix File Server Change Reporter. Quick Start Guide

9.1 SAS/ACCESS. Interface to SAP BW. User s Guide

UNICORN 6.4. Administration and Technical Manual

Getting Started - The Control Panel

OneStop Reporting 3.7 Installation Guide. Updated:

How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013 (On-premises)

Guide to Automating Workflows Quickly and Easily

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

PROJECTIONS SUITE. Database Setup Utility (and Prerequisites) Installation and General Instructions. v0.9 draft prepared by David Weinstein

StruxureWare Power Monitoring 7.0.1

System Administration Training Guide. S100 Installation and Site Management

Ingenious Testcraft Technical Documentation Installation Guide

Seamless Dynamic Web Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Download Path for 7 Zip : ( Username & Password to download = sqlutility ) **Make sure install the right one or else you can t find 7 Zip to Extract.

Automation of Large SAS Processes with and Text Message Notification Seva Kumar, JPMorgan Chase, Seattle, WA

Coveo Platform 7.0. Microsoft Active Directory Connector Guide

Specops Command. Installation Guide

Moving/Restoring the StarShip SQL database

E-Notebook SQL13.0 Desktop Migration and Upgrade Guide

POC Installation Guide for McAfee EEFF v4.1.x using McAfee epo 4.6. New Deployments Only Windows Deployment

easyjob 5 new functions 2012 by protonic software GmbH 1

Let SAS Modify Your Excel File Nelson Lee, Genentech, South San Francisco, CA

Microsoft Corporation. Project Server 2010 Installation Guide

Novell Identity Manager

1. Product Information

ABSTRACT INTRODUCTION DATA FEEDS TO THE DASHBOARD

PowerSearch for MS CRM 2011

NetWrix SQL Server Change Reporter. Quick Start Guide

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

Unicenter Patch Management

Using Oracle9i SCM for Software Configuration Management. An Oracle Technical White Paper July 2002

Moving the TRITON Reporting Databases

Online Backup Client User Manual Linux

UNICORN 7.0. Administration and Technical Manual

Microsoft. Course 20463C: Implementing a Data Warehouse with Microsoft SQL Server

TIBCO Spotfire Server Migration. Migration Manual

Managing Tables in Microsoft SQL Server using SAS

Installation Instruction STATISTICA Enterprise Small Business

How Do I Transfer Remote Files?

Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc

ReportBy ODBC Connection setup

PATROL From a Database Administrator s Perspective

Transcription:

AD004 Get in Control! Configuration Management for SAS Projects John Quarantillo, Westat, Rockville, MD Abstract SAS applications development can benefit greatly from the use of Configuration Management/Source Control software. Not only can multiple developers stay on track, but also they can work independently on different modules without stepping on each other s code or inadvertently working on the same module simultaneously. The development area can be configured in such a way that each developer has his own independent work area that has a separate copy of all finalized programs, and interim copies of programs assigned to that developer. This paper will illustrate techniques used to develop SAS programs for a production reporting system running against an Oracle database. Development teams of any size can implement these concepts that structure and organize the development, testing and deployment of SAS applications. Although this example shows SAS development using Microsoft Visual SourceSafe, the same techniques can be implemented with almost any configuration management software. Introduction SAS developers are not immune to the challenges faced by developers using such programming languages as Visual Basic, C++, etc. All developers need to address the issues of change management, source code control, and configuration management. Proper use of version control software such as Visual SourceSafe can easily meet the challenges and address the issues. In addition to using version control software, it is equally important to design the development environment to take full advantage of the benefits of using version control software. ******************** Evolution of Development Environment Design Initially, programmers would often develop systems in an ad hoc manner. There was little or no separation between development and production. Later, the need for program accuracy and data integrity brought about the need to create a separate development environment. Larger development efforts brought about the need for separate testing staff that worked independently from the developers. Finally, with the addition of version control, and multi-developer teams, a separate development environment was added for each developer. Creating Multi-Environment Programs The key to creating SAS programs that work in more than one environment is to remove all references to locations of data and other programs and place them in a driver program. The remainder of the programs is then defined as SAS Macros, which are called by the driver program. (Sample SAS code can be found at the end of the paper.) Version Control/Source Control Software There are many popular version control or source control software packages in use today. Basically, these programs allow developers to control and track changes to source code. This project was already using Microsoft Visual SourceSafe to manage the development of Active Server Page (ASP) code for a web-based interface, as well as middleware components developed using Microsoft Visual Basic. Visual SourceSafe integrates nicely with those development environments. Although Visual 1

SourceSafe does not integrate directly into the SAS development environment, it can still be used to manage SAS programs. Basic Model Our development life cycle has three separate phases. Development, Testing, and Production. Figure 1 illustrates the logical layout of our basic environment. Each workspace contains all the necessary programs and directories necessary to run the system. This includes a driver program, a macro library, a directory in which work data sets can be dumped for troubleshooting, and an output directory. A separate work area is created in the workspace for each developer (see Figure 3). After programs are developed, they move to the testing phase. Programs that pass testing, move into production, programs that fail testing, go back to development. Because the programs are developed using the driver approach, they can be freely moved from one step of the development life cycle (and its corresponding environment) to another without having to modify the source code. Setting Up the Workspace The development workspace is set up on a network server volume. This is mainly done to take advantage of corporate infrastructure that provides backup of network volumes. The network volume also comes into play for the testing area. For illustrative purposes, we will outline a team of 4 developers (Al, Bob, Chris, and Don.) Figure 2 shows the logical design of the multi-user environment from the perspective of the development life cycle. In addition to creating a work area for each user, there is also a work area for testing. This area is not directly accessed by any of the developers. Source programs that are ready for testing are automatically placed here during the development process (this will be further explained in the Using Shadow Folders section below). Figure 4 shows the top-level layout for the development and testing workspace. ******************** 2

Note that in Figure 4 there is no representation of the production environment. The production environment is often on a different network server, and frequently on the opposite side of a firewall from a development/testing environment. Programs are usually migrated to the production environment manually, or as part of a separate install script. Add the Programs to Visual Source- Safe Projects The SAS programs are then added to Visual SourceSafe projects which roughly correspond to directories or folders. This project structure should be as close as possible to the structure outlined in the previous discussion of workspaces. A good rule of thumb to follow is something does not exist unless it has been checked in to Visual SourceSafe. cannot be directly accessed without using the Visual SourceSafe interface. The Visual SourceSafe Administrator interface allows you to create what it calls shadow folders. Each Visual SourceSafe project can be associated with a physical directory on a network volume. Every time a developer checks in a program, the copy of that program is updated in the shadow folder. The main project folder should be set up with a shadow folder directed to the Testing work area. Driver programs should not be put in shadow folders. Development The development process is fairly simple, once a user/developer has been set up correctly. Each time a developer begins to work on the project they will need to do the following: Update their work area by choosing Get Latest Version on the Visual SourceSafe project folder. (see screenshot) Setting up Users in Visual Source- Safe Each developer is given a user account in Visual SourceSafe. Users with administrative rights can control what rights other users have, and can control their access to source programs on a project" level. After a developer s user account has been established, they need to open the Visual SourceSafe program, and set working folders for each directory set up in the workspace discussion above. Using Shadow folders When a program is initially added to a Visual SourceSafe project, or subsequently checked in to Visual SourceSafe, that program code is stored in the Visual SourceSafe database. It 3 Choose the program(s) that they need to modify, right click and Check Out those programs. Open SAS, or some other program editor, and make the modifications.

Unit test the modifications by submitting their user-specific driver program. Because the developer has a current copy of all working programs (see the first step) the newly modified program is tested against the current programs in the testing environment. If the program modifications pass unit testing, check the programs back in to Visual SourceSafe, making sure to indicate what significant changes were made in the Comments section of the Check In dialog box. Another good rule of thumb is to never check anything in without making a comment here. These comments become incredibly useful when reviewing a program s history in Visual SourceSafe. Testing After a developer has successfully modified a program, and unit tested it, the program is ready for full testing. This is usually communicated to the testing unit either through a change management tracking database, or possibly something as simple as emailing the testing team. Because all programs currently checked into Visual SourceSafe are updated in the Testing shadow folder, the testers can run the current system by simply submitting their user-specific driver program. Production After a number of program changes have been made, and successfully passed testing, they are ready to be migrated to the production environment. This can be done manually, or by using an automated installation builder that will draw the current programs from the testing shadow folder, and install them on the production environment. At this point, it is important for the Project Administrator to Label the project by right clicking the project, and choosing Label from the menu, and labeling the project with a release number, or some other milestone (see screenshot below). Visual SourceSafe will place an entry in the History of every file in that project. These labels are necessary to facilitate identifying the specific contents of a release. If a developer needs to create a patch of a production program independent of the current development process, they can obtain a copy of the exact version of every program at the time of the release using these labels. Conclusions As outlined above, with a bit of front-end environment design and planning, and a small learning curve to comfortably navigate the Visual SourceSafe interface, a SAS project can benefit greatly. The hidden beauty of managing projects with source code control or version control comes to light when there is a problem with the system. A developer can compare different versions of a program and see exactly what changes were made and when. If developers followed the never check in a program without adding a comment mantra, troubleshooting program changes should be greatly simplified. In addition, a developer can be given an entire working copy of a system at any Label point. (see Production above). Projects can also be branched to allow for multiple development paths, and later merged, using a built in differences interface. ******************** 4

References Ray, C. (1998) Establishing Production and Development Environments for Base SAS Software Development Proceedings of the Twenty-Third Annual SAS Users Group International Conference, Paper 26. Acknowledgments SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Microsoft and Visual SourceSafe are registered trademarks of Microsoft, of Redmond, WA. Many thanks to Craig Ray, for laying the foundation for this structured approach. Contact John Quarantillo Westat, Inc. 1650 Research Blvd. Rockville, MD 20850 johnquarantillo@westat.com Sample Code for a Simple Driver Program: /*******************************************************************/ /* John Q's simplified driver program */ /* */ /* simple_driver.sas 6/16/2003 */ /* */ /* This program creates and sets the global macro variables */ /* necessary to use a Multi-Environment development approach. */ /* */ /*******************************************************************/ /* Macro that loops and calls the report for each region*/ %macro callrpts; %local j; /*Local loop counter */ %do j=1 %to &numregions; /* 1 -> &numregions run each report for all regions */ %let Region = &j; /* this should evaluate to actual region number */ %let Report = SimpleReport; %SimpleReport; /* Run the report */ %end; /* of %do j=1 %to &numregions; */ %mend callrpts; %global Environ; /*var that indicates the Environment */ %global Developer; /*used to identify correct developer (and their environment)*/ %global ProgRoot; /*main directory where the macros are kept */ %global OutputRoot1; /*main directory where the output should go */ %global OutputRoot2; /*directory where the output for archival goes */ %global SaveWork; /*Save SAS work library? (1 = Yes) */ %global DB; /*database name */ %global LoginID; /*database loginid */ %global PW; /*database password */ %global UserName; /*database UserName */ %global Report; /*Name of Report (and program) */ %global Region; /*Region Number */ %global NumRegions; /*Number of Regions */ (continued) 5

Sample Code for a Simple Driver Program (continued): /* vvvv Use these to Run in Development environment vvvv */ %let Developer = Bob; *%let Developer = Testing; /*for Testing*/ %let Environ = DEV; %let ProgRoot = \\rk24\vol2404\kccs\ad004\&developer; %let OutputRoot1 = &ProgRoot\Output; %let OutputRoot2 = \\rk24\vol2404\kccs\ad004\&developer\reportsarchive; %let savework = 1; /* ^^^^ Use these to Run in Development environment ^^^^ */ /* vvvv Use these lines to Run in PRODUCTION environment vvvv */ *%let Environ = PRD; *%let ProgRoot = d:\kccs; *%let OutputRoot1 = \\FOSTS1\KCCSRPT; *%let OutputRoot2 = \\rk24\vol2404\kccs\reportsarchive; /* ^^^^ Uncomment these to Run in PRODUCTION environment ^^^^ */ %let LoginID = kccs_user; /* Same across all environments */ %let pw = kccs_pass; /* Same across all environments */ %let UserName = 0; /* Same across all environments */ %let DB = KCCS1&Environ; /* Varies based on value of Environ */ %let NumRegions = 2; /* Project Specific */ libname ora ORACLE user=&loginid orapw=&pw path=&db; libname workstuf "&ProgRoot\Work Dump"; options ls=100 ps=58 missing=' ' nofmterr mprint /*mlogic*/ notes mautosource sasautos=("&progroot\macros"); %callrpts 6

Sample Code for a Simple Report Program (Macro): %macro SimpleReport; /**************************************************************** /* Name: SimpleReport.sas /* Date: 6/16/2003 /* Desc: Simple Report Program /****************************************************************/ ods pdf(1) file="&outputroot1\region&region&report..pdf" notoc; ods pdf(2) file="&outputroot2\region&region&report..pdf" notoc; proc sql; connect to oracle (user=&loginid orapw=&pw path="@&db"); /* EXTRACT REPORT DATA */ create table ReportData as select * from connection to oracle ( SELECT * FROM vroleregion a WHERE ) as sasfile; /* FILTER FOR REGION */ %if &Region ^= %THEN a.region=&region; quit; disconnect from oracle; /*for testing and debugging*/ %if &savework = 1 %then %do; proc datasets library=work nolist; copy out=workstuf; run; quit; %end; /* INSERT CODE HERE TO CREATE REPORT OUTPUT (PROC REPORT/PRINT/TABULATE) */ Title1 "Report &Report for Region &Region"; proc print data=reportdata; run; ods pdf(1) close; ods pdf(2) close; %mend SimpleReport; 7