ABSTRACT THE ISSUE AT HAND THE RECIPE FOR BUILDING THE SYSTEM THE TEAM REQUIREMENTS. Paper DM09-2012



Similar documents
SAS, Excel, and the Intranet

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

Interfacing SAS Software, Excel, and the Intranet without SAS/Intrnet TM Software or SAS Software for the Personal Computer

Using SAS With a SQL Server Database. M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC

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

CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases

What's New in SAS Data Management

Dynamic Decision-Making Web Services Using SAS Stored Processes and SAS Business Rules Manager

Using Proc SQL and ODBC to Manage Data outside of SAS Jeff Magouirk, National Jewish Medical and Research Center, Denver, Colorado

Taking EPM to new levels with Oracle Hyperion Data Relationship Management WHITEPAPER

Exploiting Key Answers from Your Data Warehouse Using SAS Enterprise Reporter Software

Practical application of SAS Clinical Data Integration Server for conversion to SDTM data

Managing Tables in Microsoft SQL Server using SAS

PharmaSUG Paper AD11

SQL Server 2012 Business Intelligence Boot Camp

Cisco Data Preparation

Preparing Real World Data in Excel Sheets for Statistical Analysis

SQL Pass-Through and the ODBC Interface

Paper Designing Web Applications: Lessons from SAS User Interface Analysts Todd Barlow, SAS Institute Inc., Cary, NC

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

Improving Your Relationship with SAS Enterprise Guide

Paper CI Marketing Campaign (Message sent) Contact Recorded in SAS System Tables. Response Recorded in SAS System Tables

We begin by defining a few user-supplied parameters, to make the code transferable between various projects.

Analyzing the Server Log

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

A simple tool to catalogue statistical outputs developed for submission by linking two in-house systems experience from a submission project

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

An macro: Exploring metadata EG and user credentials in Linux to automate notifications Jason Baucom, Ateb Inc.

ETL-03 Using SAS Enterprise ETL Server to Build a Data Warehouse: Focus on Student Enrollment Data ABSTRACT WHO WE ARE MISSION PURPOSE BACKGROUND

dbspeak DBs peak when we speak

Tools for Managing and Measuring the Value of Big Data Projects

Data Management, Analysis Tools, and Analysis Mechanics

Automate Data Integration Processes for Pharmaceutical Data Warehouse

Top Ten SAS DBMS Performance Boosters for 2009 Howard Plemmons, SAS Institute Inc., Cary, NC

Team Avanade Project Total 17 Consultants. Accenture Business Services for Utilities Project Total 3 Consultants

ABSTRACT INTRODUCTION DATA FEEDS TO THE DASHBOARD

Using SAS Enterprise Business Intelligence to Automate a Manual Process: A Case Study Erik S. Larsen, Independent Consultant, Charleston, SC

Using Version Control and Configuration Management in a SAS Data Warehouse Environment

A Microsoft Access Based System, Using SAS as a Background Number Cruncher David Kiasi, Applications Alternatives, Upper Marlboro, MD

Lost in Space? Methodology for a Guided Drill-Through Analysis Out of the Wormhole

Utilizing the SAS Business Intelligence Platform in a Clinical Trial Environment

You have got SASMAIL!

Overview. NT Event Log. CHAPTER 8 Enhancements for SAS Users under Windows NT

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

KnowledgeSEEKER Marketing Edition

Paper PO03. A Case of Online Data Processing and Statistical Analysis via SAS/IntrNet. Sijian Zhang University of Alabama at Birmingham

SAS Credit Scoring for Banking 4.3

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

Streamlining Reports: A Look into Ad Hoc and Standardized Processes James Jenson, US Bancorp, Saint Paul, MN

College SAS Tools. Hope Opportunity Jobs

Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC

CERULIUM TERADATA COURSE CATALOG

Leveraging the SAS Open Metadata Architecture Ray Helm & Yolanda Howard, University of Kansas, Lawrence, KS

