Eliminating Tedium by Building Applications that Use SQL Generated SAS Code Segments

Size: px
Start display at page:

Download "Eliminating Tedium by Building Applications that Use SQL Generated SAS Code Segments"

Transcription

1 Eliminating Tedium by Building Applications that Use SQL Generated SAS Code Segments David A. Mabey, Reader s Digest Association Inc., Pleasantville, NY ABSTRACT When SAS applications are driven by data-generated code segments, the programmer or operator is freed from tedious code modifications. SAS/SQL now adds powerful ways of generating these segments as simple macrovariables, macrovariable "arrays", and macrovariables that contain delimited strings up to 32K long. This paper will discuss three.busness needs and propose solutions that SQL in conjunction with other code generation techniques: 1. A macro that generates a MS/EXCEL friendly ".txt" file (tab delimited) from any SAS dataset. (%FLATFILE revisited) This solution is driven by the metadata in DICTIONARY.COLUMNS. 2. A macro that generates "dummy variables" with labels. This solution is driven by the data in the dataset or a user written format. 3. An application that does a full outer join on two or more datasets that have the same structure but different data. This solution can be either table or Frame driven. GOOD NEWS - BAD NEWS Most of us are familiar with the old "good news / bad news" scenarios. For example A man was flying in an airplane when: BN Awingfelloff GN He had a parachute BN The parachute did not open GN He was over a soft, fluffy haystack BN There was a pitchfork in the haystack GN He missed the pitchfork BN He missed the haystack More to the point, a "good news / bad news" scenario might go: Business (or research) often needs large volumes of data: GN Since the advent of the computer, we have amassed huge volumes of data. BN These data are often scattered all over, in different formats and on different platforms, but seldom, it seems, in the form needed. GN SAS is very good for extracting, transforming, manipulating, and analyzing most forms of data. building applications that generate code that is specific to the data, metadata, and tasks that are being manipulated. A SURVEY OF CODE GENERATING TOOLS Since no single tool will fit every application need, we will begin with a survey on common tools. Sometimes we "mix and match" tools as required for a specific application. SAS built-in capabilities: Examples of built-in capabilities might be selecting variables by category or a variable range e.g. _NUMMERIC or FIRST--LAST. Or we can copy code segments for a SAS catalog or include then from an external file. We can use the new import and export Wizards or pick from a multitude of data engines that make SAS interface smoothly with the rest of the world. There are new SAS products, like the SAS Data Warehouse Administrator, that simplify many data administration tasks. Views and data templates can change the way the data are presented to the application. The Macro Facility: This old standby for code segment generation can be broken down into two major components: MACROS and MACROVARIABLEs. Macros are programs that generate code. Macrovariables are named character strings up to 32k characters long that can contain code segments. SCL: Formerly Screen Control Language, SCL provides a convenient way to build OOP and/or GUI based application that generate and submit code segments. Data Step Code Generators: We can generate code based upon the contents of a dataset with a DATA step that puts the code out to a file to be included later. Alternatively, we can use CALL EXECUTE so that the code runs immediately after the DATA step finishes. SQL : Like the DATA step code generators, SQL provides a way to generate macrovariable arrays or macrovariables containing delimited strings. Although this technique lacks the flexibility of some of the other techniques, it provides a remarkably quick and simple way to get information out of a dataset (or if you prefer - a table) and into a SAS code segment. BN Performing these operations on many different data structures can become very tedious. GN SAS tools permit users to eliminate much of this tedium by 1

2 PREREQUISITES: To get the most from this paper, you will need an understanding of basic SAS syntax and the SAS macro facility. SAS/SQL is based on the ANSII SQL92 standard and may be somewhat unfamiliar to ANSII 87 SQL users. And to make things better, or worse depending upon the point of view, SAS has enhanced its SQL with many features unique to SAS, making it one of the most powerful and underutilized SQLs on the market. The examples here require SAS version 6.11 or higher on machines supporting those versions, and SAS version 6.09e on other machines. For clarity, the example code has been stripped of the error condition tests that would be required for a robust application. The focus is on coding technique, not program efficiency. The author feels these examples give acceptable performance with reasonable dataset size and hardware, but perceptions of what is "acceptable" and "reasonable" vary widely. The Appendix contains a macro for building some test datasets of various sizes. %FLATFILE REVISITED The popular macro %FLATFILE has been presented at several SAS user group conferences. (See H. Ian Whitlock s paper "How to Write A Macro to Make External Flat Files" from SUGI 19 and M. Michelle Buchecker s paper "%FLATFILE, and Make Your Life Easier" from SUGI 21). It reads a SAS dataset and produces a "flat" or "text" file that can be imported into some other application. Most versions of %FLATFILE produce column delimited output, but the macro can be easily modified to produce either comma delimited or tab delimited files. The %FLATFILE macro uses metadata from the input dataset to generate a PUT statement to output the "flattened data". An early version of %FLATFILE used the metadata output from a PROC CONTENTS, a technique that is still necessary if the input resides on tape. But more recent versions use the DICIONARY.COLUMNS table or SASHELP.VCOLUMNS view to read the input dataset s metadata. %FLATFILA We ll call the first revision of this macro FLATFILA. We will use SQL to generate sequentially numbered macro variables, sometimes referred to as a macro variable array or stub variables. %macro flatfila (lib=, /* libref for input dataset */ dsn=, /* memname for input dataset*/ file=); /* filename of output file */_ %let lib=%upcase(&lib); %let dsn=%upcase(&dsn); select name, _ case when format ne then format _ when type= num then Best10. else "$" put(length,z3.). _ end into :var1-:var9999,_ :fmt1-:fmt9999 from dictionary.columns_ where libname = "&lib" and memname = "&dsn"; data _null_; set &lib..&dsn; file &file; put %do i = 1 %to &SQLOBS;_ &&var&i &&fmt&i +1_ ; /* end put statement */ %mend; _ The output file name needs to be preassigned using a filename statement. You can FTP the results directly to a remote server by using the FTP filename engine. _ NAME will simply be copied into the macro variable. _ We can manipulate the format to be used on the output flatfile. For example, we may need to change the way date values are presented to meet the date input requirement of another application. In this example however, the FORMAT will be handled in one of three ways: 1)If the variable has a format assigned in the dataset, then that is the format used on the flatfile. 2)If a numeric variable has no assigned format, then it is given a format of BEST10. Note that the TYPE of "num" is in lower case, an exception to the general rule that dictionary tables use uppercase. 3)Character variables with no assigned format are given a format the same length as the variable. Note how we use concatenation and a SAS function to build the format. The first variable name will be placed in macrovariable VAR1, the second variable name will be placed in VAR2, and so on up through the number of variables on the dataset. Macro variables will not be generated beyond the scope of the metadata. If there are 3 variables on the dataset, then macrovariables VAR1, VAR2, and VAR3 will be generated but VAR4 through VAR9999 will not be created. By default, the macrovariables are LOCAL to the macro. DICTIONARY.COLUMNS is the source of the metadata. We could have used SASHELP.VCOLUMNS or the output from PROC CONTENTS, or even a special table that we maintain just for that purpose. In this case we use the WHERE clause to find the metadata in the table that applies to the input dataset. The WHERE clause could be expanded to subset the variables to be included or excluded. The macrovariable SQLOBS is automatically generated by SQL and contains the number of macrovariables in the "array". In some applications we store this value in the "stub-zero" macrovariable because SQLOBS is reset each time a select statement is e.g. %let var0 = &sqlobs;. For each iteration of I, a variable name/format pair is added to the PUT statement. The +1 will separate the columns on the output file by at least one space. The columns could be separated by a comma or a tab by replacing +1 with, or 09 x. 2