Ocean Data Systems Ltd. The Art of Industrial Intelligence. Dream Report GETTING STARTED. User- Friendly Programming-Free Reporting for Automation

Business Intelligence Tutorial

Paper Robert Bonham, Gregory A. Smith, SAS Institute Inc., Cary NC

SUGI 29 Systems Architecture

USING SAS WITH ORACLE PRODUCTS FOR DATABASE MANAGEMENT AND REPORTING

MODULE FRAMEWORK : Dip: Information Technology Network Integration Specialist (ITNIS) (Articulate to Edexcel: Adv. Dip Network Information Specialist)

A Dose of SAS to Brighten Your Healthcare Blues

An Introduction to SAS/SHARE, By Example

It s not the Yellow Brick Road but the SAS PC FILES SERVER will take you Down the LIBNAME PATH= to Using the 64-Bit Excel Workbooks.

NonStop SQL Database Management

WOW! YOU DID THAT WITH SAS STORED PROCESSES? Dave Mitchell, Solution Design Team, Littleton, Colorado

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

One problem > Multiple solutions; various ways of removing duplicates from dataset using SAS Jaya Dhillon, Louisiana State University

Effective Use of SQL in SAS Programming

How To Write A Clinical Trial In Sas

Product Overview. Dream Report. OCEAN DATA SYSTEMS The Art of Industrial Intelligence. User Friendly & Programming Free Reporting.

How To Use Sas With A Computer System Knowledge Management (Sas)

SAS Views The Best of Both Worlds

White Paper. Thirsting for Insight? Quench It With 5 Data Management for Analytics Best Practices.

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA

Cross platform Migration of SAS BI Environment: Tips and Tricks

POLAR IT SERVICES. Business Intelligence Project Methodology

INFORMATION TECHNOLOGY PROGRAMMER/ANALYST

Big Data, Fast Processing Speeds Kevin McGowan SAS Solutions on Demand, Cary NC

WHITEPAPER. Managing Design Changes in Enterprise SBM Installations

Customized Excel Output Using the Excel Libname Harry Droogendyk, Stratia Consulting Inc., Lynden, ON

SAS 9.2 Enhanced Logging Facilities. Session Wednesday, March 19, :00 9:50, Room 212

SAS 9.4 Intelligence Platform

A Survey of Shared File Systems

Introduction to AutoMate 6

Order from Chaos: Using the Power of SAS to Transform Audit Trail Data Yun Mai, Susan Myers, Nanthini Ganapathi, Vorapranee Wickelgren

Data Discovery & Documentation PROCEDURE

SQL Server An Overview

Flat Pack Data: Converting and ZIPping SAS Data for Delivery

Using SAS as a Relational Database

SAS IT Resource Management 3.2

Be a More Productive Cross-Platform SAS Programmer Using Enterprise Guide

DATA VALIDATION AND CLEANSING

AV-005: Administering and Implementing a Data Warehouse with SQL Server 2014

Functional Area 3. Skill Level 301: Applications Systems Analysis and Programming Supervisor (Mercer 1998 Job 011)

A Method for Cleaning Clinical Trial Analysis Data Sets

Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets

The Blending of Traditional and Agile Project Management

PharmaSUG Paper QT26

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Accent on the Future: Accenture Web Site Unveils a New Identity Microsoft Software, Service Offerings Power Largest Ever Corporate Re-branding Effort

WHAT IS THE CONFIGURATION TROUBLESHOOTER?

Transcription:

Paper DM09-2012 A Basic Recipe for Building a Campaign Management System from Scratch: How Base SAS, SQL Server and Access can Blend Together Tera Olson, Aimia Proprietary Loyalty U.S. Inc., Minneapolis, MN ABSTRACT Designing and building a custom campaign management system can be a daunting task. The system we envisioned had to manage billions of rows of data, execute all of the components of a strategic marketing program, and provide a user-friendly interface for project management. During the build we learned that success depended on clear requirements for the design team, a thoughtful and organized system architecture, and efficient, tested and documented SAS code tying it all together. This paper provides information, both practical and technical, around building a campaign management system from scratch using Base SAS, Microsoft SQL Server and Microsoft Access. It addresses what worked well and lessons learned in hopes that others who are considering building such a system can benefit from the experience. THE ISSUE AT HAND Campaign management systems running on outdated mainframes are cumbersome and expensive to operate and maintain. They are especially difficult environments for data management and application development. When highlevel project management data is stored in non-user-friendly applications, data entry can be duplicative and disjointed across varying departments of an organization. Creating a custom-built system would allow us to manage billions of rows of data, successfully execute all aspects of marketing campaign management, and provide a user-friendly interface for project management. Our company already had the components, expertise and tools in our analytic department to create a custom-built solution to meet our specific needs and demands. This saved time and resources that could have been spent on off- the-shelf options that would need to be customized later. THE RECIPE FOR BUILDING THE SYSTEM It is crucial to have a team who works well together and understands requirements fully. Time spent upfront on requirements gathering, architecture, and design is necessary. SAS code should be efficient and eloquent. Testing is crucial and automation is complex. Following are the details on how we went about building our campaign management system from scratch. THE TEAM The team building the system consisted of client services staff who understood the business requirements and were tasked with managing the project, an IT resource who knew the current system and what needed to be converted, and two SAS programmers with a combined 30 years of experience. One SAS programmer was the architect and main programmer while the other translated business needs, tested the system, and programmed as needed. A data analyst with MS Access experience built Access screens and VB functionality as well as set up the SQL server environment. To round out the team, other support people like higher level budget owners and a resource for hardware/software help were included. It is important to define owners and agree on roles and responsibilities during the build. It is recommended that responsibilities be reviewed at the beginning of the build as the timeline is set and periodically during the build process. The roles of those who will manage and run the system once it is finished should be agreed upon before the system is complete. This will probably include employees who did not participate in the system build process, but have skill sets to manage and use it. Post-build roles include functions like Platform Manager, Campaign Specialist and Implementer, and Database Administrator. REQUIREMENTS Assess existing situation During our build, we had the advantage of referring to a legacy mainframe campaign management system which had been in place for a number of years. Although it was disjointed and expensive, the framework provided an opportunity to change the components that didn t work and keep the ones that worked well. In our case, some of 1

the data structure from the old environment was kept but the technology and code was built from scratch. Inputs/outputs were already set and just needed to be modified to fit the new system. Assess what was brand new All code, process and most database tables would be built from scratch. The technology was within our department already, but hadn t been blended together in this way before. Collect what the end users wanted Down to each small detail, it s important to gather and discuss and gather and discuss some more with those who knew requirements. Create a timeline, revisit it frequently, and adjust as needed DESIGN AND BUILD The tool s design should be thoroughly planned and discussed before the build starts. Inputs and Outputs In our build, standard input and output file layouts were created and followed. Data At the most basic level, all data elements were listed and organized including necessary tables and variables. Hierarchies of the tables and what variables fit in each table were agreed upon. We thoroughly reviewed the tables to make sure there were not duplicate pieces of information and tables were as basic as possible without losing important information. Code System functionality was evaluated as well as what the coded needed to accomplish. Each SAS program was designed to do one major campaign step (loading inputs, and selection and creating mail files are a few examples). Process Process related questions were answered such as: When moving through a campaign lifecycle, what are the steps? What SAS programs will run when? How will SAS work with SQL Server efficiently? Screens Data entry screen functionality was assessed and designed much like the SAS code was evaluated and configured. Data entry needed to be simple for the end user, yet capture and organize the vast amount of information to run a campaign. ADDITIONAL BUILD DETAILS Along with constructing the database tables and writing the code and building the process and screens, a few other steps in the build were considered: Historical Data Conversion Master customer and campaign level tables were converted from the old system (Mainframe and Access) to the new tables. A map was created to show how the old fields and tables translated to the new ones. Testing Old campaigns that could be used for testing were identified. Inputs and expected outputs for the test campaigns were already known. Code was built and each step in the campaign process was tested to make sure outcomes were the same between the old and new system. The old system was not turned off until new outputs matched the old ones. The most important components to be tested would be: o SAS code o Screens o The process, or flow of the system Documentation Time and budget should be allocated for documenting the various aspects of the system: o System schematics o Data dictionary o Database business rules o Process Flow with Controls o Detailed SAS code documentation o Start to end campaign instructions, How to Run a Campaign o Revamped documentation on campaign reporting and results library 2