3 %FLATFILB else name Thenextexample,FLATFILB, is very similar except that we build the PUT statement code in the SQL instead of with a macroloop. Instead of an array of macrovariables, we have one macro variable that contains a long string of characters, in this case variable name/format pairs separated by +1. Until Version 7 is released, we are limited to 200 characters per observation, but the macrovariable itself can be up to 32K characters long. The output from FLATFILB is identical to the output from FLATFILA; so is much of the code. %macro flatfilb (lib=, /* libref for input dataset */ dsn=, /* memname for input dataset*/ file=); /* filename of output file */ %let lib=%upcase(&lib); %let dsn=%upcase(&dsn); select name_ case when format ne then format when type= num then Best10. else "$" put(length,z3.). end into :string separated by +1 _ from dictionary.columns where libname = "&lib" and memname = "&dsn"; quit; data _null_; set &lib..&dsn; file &file; put &string;_ %mend; In this example, we concatenate the variable and the format pairs. Using the SEPARATED BY clause, we build +1 into the string between each variable. Once again this does not have to be +1, it could be a comma or a tab. Just include the macrovariable that contains the string in the code. There is nothing in this example that cannot be done in open code (it does not have to be wrapped in a macro). 3) %FLATFILC %FLATFILC is really not so much a flat file as it is a MS/EXCEL friendly output file format. The variable names are placed over the columns in the first row, the variable labels are in the second row, and the columns are tab delimited. The code is similar to FLATFILB, but we build three separated long string macrovariables. %macro flatfilc (lib=, /* libref for input dataset */ dsn=, /* memname for input dataset*/ file=); /* filename of output file */_ %let lib=%upcase(&lib); %let dsn=%upcase(&dsn); select quote(name),_ quote(case when label ne then label end),_ name case when format ne then format when type= num then Best10. else "$" put(length,z3.). end into :names separated by "09"x, :labels separated by "09"x, :string separated by "09"x from dictionary.columns where libname = "&lib" and memname = "&dsn"; quit; data _null_; set &lib..&dsn; file "&file"; if _n_=1 then put &names / &labels;_ put &string; %mend; _ We use the QUOTE function so that the macrovariable string will contain the variable names in quotes. Therefore, the PUT statement will output the variable names, not the variables values. The variable names are not quoted on the output file. _ If a variable has no label, then the variable name is repeated on the second line of the output file. _ This statement puts the first two lines to the output file. DUMMY VARIABLES A dummy variable, for our purpose here, is a true/false variable representing one of the possible states of the original variable. For example, if the variables STATE can take a value of NY, NJ, or CT, then it can be replaced by three dummy variables, VAR_NY, VAR_NJ, and VAR_CT. Dummy variables are useful in building statistical models and reports. But when building regression models with dummy variables, we should use the DESIGN option in PROC TRANSREG. This option produces three value dummies (-1, 0, 1) and drops one variable so we end up with k-1 variables, where k is the number of unique values in the original variable. Using PROC TRANSREG method prevents oversaturation of the model and erroneous results. But it can be a challenge to build dummy variables, and all too often the meaning of the variable gets lost in the process. And for some reports, it is desirable to have a dummy variable for every value the original variable can take, as defined by a FORMAT, regardless of whether that value occurs in the dataset. The following two macros address these issues: %BLD_DUMY will read all values of a variable in a dataset and build a dummy variable for each discrete value. %FMT_DUMY will build a dummy variable of each LABEL in a user defined format. Lets work backwards for a while, looking first at the output from running %BLD_DUMY, then the generated code that produced the output, and lastly at the macro that generated the code that produced the output. 3

4 The output dataset (transposed): The input dataset is DAT1, which was generated by %BLD_SAMP in the appendix of this paper. The output below is produced by: %bld_samp(num_obs=100,num_ds=1); %bld_dumy(inds=dat1,var=state,fmt=$.,outds=out1); CT, NJ, and NY are the dummy variables built from the data in STATE. The other 6 variables are simply brought forward from the original data. Note that only three states are represented in the data. variable label first obs CT state $. value of CT 1 NJ state $. value of NJ 0 NY state $. value of NY 0 OBS_ID observaion identification number a STATE state of residence CT DOB date of birth 27APR38 DFP date of first purchase 03JUN38 NOP number of purchases 1 TOT_DOL total dollars spent $ The generated code that produced the output: PROC SQL NOPRINT; CREATE TABLE OUT1 AS SELECT PUT(STATE,$.) ="CT" AS CT LABEL="state $. value of CT", PUT(STATE,$.) ="NJ" AS NJ LABEL="state $. value of NJ", PUT(STATE,$.) ="NY" AS NY LABEL="state $. value of NY", * FROM DAT1; The first line of the SELECT statement reads as follows: If the STATE variable, when formatted as $., is CT then store 1 in the variable named CT, otherwise store a 0. The label for CT is "state $. value of CT". The macro that generated the code that produced the output (BLD_DUMY): %macro bld_dumy (inds=, /*input dataset */ var=, /*variable to dummy*/ fmt=, /*format to use */ outds=);/*output dataset */ select distinct(put(&var,&fmt)) into :val1 - :val99999_ from &inds; create table &outds as select %do i=1 %to &SQLOBS ; put(&var,&fmt) ="&&val&i" as &&val&i_ label="&var &fmt value of &&val&i", * from &inds; %mend bld_dumy; _ This builds a macrovariable array that contains all the unique values for STATE in the data. _ This builds the dummy variables using the macrovariable array that was just created. A USER WRITTEN FORMAT Suppose we want to build dummy variables based on a user written format. In this example we are assigning each observation one of five groups based upon TOT_DOL. The PROC FORMAT looks like this: proc format; value val_grp low-<0="neg" 0-50 ="POOR" ="GOOD" ="BETTER" 500 -High="BEST" ; So when we run: %bld_dumy(inds=dat1,var=tot_dol, fmt=val_grp.,outds=out2); We get this output: variable label first obs BEST: tot_dol val_grp. value of BEST 0 BETTER: tot_dol val_grp. value of BETTER 1 GOOD: tot_dol val_grp. value of GOOD 0 POOR: tot_dol val_grp. value of POOR 0 OBS_ID: observation identification number a STATE: state of residence CT DOB: date of birth 27APR38 DFP: date of first purchase 03JUN38 NOP: number of purchases 1 TOT_DOL total dollars spent $ %FMT_DUMY Notice that there are only four dummy variables, even though there are five different labels in the format. This is because there are no negative values in the data. But what if, for report consistency, we wanted a dummy variable for the fifth group? We can force that to occur by driving the macro from the format instead of from the data. Consider the following code: %macro fmt_dumy (inds=, /*input dataset */ var=, /*variable to dummy*/ fmt=, /*format to use */ outds=);/*output dataset */ proc format cntlout=fmt_cntl;_ select %scan(&fmt,1);_ select distinct label into :val1 - :val99999 from fmt_cntl_ ; create table &outds as select %do I=1 %to &SQLOBS ; put(&var,&fmt) ="&&val&i" as &&val&i label="&var &fmt value of &&val&i", * from &inds; %mend fmt_dumy; _ Extract the metadata from the format. 4

5 _ Remove the "." from the format name. _ Use the extracted format metadata to build the macrovariable array Now when we run: %fmt_dumy( inds=dat1,var=tot_dol, fmt=val_grp.,outds=out3); We get all five dummy variables. variable label first obs BEST tot_dol val_grp. value of BEST 0 BETTER tot_dol val_grp. value of BETTER 1 GOOD tot_dol val_grp. value of GOOD 0 NEG: tot_dol val_grp. value of NEG 0 POOR tot_dol val_grp. value of POOR 0 OBS_ID observation identification number a STATE state of residence CT DOB date of birth 27APR38 DFP date of first purchase 03JUN38 NOP number of purchases 1 TOT_DOL total dollars spent $ number of alternate techniques. Data Dirtable (label="directory table - example code"); length work memname $8 prefix $4; input libname $_ memname $ Prefix $;_ cards; work dat1 d1 work dat2 d2 work dat3 d3 work dat4 d4 work dat5 d5 ;;;; Data Vartable (label="variable table - example code"); length label $22 var $8 sufix $4; input Var $_ Suffix $_ label $22.;_ cards; NOP PRCS Num of Purchases TOT_DOL DOL Dollars Spent to Date ;;;; _ The libref and memname of the datasets to be joined. In some applications, it may be desirable to have "PATH" or other descriptive information. _ The prefix will be the first four characters of the new variable name and will identify which dateset contributed the value. The first character must be a letter or _. _ The variable that exists on all the input datasets to be included on the output dataset. _ The suffix is the final character string of the new variable name. _ The label will be combined with dataset information to document the variables meaning. %macro fulljoin (DIRTABLE=dirtable, /* Directory Table */ VARTABLE=vartable, /* Variable Table */ OUTTABLE=outtable, /* Output Table */ KEY =obs_id ); /* Join Key */ JOINING DATASETS In the next example, we will build code to do full outer joins on multiple datasets. We will use data generated by %BLD_SAMP (see the appendix of this paper) which simulates several "point in time" or "snap hot" datasets. The object is to create a macro to join several datasets on keys which have unique values within each dataset, but may not have been assigned a value on all datasets (referential integrity not guaranteed). The macro will be driven by two tables: The directory table, which contains the names of the datasets to be joined and the variable table, which contains the names of the variables to be saved. Since the variables have the same names and labels on all the input datasets, new variable names and labels will be generated from information in the driving tables. For this example, both the directory and the variable tables are hardcoded. In an actual application these tables would be maintained on the system. The driver tables can be manipulated using any of a select var,_ suffix, label into :var1 - :var9999, :sufx1 - :sufx9999, :labl1 - :labl9999 from &vartable; %let numvar = &sqlobs; select compress(libname. memname)_ prefix, memname, into :tblref1-:tblref99, :prefix1-:prefix99, :mn1 -:mn99 from &dirtable; %let numdir=&sqlobs; %do id=1 %to &numdir; proc sort data=&&tblref&id;_ by &key; data &outtable (sortedby=&key);_ merge %do id=1 %to &numdir; 5