THE CAMPAIGN MANAGEMENT SYSTEM The campaign management system was built in about 11 months. It exists in a Windows 2008 64-bit environment, currently using SAS 9.2. All code is in Base SAS, utilizing a good deal of PROC SQL, SAS Macro programming, and ODS for audit reports. The new system has approximately 10 SAS programs defined by each major campaign step. General Campaign Management System Structure Figure 1. Campaign Management System Structure All campaign requirements are entered into Microsoft SQL Server tables through Microsoft Access data entry screens. There are about 50 screens, partitioned by campaign and project management function. A heavy amount of 3

Visual Basic runs behind the screens. Campaign tables are stored in SQL Server. They are not relational as no advantage of a relational structure was identified. There 40 tables and 60 reference tables. The campaign management system was built for specific business needs, but is very flexible and can easily have functionality added or removed. It flexes as the business needs change. Figure 2. Hardware/Software Architecture THE USAGE PROCESS The high level steps behind the processes in our campaign management tool are similar to the following for each major campaign step: User enters metadata through the screens into the SQL Server tables including the Ref Job table A SAS program runs and pulls information and customer data from the tables including the Ref Job table SAS processes (often using the extraction macro) and manipulates SAS appends data back into the tables User moves onto the next campaign step and repeats the above SAS AND SQL We use SAS to process all data, reading from and writing to the SQL tables. SAS communicates with SQL server through an ODBC connection and a libname. Loading to SQL Tables A Basic PROC APPEND: proc append base=vma_db.ds_calculated_fields data=newfields&i; run; Extracting from SQL Tables A Basic PROC SQL Step: proc sql; connect to odbc (dsn=&db user=&user); create table ds_calculated_fields1 as select * 4

from connection to odbc (select * from ds_calculated_fields where p_id = &qp_id); disconnect from odbc; quit; REFERENCE JOB ( REF JOB ) TABLE A special Ref Job table holds numbered commands to enable SAS to talk to the SQL database. There are several campaign functions that are captured in the Ref Job table and each function has a number. When the end user enters criteria for a function through the Access screens, the Ref Job table is updated. The Ref Job table contains crucial data points for each function that are read by SAS and translated. Each data point becomes a macro variable somewhere in the SAS code. Examples would be information for mail file headers or whether name and address should be included or excluded from the file s detail records. data ref_job_control; set vma_db.ref_job_control; where CONTROL_CODE ='05' and compress(control_field1) in (&P_IDs); Name = scan(control_field4,7,','); Address = scan(control_field4,9,','); if Name in ('Y','1') then Name = '1'; else Name = '0'; if Address in ('Y','1') then Address = 1; else Address = 0; run; Figure 3. Ref Job Table example EXTRACTION MACRO The system is very efficient and is able to track an unlimited number of campaigns at once. The only limitation is the personnel needed to enter data and run process steps. It can run an unlimited amount of customers through the system simultaneously. A full campaign can be run from start to finish in one work day if all requirements are entered. We load over 100MM detail records each day and keep the data indefinitely. In order to store this volume of data in the finite amount of space available, all possible fields on the dataset are compressed into packed numeric fields. Because of this, the data must be extracted from the file in a packed format, and unpacked prior to use. Each day is its own dataset and is indexed. (These files once used Generation Data Group (GDG) logic but this was problematic when files arrived or were loaded out of sequence, but that is possibly another paper.) The system can pull 25MM detail records in seconds due to a SAS extraction program that was was built internally for the system. The extraction macro is read only and contains 28 macro variables that are entered and then called by the end user. The macro variables contain fields like input dataset name, fields to keep in the output dataset, date parameters and client specific parameters. About 8 team members use this macro on a daily basis. Pack Example: pk_zip=put(input(put(max(input(zip,5.),0),z5.),5.),pk3.); Unpack Example: 5