6 &&tblref&id (keep = &key_ %doiv=1%to&numvar; keep = &&var&iv rename=&&var&iv =&&prefix&id.&&sufx&iv ) ; %do id=1 %to &numdir; %doiv=1%to&numvar; label &&prefix&id.&&sufx&iv =_ "&&prefix&id &&labl&iv"; ; by &key; %mend fulljoin; _ Build the macrovariable array pertaining to the variables to be included. _ Build the macrovariable array pertaining to the datasets to be used. _ Sort the datasets by the key. _ Create the output dataset. Since we know the sort order, we use the SORTEDBY option to save sorting on future steps. _ Put the input datasets in the MERGE statement. List the KEEP variables and assign new variable names as part of the input. _ Build the new labels for the variables. Author s note The author has built several versions of the macros in this paper. The examples used have been stripped of the checking and the "bells and whistles" that make macros robust and useful, but harder to follow. For example, %FULLJOIN can be made to perform calculations on data across datasets. The techniques shown here have been tested on OS/2 and UNIX systems. CONCLUSION Relatively simple SQL queries can be used in conjunction with other SAS code generating techniques to save time and effort. And it can be kind of fun...when it works! TRADEMARKS SAS is a registered trademark of SAS Institute Inc. in the USA and other countries. MS/EXCEL is a registered trademark of Microsoft, Inc. indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies CONTACT AUTHOR AT David A. Mabey Reader's Digest Association Inc. Reader's Digest Road Pleasantville, NY APPENDIX SAMPLE DATA GENERATOR MACRO /************************************************/ /* macro BLD_SAMP builds 1 to NUM_DS sample */ /* datasets that have 0 to NUM_OBS observations */ /* each on SAS library LIBNAME. The datasets */ /* are populated with randomly generated values */ /* for variables named OBS_ID, STATE, DOB, */ /* DFP, NOP, and TOT_DOL (see code for variable */ /* labels and formats). Dataset are named */ /* DAT1, DAT2, DAT3,...DAT(NUM_DS) */ /* This macro is the source of scaleable sample */ /* data for Dave Mabey s 1997 NESUG paper */ /************************************************/ %macro bld_samp (num_ds=5, /* how many data sets */ num_obs=100, /* how many observations */ libname=work); /* where to build */ /* build first data set */ data &libname..dat1 (label="sample dataset 1 -- dummy data " type =sample ); do obsnum=1 to &num_obs; drop obsnum; attrib obs_id length=$12 label="observaion identification number" ; obs_id="a" put(int(ranuni(4)*1e10), z10.); attrib state length=$2 label= state of residence ; select(int(ranuni(8)*10)); when (1,2) state= NJ ; when (3,4,5,6) state= NY ; otherwise state= CT ; end; attrib dob format=date7. label="date of birth" ; dob= 4jul05 d + int(ranuni(5)*2e4); attrib dfp format=date7. label="date of first purchase"; dfp=dob + int(ranuni(6)*1e3); attrib nop format=5. label= number of purchases ; nop=ranbin(7,10,.1); attrib tot_dol format=dollar8.2 label= total dollars spent ; tot_dol=nop * round(ranuni(9)*500,.01); output; end; /* Make more datasets based on obs_ids from 1st */ %do i=2 %to &num_ds; data &libname..dat&i (label="sample dataset &i -- dummy data " type =sample ); set _last_; /* drop old and make new in 5% of the obs_ids */ if(ranbin(&i*3,1,.05)) then obs_id="a" put(int(ranuni(&i*4)*1e10), z10.); /* add purchases in 60% of the observations */ if(ranbin(&i*8,1,.65)) then do; nnp = ranbin(&i*7,10,.3);/*num new purchases*/ nop + nnp; tot_dol + nnp * round(ranuni(&i*9)*500,.01); drop nnp; end; %mend bld_samp; Telephone (914) [email protected] 6

Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI

Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI Paper BtB-16 Same Data Different Attributes: Cloning Issues with Data Sets Brian Varney, Experis Business Analytics, Portage, MI SESUG 2013 ABSTRACT When dealing with data from multiple or unstructured

More information

Data Presentation. Paper 126-27. Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs

Data Presentation. Paper 126-27. Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs Paper 126-27 Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs Tugluke Abdurazak Abt Associates Inc. 1110 Vermont Avenue N.W. Suite 610 Washington D.C. 20005-3522

More information

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

Technical Paper. Defining an ODBC Library in SAS 9.2 Management Console Using Microsoft Windows NT Authentication Technical Paper Defining an ODBC Library in SAS 9.2 Management Console Using Microsoft Windows NT Authentication Release Information Content Version: 1.0 October 2015. Trademarks and Patents SAS Institute

More information

Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois

Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois Abstract This paper introduces SAS users with at least a basic understanding of SAS data

More information

A Method for Cleaning Clinical Trial Analysis Data Sets

A Method for Cleaning Clinical Trial Analysis Data Sets A Method for Cleaning Clinical Trial Analysis Data Sets Carol R. Vaughn, Bridgewater Crossings, NJ ABSTRACT This paper presents a method for using SAS software to search SAS programs in selected directories

More information

Managing very large EXCEL files using the XLS engine John H. Adams, Boehringer Ingelheim Pharmaceutical, Inc., Ridgefield, CT

Managing very large EXCEL files using the XLS engine John H. Adams, Boehringer Ingelheim Pharmaceutical, Inc., Ridgefield, CT Paper AD01 Managing very large EXCEL files using the XLS engine John H. Adams, Boehringer Ingelheim Pharmaceutical, Inc., Ridgefield, CT ABSTRACT The use of EXCEL spreadsheets is very common in SAS applications,

More information

SAS Programming Tips, Tricks, and Techniques

SAS Programming Tips, Tricks, and Techniques SAS Programming Tips, Tricks, and Techniques A presentation by Kirk Paul Lafler Copyright 2001-2012 by Kirk Paul Lafler, Software Intelligence Corporation All rights reserved. SAS is the registered trademark

More information

A Macro to Create Data Definition Documents

A Macro to Create Data Definition Documents A Macro to Create Data Definition Documents Aileen L. Yam, sanofi-aventis Inc., Bridgewater, NJ ABSTRACT Data Definition documents are one of the requirements for NDA submissions. This paper contains a

More information

Tales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board

Tales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board Tales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board INTRODUCTION In 20 years as a SAS consultant at the Federal Reserve Board, I have seen SAS users make

More information

You have got SASMAIL!

You have got SASMAIL! You have got SASMAIL! Rajbir Chadha, Cognizant Technology Solutions, Wilmington, DE ABSTRACT As SAS software programs become complex, processing times increase. Sitting in front of the computer, waiting

More information

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

REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS Edward McCaney, Centocor Inc., Malvern, PA Gail Stoner, Centocor Inc., Malvern, PA Anthony Malinowski, Centocor Inc., Malvern,

More information

Using Pharmacovigilance Reporting System to Generate Ad-hoc Reports

Using Pharmacovigilance Reporting System to Generate Ad-hoc Reports Using Pharmacovigilance Reporting System to Generate Ad-hoc Reports Jeff Cai, Amylin Pharmaceuticals, Inc., San Diego, CA Jay Zhou, Amylin Pharmaceuticals, Inc., San Diego, CA ABSTRACT To supplement Oracle

More information

Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets

Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets Karin LaPann ViroPharma Incorporated ABSTRACT Much functionality has been added to the SAS to Excel procedures in SAS version 9.

More information

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

Customized Excel Output Using the Excel Libname Harry Droogendyk, Stratia Consulting Inc., Lynden, ON Paper SIB-105 Customized Excel Output Using the Excel Libname Harry Droogendyk, Stratia Consulting Inc., Lynden, ON ABSTRACT The advent of the ODS ExcelXP tagset and its many features has afforded the

More information

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

Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC ABSTRACT PharmaSUG 2012 - Paper CC07 Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC In Pharmaceuticals/CRO industries, Excel files are widely use for data storage.

More information

Search and Replace in SAS Data Sets thru GUI

Search and Replace in SAS Data Sets thru GUI Search and Replace in SAS Data Sets thru GUI Edmond Cheng, Bureau of Labor Statistics, Washington, DC ABSTRACT In managing data with SAS /BASE software, performing a search and replace is not a straight

More information

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

9.1 SAS/ACCESS. Interface to SAP BW. User s Guide SAS/ACCESS 9.1 Interface to SAP BW User s Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2004. SAS/ACCESS 9.1 Interface to SAP BW: User s Guide. Cary, NC: SAS

More information

Effective Use of SQL in SAS Programming

Effective Use of SQL in SAS Programming INTRODUCTION Effective Use of SQL in SAS Programming Yi Zhao Merck & Co. Inc., Upper Gwynedd, Pennsylvania Structured Query Language (SQL) is a data manipulation tool of which many SAS programmers are

More information

Using Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX

Using Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX Paper 126-29 Using Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX ABSTRACT This hands-on workshop shows how to use the SAS Macro Facility

More information

SAS ODS HTML + PROC Report = Fantastic Output Girish K. Narayandas, OptumInsight, Eden Prairie, MN

SAS ODS HTML + PROC Report = Fantastic Output Girish K. Narayandas, OptumInsight, Eden Prairie, MN SA118-2014 SAS ODS HTML + PROC Report = Fantastic Output Girish K. Narayandas, OptumInsight, Eden Prairie, MN ABSTRACT ODS (Output Delivery System) is a wonderful feature in SAS to create consistent, presentable

More information

CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases

CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases 3 CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases About This Document 3 Methods for Accessing Relational Database Data 4 Selecting a SAS/ACCESS Method 4 Methods for Accessing DBMS Tables

More information

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

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA ABSTRACT The SAS Institute has a long history of commitment to openness

More information

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

Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc Paper 039-29 Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc ABSTRACT This paper highlights the programmable aspects of SAS results distribution using electronic

More information

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

Automation of Large SAS Processes with Email and Text Message Notification Seva Kumar, JPMorgan Chase, Seattle, WA Automation of Large SAS Processes with Email and Text Message Notification Seva Kumar, JPMorgan Chase, Seattle, WA ABSTRACT SAS includes powerful features in the Linux SAS server environment. While creating

More information

Automating SAS Macros: Run SAS Code when the Data is Available and a Target Date Reached.

Automating SAS Macros: Run SAS Code when the Data is Available and a Target Date Reached. Automating SAS Macros: Run SAS Code when the Data is Available and a Target Date Reached. Nitin Gupta, Tailwind Associates, Schenectady, NY ABSTRACT This paper describes a method to run discreet macro(s)

More information

Managing Tables in Microsoft SQL Server using SAS

Managing Tables in Microsoft SQL Server using SAS Managing Tables in Microsoft SQL Server using SAS Jason Chen, Kaiser Permanente, San Diego, CA Jon Javines, Kaiser Permanente, San Diego, CA Alan L Schepps, M.S., Kaiser Permanente, San Diego, CA Yuexin

More information

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

An email macro: Exploring metadata EG and user credentials in Linux to automate email notifications Jason Baucom, Ateb Inc. SESUG 2012 Paper CT-02 An email macro: Exploring metadata EG and user credentials in Linux to automate email notifications Jason Baucom, Ateb Inc., Raleigh, NC ABSTRACT Enterprise Guide (EG) provides useful

More information

ABSTRACT INTRODUCTION SAS AND EXCEL CAPABILITIES SAS AND EXCEL STRUCTURES

ABSTRACT INTRODUCTION SAS AND EXCEL CAPABILITIES SAS AND EXCEL STRUCTURES Paper 85-2010 Choosing the Right Tool from Your SAS and Microsoft Excel Tool Belt Steven First and Jennifer First, Systems Seminar Consultants, Madison, Wisconsin ABSTRACT There are over a dozen ways to

More information

THE POWER OF PROC FORMAT

THE POWER OF PROC FORMAT THE POWER OF PROC FORMAT Jonas V. Bilenas, Chase Manhattan Bank, New York, NY ABSTRACT The FORMAT procedure in SAS is a very powerful and productive tool. Yet many beginning programmers rarely make use

More information

More Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board

More Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board More Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board INTRODUCTION In 20 years as a SAS consultant at the Federal Reserve Board, I have seen SAS users make

More information

Chapter 2 The Data Table. Chapter Table of Contents

Chapter 2 The Data Table. Chapter Table of Contents Chapter 2 The Data Table Chapter Table of Contents Introduction... 21 Bringing in Data... 22 OpeningLocalFiles... 22 OpeningSASFiles... 27 UsingtheQueryWindow... 28 Modifying Tables... 31 Viewing and Editing

More information

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

Using Version Control and Configuration Management in a SAS Data Warehouse Environment Using Version Control and Configuration Management in a SAS Data Warehouse Environment Steve Morton, Applied System Knowledge Ltd Abstract: Data warehouse management involves many components in addition

More information

Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA

Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA ABSTRACT With multiple programmers contributing to a batch

More information

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

From Database to your Desktop: How to almost completely automate reports in SAS, with the power of Proc SQL From Database to your Desktop: How to almost completely automate reports in SAS, with the power of Proc SQL Kirtiraj Mohanty, Department of Mathematics and Statistics, San Diego State University, San Diego,

More information

Introduction. Why Use ODBC? Setting Up an ODBC Data Source. Stat/Math - Getting Started Using ODBC with SAS and SPSS

Introduction. Why Use ODBC? Setting Up an ODBC Data Source. Stat/Math - Getting Started Using ODBC with SAS and SPSS Introduction Page 1 of 15 The Open Database Connectivity (ODBC) standard is a common application programming interface for accessing data files. In other words, ODBC allows you to move data back and forth

More information

Paper 2917. Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA

Paper 2917. Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA Paper 2917 Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA ABSTRACT Creation of variables is one of the most common SAS programming tasks. However, sometimes it produces

More information

PharmaSUG 2014 Paper CC23. Need to Review or Deliver Outputs on a Rolling Basis? Just Apply the Filter! Tom Santopoli, Accenture, Berwyn, PA

PharmaSUG 2014 Paper CC23. Need to Review or Deliver Outputs on a Rolling Basis? Just Apply the Filter! Tom Santopoli, Accenture, Berwyn, PA PharmaSUG 2014 Paper CC23 Need to Review or Deliver Outputs on a Rolling Basis? Just Apply the Filter! Tom Santopoli, Accenture, Berwyn, PA ABSTRACT Wouldn t it be nice if all of the outputs in a deliverable

More information

The entire SAS code for the %CHK_MISSING macro is in the Appendix. The full macro specification is listed as follows: %chk_missing(indsn=, outdsn= );

The entire SAS code for the %CHK_MISSING macro is in the Appendix. The full macro specification is listed as follows: %chk_missing(indsn=, outdsn= ); Macro Tabulating Missing Values, Leveraging SAS PROC CONTENTS Adam Chow, Health Economics Resource Center (HERC) VA Palo Alto Health Care System Department of Veterans Affairs (Menlo Park, CA) Abstract

More information

Revolutionized DB2 Test Data Management

Revolutionized DB2 Test Data Management Revolutionized DB2 Test Data Management TestBase's Patented Slice Feature Provides a Fresh Solution to an Old Set of DB2 Application Testing Problems The challenge in creating realistic representative

More information

Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA

Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA ABSTRACT PROC EXPORT, LIBNAME, DDE or excelxp tagset? Many techniques exist to create an excel file using SAS.

More information

Data-driven Validation Rules: Custom Data Validation Without Custom Programming Don Hopkins, Ursa Logic Corporation, Durham, NC

Data-driven Validation Rules: Custom Data Validation Without Custom Programming Don Hopkins, Ursa Logic Corporation, Durham, NC Data-driven Validation Rules: Custom Data Validation Without Custom Programming Don Hopkins, Ursa Logic Corporation, Durham, NC ABSTRACT One of the most expensive and time-consuming aspects of data management

More information

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

Leveraging the SAS Open Metadata Architecture Ray Helm & Yolanda Howard, University of Kansas, Lawrence, KS Paper AD08-2011 Leveraging the SAS Open Metadata Architecture Ray Helm & Yolanda Howard, University of Kansas, Lawrence, KS Abstract In the SAS Enterprise BI and Data Integration environments, the SAS

More information

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

Using SAS With a SQL Server Database. M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC Using SAS With a SQL Server Database M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC ABSTRACT Many operations now store data in relational databases. You may want to use SAS

More information

FINDING ORACLE TABLE METADATA WITH PROC CONTENTS

FINDING ORACLE TABLE METADATA WITH PROC CONTENTS Finding Oracle Table Metadata: When PROC CONTENTS Is Not Enough Jeremy W. Poling, B&W Y-12 L.L.C., Oak Ridge, TN ABSTRACT Complex Oracle databases often contain hundreds of linked tables. For SAS/ACCESS

More information

Oracle Database 12c: Introduction to SQL Ed 1.1

Oracle Database 12c: Introduction to SQL Ed 1.1 Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

More information

Statistics and Analysis. Quality Control: How to Analyze and Verify Financial Data

Statistics and Analysis. Quality Control: How to Analyze and Verify Financial Data Abstract Quality Control: How to Analyze and Verify Financial Data Michelle Duan, Wharton Research Data Services, Philadelphia, PA As SAS programmers dealing with massive financial data from a variety

More information

Salary. Cumulative Frequency

Salary. Cumulative Frequency HW01 Answering the Right Question with the Right PROC Carrie Mariner, Afton-Royal Training & Consulting, Richmond, VA ABSTRACT When your boss comes to you and says "I need this report by tomorrow!" do

More information

Improving Your Relationship with SAS Enterprise Guide

Improving Your Relationship with SAS Enterprise Guide Paper BI06-2013 Improving Your Relationship with SAS Enterprise Guide Jennifer Bjurstrom, SAS Institute Inc. ABSTRACT SAS Enterprise Guide has proven to be a very beneficial tool for both novice and experienced

More information

SAS Client-Server Development: Through Thick and Thin and Version 8

SAS Client-Server Development: Through Thick and Thin and Version 8 SAS Client-Server Development: Through Thick and Thin and Version 8 Eric Brinsfield, Meridian Software, Inc. ABSTRACT SAS Institute has been a leader in client-server technology since the release of SAS/CONNECT

More information

Alternatives to Merging SAS Data Sets But Be Careful

Alternatives to Merging SAS Data Sets But Be Careful lternatives to Merging SS Data Sets ut e Careful Michael J. Wieczkowski, IMS HELTH, Plymouth Meeting, P bstract The MERGE statement in the SS programming language is a very useful tool in combining or

More information

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO: INTRODUCTION: You can extract data (i.e. the total cost report) directly from the Truck Tracker SQL Server database by using a 3 rd party data tools such as Excel or Crystal Reports. Basically any software

More information

ABSTRACT INTRODUCTION THE MAPPING FILE GENERAL INFORMATION