zip=put(input(pk_zip,pk3.),z5.); AUTOMATION The automation of the full campaign management system, meaning schedule all jobs based on data entry and datetime triggers, was a logical next step. Our plan was to automate fully in Phase II of the campaign management system build. But once the time came to automate, the situation was assessed and it was decided that based on workload and staffing, we would only automate a portion of the system. The daily file loads and monthly source data creation were automated but not the actual campaign functions. This resulted in a savings of about 25 hours a month. The concept behind daily file automation is fairly simple, but beautiful as it saves so much time. There are 3 main steps: 1) SAS program, 2).cmd file and 3) a job in the Task Scheduler in Windows. 1. The SAS program is whatever code you want to run by itself and should be able to: o Run properly and successfully on demand o Comfortably use macro variables o Know what file sequence to read in (by saving sequence numbers in headers of datasets and then reading in those headers and incrementing every day) o Make sure the input file exists (using SAS functions) o Zip and delete the input file when done (using X commands in SAS) o Send out an email when done processing 2. The.cmd file contains syntax telling what SAS code to run and where to save the log and lst 3. The job in the Windows Task Scheduler calls the.cmd file which talks to the SAS program The key in setting up and debugging this type of scheduled automation is to make sure your SAS program runs successfully before setting up the.cmd file and scheduled job. WHAT WORKED WELL AND WHAT WE LEARNED Estimate your requirement collection timeframe to take twice as long as expected Make sure everyone knows their job and what is expected of them Assign owners and a Project Manager, again know what is expected Try to allow sufficient time for the build. There are usually time constraints but added pressure on the team makes the work more challenging Keep meticulous to-do lists and review details again and again More than one SAS programmer may be needed. It worked very well to have one main expert programmer and a separate programmer who tested and knew the needs of the business Don t have too many cooks in the kitchen. Stay lean if you can Build to the needs of business, build to be flexible, but also for efficiency and friendliness to the end user CONCLUSION Designing and building a custom campaign management system from scratch can be a practical solution to replacing an antiquated data management and application development environment. With the right recipe of a good team, time for proper requirements gathering, careful and smart system design, and efficient, friendly SAS code, it can be successfully done. REFERENCES SAS Institute Inc. 2007. SAS Tech Note 648. "Example of Batch Processing Under Windows". Cary, NC SAS Institute Inc. Available at support.sas.com/techsup/technote/ts648/ts648.pdf Hurley, George J. 2006. Xamining the X Statement (and Some Other Xciting Code). Proceedings of the SAS Users Group International 31 Conference. Available at www2.sas.com/proceedings/sugi31/036-31.pdf ACKNOWLEDGEMENTS The author would like to thank Susan Bakken, Doua Xiong and Steve Hornbacher for working together and believing we could build this system and Tom Segar for proofreading this paper and providing positive support and smart feedback along the way. 6

CONTACT INFORMATION Comments and questions are encouraged. Contact the author at: Tera Olson Aimia Proprietary Loyalty U.S. Inc., Minneapolis, MN 763-445-3584 (W) 763-350-0761 (M) tera.olson@aimia.com 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. Other brand and product names are trademarks of their respective companies. 7