ABSTRACT INTRODUCTION THE MAPPING FILE GENERAL INFORMATION An Excel Framework to Convert Clinical Data to CDISC SDTM Leveraging SAS Technology Ale Gicqueau, Clinovo, Sunnyvale, CA Marc Desgrousilliers, Clinovo, Sunnyvale, CA ABSTRACT CDISC SDTM data is the standard

More information

New Tricks for an Old Tool: Using Custom Formats for Data Validation and Program Efficiency

New Tricks for an Old Tool: Using Custom Formats for Data Validation and Program Efficiency New Tricks for an Old Tool: Using Custom Formats for Data Validation and Program Efficiency S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT PROC FORMAT is one of the old standards among SAS Procedures,

More information

SAS Office Analytics: An Application In Practice

SAS Office Analytics: An Application In Practice PharmaSUG 2016 - Paper AD19 SAS Office Analytics: An Application In Practice Monitoring and Ad-Hoc Reporting Using Stored Process Mansi Singh, Roche Molecular Systems Inc., Pleasanton, CA Smitha Krishnamurthy,

More information

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

Switching from PC SAS to SAS Enterprise Guide Zhengxin (Cindy) Yang, inventiv Health Clinical, Princeton, NJ PharmaSUG 2014 PO10 Switching from PC SAS to SAS Enterprise Guide Zhengxin (Cindy) Yang, inventiv Health Clinical, Princeton, NJ ABSTRACT As more and more organizations adapt to the SAS Enterprise Guide,

More information

Let There Be Highlights: Data-driven Cell, Row and Column Highlights in %TAB2HTM and %DS2HTM Output. Matthew Flynn and Ray Pass

Let There Be Highlights: Data-driven Cell, Row and Column Highlights in %TAB2HTM and %DS2HTM Output. Matthew Flynn and Ray Pass Let There Be Highlights: Data-driven Cell, Row and Column Highlights in %TAB2HTM and %DS2HTM Output Matthew Flynn and Ray Pass Introduction Version 6.12 of the SAS System Technical Support supplied macros

More information

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute JMP provides a variety of mechanisms for interfacing to other products and getting data into JMP. The connection

More information

AN INTRODUCTION TO MACRO VARIABLES AND MACRO PROGRAMS Mike S. Zdeb, New York State Department of Health

AN INTRODUCTION TO MACRO VARIABLES AND MACRO PROGRAMS Mike S. Zdeb, New York State Department of Health AN INTRODUCTION TO MACRO VARIABLES AND MACRO PROGRAMS Mike S. Zdeb, New York State Department of Health INTRODUCTION There are a number of SAS tools that you may never have to use. Why? The main reason

More information

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

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX CC04 While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX ABSTRACT If you are tired of running the same jobs over and over again, this paper is

More information

An Introduction to SAS/SHARE, By Example

An Introduction to SAS/SHARE, By Example Paper 020-29 An Introduction to SAS/SHARE, By Example Larry Altmayer, U.S. Census Bureau, Washington, DC ABSTRACT SAS/SHARE software is a useful tool for allowing several users to simultaneously access

More information

Performing Queries Using PROC SQL (1)

Performing Queries Using PROC SQL (1) SAS SQL Contents Performing queries using PROC SQL Performing advanced queries using PROC SQL Combining tables horizontally using PROC SQL Combining tables vertically using PROC SQL 2 Performing Queries

More information

SAP Data Services 4.X. An Enterprise Information management Solution

SAP Data Services 4.X. An Enterprise Information management Solution SAP Data Services 4.X An Enterprise Information management Solution Table of Contents I. SAP Data Services 4.X... 3 Highlights Training Objectives Audience Pre Requisites Keys to Success Certification

More information

DBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7

DBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7 97 CHAPTER 7 DBF Chapter Note to UNIX and OS/390 Users 97 Import/Export Facility 97 Understanding DBF Essentials 98 DBF Files 98 DBF File Naming Conventions 99 DBF File Data Types 99 ACCESS Procedure Data

More information

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

Using SAS Enterprise Business Intelligence to Automate a Manual Process: A Case Study Erik S. Larsen, Independent Consultant, Charleston, SC Using SAS Enterprise Business Intelligence to Automate a Manual Process: A Case Study Erik S. Larsen, Independent Consultant, Charleston, SC Abstract: Often times while on a client site as a SAS consultant,

More information

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.

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. Pharmasug 2014 - paper CC-47 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. ABSTRACT William E Benjamin Jr, Owl Computer

More information

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

Overview. NT Event Log. CHAPTER 8 Enhancements for SAS Users under Windows NT 177 CHAPTER 8 Enhancements for SAS Users under Windows NT Overview 177 NT Event Log 177 Sending Messages to the NT Event Log Using a User-Written Function 178 Examples of Using the User-Written Function

More information

Microsoft' Excel & Access Integration

Microsoft' Excel & Access Integration Microsoft' Excel & Access Integration with Office 2007 Michael Alexander and Geoffrey Clark J1807 ; pwiueyb Wiley Publishing, Inc. Contents About the Authors Acknowledgments Introduction Part I: Basic

More information

SUGI 29 Coders' Corner

SUGI 29 Coders' Corner Paper 074-29 Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board INTRODUCTION In 19 years as a SAS consultant at the Federal Reserve Board, I have seen SAS users

More information

The SAS Data step/macro Interface

The SAS Data step/macro Interface Paper TS09 The SAS Data step/macro Interface Lawrence Heaton-Wright, Quintiles, Bracknell, Berkshire, UK ABSTRACT The SAS macro facility is an extremely useful part of the SAS System. However, macro variables

More information

Importing and Exporting With SPSS for Windows 17 TUT 117

Importing and Exporting With SPSS for Windows 17 TUT 117 Information Systems Services Importing and Exporting With TUT 117 Version 2.0 (Nov 2009) Contents 1. Introduction... 3 1.1 Aim of this Document... 3 2. Importing Data from Other Sources... 3 2.1 Reading

More information

Essential Project Management Reports in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA

Essential Project Management Reports in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA Essential Project Management Reports in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA ABSTRACT Throughout the course of a clinical trial the Statistical Programming group is

More information

AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL

AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL Paper CC01 AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL Russ Lavery, Contractor for K&L Consulting Services, King of Prussia, U.S.A. ABSTRACT The primary purpose of this paper is to provide a generic DDE

More information

The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data

The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data Carter Sevick MS, DoD Center for Deployment Health Research, San Diego, CA ABSTRACT Whether by design or by error there

More information

Creating Dynamic Reports Using Data Exchange to Excel

Creating Dynamic Reports Using Data Exchange to Excel Creating Dynamic Reports Using Data Exchange to Excel Liping Huang Visiting Nurse Service of New York ABSTRACT The ability to generate flexible reports in Excel is in great demand. This paper illustrates

More information

Using the Magical Keyword "INTO:" in PROC SQL

Using the Magical Keyword INTO: in PROC SQL Using the Magical Keyword "INTO:" in PROC SQL Thiru Satchi Blue Cross and Blue Shield of Massachusetts, Boston, Massachusetts Abstract INTO: host-variable in PROC SQL is a powerful tool. It simplifies

More information

Identifying Invalid Social Security Numbers

Identifying Invalid Social Security Numbers ABSTRACT Identifying Invalid Social Security Numbers Paulette Staum, Paul Waldron Consulting, West Nyack, NY Sally Dai, MDRC, New York, NY Do you need to check whether Social Security numbers (SSNs) are

More information

SAS 9.3 Drivers for ODBC

SAS 9.3 Drivers for ODBC SAS 9.3 Drivers for ODBC User s Guide Second Edition SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2011. SAS 9.3 Drivers for ODBC: User s Guide,

More information

SAS UNIX-Space Analyzer A handy tool for UNIX SAS Administrators Airaha Chelvakkanthan Manickam, Cognizant Technology Solutions, Teaneck, NJ

SAS UNIX-Space Analyzer A handy tool for UNIX SAS Administrators Airaha Chelvakkanthan Manickam, Cognizant Technology Solutions, Teaneck, NJ PharmaSUG 2012 Paper PO11 SAS UNIX-Space Analyzer A handy tool for UNIX SAS Administrators Airaha Chelvakkanthan Manickam, Cognizant Technology Solutions, Teaneck, NJ ABSTRACT: In the fast growing area

More information

A Recursive SAS Macro to Automate Importing Multiple Excel Worksheets into SAS Data Sets

A Recursive SAS Macro to Automate Importing Multiple Excel Worksheets into SAS Data Sets PharmaSUG2011 - Paper CC10 A Recursive SAS Macro to Automate Importing Multiple Excel Worksheets into SAS Data Sets Wenyu Hu, Merck Sharp & Dohme Corp., Upper Gwynedd, PA Liping Zhang, Merck Sharp & Dohme

More information

Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC

Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC ABSTRACT Have you used PROC MEANS or PROC SUMMARY and wished there was something intermediate between the NWAY option

More information

Top 10 Things to Know about WRDS

Top 10 Things to Know about WRDS Top 10 Things to Know about WRDS 1. Do I need special software to use WRDS? WRDS was built to allow users to use standard and popular software. There is no WRDSspecific software to install. For example,

More information

Managing Clinical Trials Data using SAS Software

Managing Clinical Trials Data using SAS Software Paper DM08 Managing Clinical Trials Data using SAS Software Martin J. Rosenberg, Ph.D., MAJARO InfoSystems, Inc. ABSTRACT For over five years, one of the largest clinical trials ever conducted (over 670,000

More information

Clinical Trial Data Integration: The Strategy, Benefits, and Logistics of Integrating Across a Compound

Clinical Trial Data Integration: The Strategy, Benefits, and Logistics of Integrating Across a Compound PharmaSUG 2014 - Paper AD21 Clinical Trial Data Integration: The Strategy, Benefits, and Logistics of Integrating Across a Compound ABSTRACT Natalie Reynolds, Eli Lilly and Company, Indianapolis, IN Keith

More information

Building and Customizing a CDISC Compliance and Data Quality Application Wayne Zhong, Accretion Softworks, Chester Springs, PA

Building and Customizing a CDISC Compliance and Data Quality Application Wayne Zhong, Accretion Softworks, Chester Springs, PA WUSS2015 Paper 84 Building and Customizing a CDISC Compliance and Data Quality Application Wayne Zhong, Accretion Softworks, Chester Springs, PA ABSTRACT Creating your own SAS application to perform CDISC

More information

Using SAS/IntrNet as a Web-Enabled Platform for Clinical Reporting

Using SAS/IntrNet as a Web-Enabled Platform for Clinical Reporting Paper AD09 Using SAS/IntrNet as a Web-Enabled Platform for Clinical Reporting ABSTRACT Paul Gilbert, DataCeutics, Inc., Pottstown, PA Steve Light, DataCeutics, Inc., Pottstown, PA Gregory Weber, DataCeutics,

More information

PharmaSUG2011 - Paper AD11

PharmaSUG2011 - Paper AD11 PharmaSUG2011 - Paper AD11 Let the system do the work! Automate your SAS code execution on UNIX and Windows platforms Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.,

More information

The SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL

The SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL The SET Statement and Beyond: Uses and Abuses of the SET Statement S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT The SET statement is one of the most frequently used statements in the SAS System.

More information

Developing an On-Demand Web Report Platform Using Stored Processes and SAS Web Application Server

Developing an On-Demand Web Report Platform Using Stored Processes and SAS Web Application Server Paper 10740-2016 Developing an On-Demand Web Report Platform Using Stored Processes and SAS Web Application Server ABSTRACT Romain Miralles, Genomic Health. As SAS programmers, we often develop listings,

More information

Integrating Data and Business Rules with a Control Data Set in SAS

Integrating Data and Business Rules with a Control Data Set in SAS Paper 3461-2015 Integrating Data and Business Rules with a Data Set in SAS Edmond Cheng, CACI International Inc. ABSTRACT In SAS software development, data specifications and process requirements can be

More information

Business Intelligence Tutorial

Business Intelligence Tutorial IBM DB2 Universal Database Business Intelligence Tutorial Version 7 IBM DB2 Universal Database Business Intelligence Tutorial Version 7 Before using this information and the product it supports, be sure

More information