HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2012 Papers - Index

143 papers. Source: NESUG (Northeast SAS Users Group) conference proceedings.

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 "There's an App for That": It's Called SAS ODS! Mobile Data Entry and Reporting via SAS ODS Michael Drutar Most mobile reporting allows users only to receive reports; however, it is often necessary to INPUT data on a mobile device. This can be accomplished by leveraging Google Docs spreadsheets and SAS ODS. This paper's example explains how a cross country coach records a runner's race times (in real time) on a Google spreadsheet using his mobile device. His office computer has a SAS job which, via the FILENAME statement, reads the updated Google spreadsheet into SAS. SAS processes this data and sends an e-mail containing an embedded HTML dashboard of Runner KPI dials, charts and/or tables. The coach receives this report almost instantaneously. Because it is an embedded e-mail, this solution works on nearly any mobile device (for example, iPhone or Android) proc step, proc report, filename statement, sas programmer, proc gchart, proc import, sas output, line chart, dataset, proc print 11
2 %ASSERT Your Way to Sleep-Filled Nights: A One-Line Macro for Data Validation Quentin McMullen Data are messy, and should never be trusted. This paper presents a simple SAS macro, %Assert, which allows the user to state a Boolean expression that is expected to be true, e.g.: %assert(Age>0) . If the expression is false, an error message is printed to the log. The macro may be used to verify expectations about dat a at any point in a DATA STEP. Use of the %Assert macro provides two important benefits: it provides a method for automated error detection, enhancing confidence that results are correct; and it allows the programmer to explicitly state expectations regarding the data being processed, enhancing the readability of code. Assertions are a critical tool for both defensive coding and test-driven development (Wright, 2006). Principles of macro design encountered during the development of the ma cro are addressed error message, if-then-else, macro call, data step, sas programmer, %if-%then-%else, proc step, macro loop, macro definition, data cleaning 8
3 A Breeze through SAS Options to Enter a Zero-Filled Row Kajal Tahiliani Programmers often need to summarize data into tables as per template. But study data might not always have all the data combinations as required in the template. In such cases we need add rows that contain zeroes for data combinations that do not exist in the data and insert them into our results. This paper discusses the different methods to add rows containing zeroes proc step, proc means, proc freq 6
4 A Macro to Squeeze SAS Data and Create a SAS Transport File Hany Aboutaleb At Biogen Idec we have developed a SAS macro to create transport file/s, and resize text columns to fit the longest value within the column for all datasets. This macro will put those huge text columns on a diet by squeezing the unnecessary space out of them without losing any of the character variable content. Using this macro may result in significant reductions in the SAS/DATA size. In one case, SAS data that required 113.4 GB was reduced to 56.22 GB, a reduction in disk space of almost 50% character variable, dataset, proc compare, length statement, sas library 11
5 A Macro-Driven Approach for Systematically Testing Variables Against a Base Regression Model Jennifer Alessandro,
Bryan Harmon
Have you ever had a base regression model and wanted to test what happens when you add a variable such as television advertising to that base model? What if you have 10 different television variables, each with four differ- ent possible retention rates? You may even want to try some of the advertising variables in combination with one another. In the end, only one or a small subset of these variables should be added to the base model. All of them need to be tested, but testing them in the model all at once will cause collinearity issues. This paper will pro- vide a macro you can use to test a large set of variables quickly and efficiently. The output will provide a summary showing how each candidate variable worked in the base model and which combinations of candidate variables worked well together. It will also go into detail on how to easily generalize the macro, so it can be used for many projects proc sql, proc step, regression analysis, macro variable, estimate, proc reg 7
6 A Map is Just a Graph Without Axes Nat H. Wooding Jr. SAS' PROC GMAP can produce a variety of maps of varying complexity but to go beyond the basic capabilities of GMAP, it is necessary to use the Annotate Facility in order to add additional informat ion such as symbols in specific places. Furthermore, there are times that the desired map is simply a sketch of geographically related measurements that need to be displayed in a simulated, not to scale, map. A ma p is simply a collection of coordinates that are plotted but for which no X/Y axis system is typically show n (although items such as road atlases or military maps or charts may have a grid and axes to help locate specific points of reference). By remembering this, one can sometimes create an embellished map using PROC GPLOT without having to create an Annotate data set. Furthermore, by using GPLOT with the axes, one can locate invalid map coordinates in user created map files proc step, proc gplot, proc gmap 8
7 A Model for Extreme Stacking of Data at Endpoints of a Distribution Robert J. Gallop Analyses will only provide correct inferences when certain assumptions are met. Regrettably, researchers do not always assess the validity of their assumptions. One scenario requiring such consideration is when data is stacked at one or both ends of a distribution. When data are stacked at zero, regression models are not appropri- ate but zero-altered regression models (e.g., zero-inflated Poisson or negative binomial, and hurdle models), can be valid and effective models implemented with the GENMOD, COUNTREG, or FMM procedures. When data are stacked at two known extremes, a different modeling structure must be used. In this paper, we propose a model in which the complete distribution of the outcome is modeled by three component distributions: the two extreme re- sponses and a distribution for responses in between, implemented with the NLMIXED procedure regression analysis, normal distribution, proc mixed, estimate, proc step, proc nlmixed, odds ratio, likelihood function, logistic distribution, logistic regression, zero-inflated negative binomial, poisson distribution, probability distribution 8
8 A Paperless Report Generation and Distribution System George P. Sharrard All over the world, business units are looking for ways to be more "Green". What better way to enhance the "Greenness" of your projects then by offering paperless solutions for the reports you generate. Using a web server, reports can be generated in .pdf and/or .html format for anyone in your organization to access. Need more security? Want to be more specific as to who sees your reports? Then don't use the web server - generate the same .pdf and .html reports as email attachments. If your reports take the form of daily notifications then maybe you should consider sending emails where the body of the email is nicely formatted html. In this paper we will examine the FILENAME statement's options as they apply to the email engine; specifically the 'to', 'subject', 'attach', and 'type' options. For web based reports we will look at using the ftp engine on the FILENAME and highlight the use of ODS PDF and ODS HTML for creating very flexible output filename statement, macro variable, ods html, ods pdf, data step 5
9 A Practical Application of PROC GPLOT and PROC GCHART and Annotate to Clinical Trial Data Tulin Shekar Meaningful presentation of Clinical Trial Data is challenging. Graphics with use of SAS/GRAPH is a powerful tool to address this challenge. The purpose of this paper is to describe how to easily produce plots/charts by us- ing the SAS PROCEDURE GPLOT/GCHART and Annotate facility. Creating these graphics in SAS can be time-consuming and challenging. This paper introduces some helpful codes using PROC GPLOT to generate plots from clinical trial data in ODS RTF format, including methods to: Display irregular numeric data in x-axis with unequal intervals, use of annotate function to display overall treat- ment means, display of subgroup summaries using forest plots, restructure data to create bars via use of GCHART for by treatment displays. This paper is intended for those who are familiar with the PROC GPLOT / GCHART procedure but have a desire to improve their graphical presentation skills forest plot, sample, clinical trial, proc gplot, proc gchart, proc step, clinical data 7
10 A SAS Program to Construct Simultaneous Confidence Intervals of Relative Risk for Multiple Adverse Events Xiaoli Lu Assessing adverse effects is critical in any clinical trial or interventional study. Adverse effects for testing a drug/device often involve many clinical symptoms and each patient may experience multiple adverse events. Patients may be lost during follow-up, or their treatments are terminated early given the prospective nature of a clinical trial. Consequently, commonly used SAS programs and other statistical packages for analysis of adverse events (AE), which form individual confidence intervals of cumulative incidence based relative risk (RR), are often not adequate and sometimes not appropriate. This paper presents a SAS program which can be used to analyze data with multiple AE by forming simultaneous confidence intervals of incidence density based RR confidence interval, clinical trial, adverse events, relative risk, significance level, type i error 6
11 A SAS Tip-of-the-Day Web Page on an Intranet Bruce F. Gilsen sample, dataset 12
12 A Survey of Some of the Most Useful SAS Functions Ronald P. Cody SAS Functions provide amazing power to your DATA STEP programming. Some of these functions are essential- some of them save you writing volumes of unnecessary code. This paper covers some of the most useful SAS functions. Some of these functions may be new to you and they will change the way you program and approach common programming tasks character variable, missing value, length statement, substr function, input statement, lag function, compress function, sas function, put statement, sysdate9, yrdif, character functions, numeric functions, call missing, call sortn, missing function, if-then-else 16
13 A Tutorial on the SAS Macro Language John J. Cohen The SAS Macro language is another language that rests on top of regular SAS code. If used properly, it can make programming easier and more fun. However , not every program is improved by using macros. Furthermore, it is another language syntax to learn, and can create problems in debugging programs that are even more entertai n- ing than those offered by regular SAS. We will discuss using macros as code gene rators, saving repetitive and tedious effort, for passing parameters through a program to avoid hard coding values, and to pass code fragments, thereby making certain tasks easier than using regular SAS alone. Macros facilitate conditional execution and can be used to create program modules that can be standardized and re -used throughout your organization. Finally, macros can help us create interactive systems in the absence of SAS/AF. When we are done, you will know the difference between a macro, a macro variable, a macro statement, and a macro function macro variable, macro definition, macro facility, macro loop, macro call, do loop, macro function, title statement, macro put, %if-%then-%else 10
14 A Visual Approach to Monitoring Case Report Form Submission During Clinical Trials Rebecca Horney,
Karen Jones,
Annette Wiseman
Clinical Trials data management requires close monitoring of Case Report Form ( CRF) submission, particularly for trials involving a complex mixture of hundreds or thousands of subjects, multiple recruitment sites and many different rating periods. Monitoring must be performed on a routine, almost "real -time", basis to assure timelin ess and accuracy of data submission as well as the overall integrity and validity of the trial. Using common SAS code and procedures, we have developed a tabular method of presenting Clinical Trial data submission on a subject -by-subject basis over the course of the trial crf, randomization, clinical trial, clinical data 7
15 Accessing SAS Code via Visual Basic for Applications Jennifer Davies SAS software has functionality that applications such as Microsoft Access or EXCEL do not have and vice versa. However, in some situations, Microsoft applications are preferred by the user over SAS for a multitude of reasons. This paper will discuss how to integrate the use of Microsoft applications with the functionality of SAS programs. This becomes very important when SAS Business Intelligence is not available. Depending on how SAS is installed in the user's organization, the programmer may have to access SAS on the PC or a server version of the application. This paper will explain the two methods used for calling SAS code from Visual Basic for Applications (VBA) Code (v6.5) sas base, lookup, sas enterprise guide, excel 5
16 Adding Control to Your Data Using SAS System and Dataset Options David W. Franklin Controlling access to your data and keeping track of any changes to it is becoming an increasingly important task. A lot is at risk when data becomes compromised, and depending on the event, regulators may become involved. This paper looks at a way that SAS provides of controlling who has access to the datasets for modification, and also looks at two alternatives for tracking changes, first through an audit trail and second using SAS dataset "versioning" audit trail, dataset, proc contents, sysrc, proc compare, proc step, proc sql 6
17 An Animated Guide: Regression Trees in JMP and Enterprise Miner Russell M. Lavery A decision tree is a powerful multivariate technique that is used for both data exploration and prediction. Since many SAS programmers do not have access to the SAS modules that create trees and have not had a chance to use them this paper will have two purposes. The primary purpose will be to compare trees in two different soft- ware packages. This will be done in an appendix and will be sufficient for people who are familiar with trees. However, many people will not be familiar with trees and not be able to understand that table without some expla- nation of the concepts and terms. The paper itself will explain concepts associated with trees so that when the comparisons are made, they are more easily understood. As an aside: given the rapid pace of development of SAS products, it is likely that the table will soon be obsolete and the long-term benefit from this effort the back- ground information in the paper data mining, data cleaning, training set, validation set, proc hpsplit, regression analysis, missing value, sample, bootstrap, if-then-else, p-value, roc curve, gradient boosting 32
18 An Efficient Method to Create a Large and Comprehensive Codebook Wen Song,
Kamya Khanna,
Baibai Chen
At the conclusion of many data management projects, providing a client with an informative codebook is a com- mon task for data managers or SAS programmers. When faced with a particularly large dataset containing thou- sands of variables or when faced with clients who demand many details about their variables, even the most expe- rienced programmers might find this to be a daunting task. This paper provides a method of using SAS to create a customized codebook that includes the names, labels, types, values, formatted values, frequencies and per- centages for every variable in a dataset proc step, macro variable, proc freq, do loop, proc format, proc sql, ods html, macro loop, macro function 7
19 An Introduction to Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS Vincent DelGobbo This paper explains how to use Base SAS 9 software to create multi-sheet EXCEL workbooks (for EXCEL versions 2002 and later). You learn step-by-step techniques for quickly and easily creating attractive multi-sheet EXCEL workbooks that contain your SAS output using the ExcelXP ODS tagset and ODS styles. The techniques that are presented in this paper can be used regardless of the platform on which SAS software is installed. You can even use them on a mainframe! Creating and delivering your workbooks on-demand and in real time using SAS server technology is discussed. Although the title is similar to previous papers by this author, this paper contains new and revised material not previously presented excel, xls, sas output, output delivery system, sas base, proc print, proc step, ods xml, proc tabulate, sample 20
20 An Introduction to Perl Regular Expressions in SAS 9 Selvaratnam Sridharma Perl regular expressions allow you to locate a specific character or a specific string of characters in a text string. Many of the string processing tasks in SAS can be done using Perl regular expressions. These tasks can also be performed using traditional string functions in SAS. But, Perl regular expressions can sometimes provide a much more compact solution to a much more complicated string manipulation task. Some examples are provided to illustrate the use of some regular expressions to find and manipulate some patterns in a text string numeric variable, prxchange 11
21 Analyze and Manage Your Output with PROC MEANS Si Gao,
Xin Li
PROC MEANS is among the most flexible and powerful procedures in SAS system. One can efficiently analyze data, generate and output inferential statistics in a straightforward fashion. This paper explores applications of PROC MEANS in depth. Sometimes we need to provide summary statistics at different grouping levels (male, female and both, e.g.). Instead of working at every individual grouping level and merging later, PROC MEANS provides a powerful solution to generate a synthesized output directly. As illustrated by examples with health data, PROC MEANS is especially flexible when there are many grouping levels. Established codes are provided that can be easily revised to fit into various practical projects. This paper offers insight into a specific application of PROC MEANS in addition to a broad range of existing applications in the literature class variable, proc step, inferential statistics, proc means, data governance 6
22 Analyzing the Safewalk Program with SAS: Saving Shelter Dogs One Walk at a Time Louise S. Hadden,
Terri Bright
The MSPCA (Massachusetts Society for Prevention of Cruelty to Animals) in Boston initiated the Safewalk Program in January 2009. This program was designed to enrich the experience of shelter dogs by providing training to volunteers and staff that allow dogs of varied backgrounds and temperaments to be exercised safely, as well as promoting behaviors encouraging adoption on the adoption floor. Intuitively the program was felt to increase adoption rates, particularly in "hard to adopt" dogs, but proving the benefits of the program was a challenge, especially given the greatly increased numbers of homeless dogs during the Safewalk Program time period. The MSPCA has recorded statistics on all animals in their care compiled with Chameleon software. Records for all dogs for 30 months prior to the initiation of Safewalk and 30 months after were selected from the Chameleon data base. This data extract was analyzed using multiple SAS procedures in SAS/STAT proc step, interaction effect, sample, proc freq 12
23 Applying Business Analytics to Optimize Clinical Research Operations David Handelsman SAS is widely accepted as the gold standard for determining safety and efficacy for clinical trials, and it provides the primary mechanism for preparing data for traditional clinical research analysis activities. However, most SAS users in the biopharmaceutical industry are unaware of the broad range of SAS analytics that are widely applied in other industries. This paper discusses and describes how SAS business and advanced analytics can be used to design better trials, forecast patient-based activities, and optimize other operational processes. Applying business and advanced analytics to clinical trial operations represents a new and improved approach to reducing the cost and time associated with managing clinical research projects. As a result, the roles of SAS experts in the biopharmaceutical industry are expanded clinical trial, clinical research, data cleaning, likelihood function, life sciences 8
24 Applying Customer Attitudinal Segmentation to Improve Marketing Campaigns Wenhong Wang,
Mark Antiel
Customer segmentation is fundamental for successful marketing ad campaigns. Current segmentation strategies are primarily based on customers purchase history and their demographics. In this paper, we will present customer attitudinal segmentation as a new method on driving incremental sales in B2B marketing campaigns. We will also illustrate how SAS software may be used to analyze customer survey data, develop classification models and classify customers into multi-level attitudinal segments proc step, proc factor, proc varclus, value segmentation, factor loading, create table, proc princomp 10
25 Automatically Generating SAS Code from Client Specifications Stanley E. Legum It is frequently the case that source data are not organized or labeled in the manner that is needed for analysis or delivery. When preparing formal data delivery files, project management or the client often have detailed specifications for the format in which the data need to be delivered. A useful technique in such situations is to create an EXCEL file listing all source variables with flags indicating which are to be delivered and what files each is to go in, as well as including fields giving the delivery variable names and the labels for each variable. Project management can update the EXCEL file as needed and SAS jobs can read it to generate the required delivery files. This technique avoids hard coding renames and label statements. The EXCEL file can serve as part of the project documentation. It can also be used as input for checks of draft delivery files to ensure that all and only the specified variables are in the files, as well as other QC checks excel, proc step, proc import, proc sql, create table 14
26 Avoiding the "Ooh Nasty" David W. Franklin Typically, when you build a small garden shed you should first do some planning, then do construction, and finally look it over and check what you have done and that it is going to do as intended. A similar process is used for writing programs - we should first do some planning, construct the program, and check it over to see that it producing what was asked. This paper takes a brief and lighthearted look at each of these stages, providing a few tips for avoiding some of the many pitfalls and gives a few pieces of SAS code that are useful in the development of your program, hopefully avoiding having to say that dreaded phrase, "Ooh Nasty" proc step, adverse events, macro definition 9
27 Becoming the Smartest Guys in the Room: An Analysis of the Enron Emails Using an Integration of Text Analytics and Case Management John York By integrating SAS Enterprise Case Management with SAS Text Analytics, fraud investigators gain an analytical advantage. SAS Enterprise Case Management expedites fraud investigations by providing an organized environment for managing investigation workflows, documentation, and case notes. Using SAS Text Analytics, you can index and categorize each document, further enhancing search capabilities, uncovering root causes, and saving time and money during time-sensitive investigations and audits. The Case Management repository is valuable in itself, not only as an organizational repository, but also as a source of knowledge with alert capabilities that can be investigated with analytics in its own right. The integrated capability of utilizing SAS Text Analytics with SAS Enterprise Case Management is illustrated using the Enron email corpus case management, unstructured data 8
28 Behind the Scenes with SAS: Using Custom Graphics in SAS Output Louise S. Hadden SAS provides many opportunities to add customized images to SAS ODS output. This presentation will demonstrate various ways to add custom backgrounds to tabular and graphic output; add custom images to titles, footnotes, ODS text fields and tabular output; and add custom "fills" to SAS/GRAPH maps and graphs. Some possible uses of custom images include a company logo embedded in SAS output, graphic displays of positive or negative outcomes, and watermarks containing "draft" or "confidential". The SAS code to accomplish all these potential uses, and more, will be shown sample, output delivery system 12
29 Better Safe than Sorry: A SAS Macro to Selectively Back Up Files Jia Wang,
Zhengyi Fang
SAS programmers know that they need to regularly back up their SAS programs, data sets, and documentation files, but it's not done as frequently or systematically as it should be-- especially if there are files from hundreds of folders or subfolders every week. The best way to ensure routine file backups is to make it easy to do and easy to document. This paper presents a handy, easy-to-use, SAS tool that automatically backs up files stored in a hierarchical struc- ture. The tool allows you to select files based on folder, file type, file size, time period of creation, and file owner- ship. Once your selection is made, by running the SAS program, all files that meet your criteria will be copied au- tomatically to a designated location with the same hierarchical structure as the source files. You can also schedule the backup program to run at a pre-set time and send a notification email with a list documenting the folders and files that have been backed up txt, macro variable, input statement, macro loop, do loop, macro definition, dataset, %if-%then-%else 5
30 Bring Excel Files with Multiple Sheets to SAS Mindy Wang In today's work place, EXCEL files seem to be the most common files that we deal with. Sometimes we encounter data come in as an EXCEL file with multiple spread sheets. This paper illustrates three approaches as to bring the spread sheets into SAS, where each sheet becomes a SAS dataset. This first method is using DDE (Dynamic Data Exchange). The second method is using a simple macro program to import the multiple spreadsheets one by one. This third method is setting up the EXCEL file as a SAS library and bring in each sheet as a member in the library. The last method is definitely very convenient and easy to use when there are many sheets involved excel, macro variable, proc sql, proc step 7
31 Building a Predictive Model for 30-Day Inpatient Readmission Using PROC PHREG Klaus Lemke Context: Hospitals assess the readmission risk of their inpatients, and use this assessment to prioritize patients at risk of readmission who will benefit from transition management to outpatient care with the goal of becoming less likely to be readmitted within a 30 day time period. Purpose: We are building a predictive 30-day readmission model by using a large claims database1 and applying a tool2 that provides several claims-based markers for a time-to-readmission analysis. Cox proportional hazard regression, and in particular the SAS/STAT PHREG procedure enables us to model time to readmission while adjusting for covariates and accounting for time censoring and person attrition. The approach also enables us to assess the impact of recurrent readmissions and time- varying covariates. Impact: This paper will give the reader insight into applying PROC PHREG to model the likelihood of 30- day readmission regression analysis, hazard function, proc phreg, proc step, hazard ratio, proportional hazards assumption, confidence interval, proc mixed, survival analysis, likelihood function, time-dependent covariate, logistic distribution 13
32 Calculating Questionnaire Scores Made Easy in SAS Qin Lin In clinical studies, questionnaire is often used to collect data such as quality of life. For statistical analysis, subject's responses to a questionnaire are often summarized by an overall total score and some sub scores (e. g. symptom score, activity score, etc.). The calculati on of questionnaire score in SAS sometimes can be quite challenging due to: (1) The large number of questions with different levels of response (yes/no, better/same/worse, etc.); (2) Conditional questions (i.e. questions are answered only when "Yes" in previous question checked); (3) Missing data and different tolerance level of missing data (overall score will not be calculated if data is missing in key questions, but will be calculated if the missing data is in a less important question); (4) Different weight assigned to different questions in calculating total score sample, do loop, missing value, if-then-else, proc format, proc step 9
33 Careful Use of Input Delimiters Howard L. Schreier The DLM= option provides a lot of flexibility, but there are pitfalls which can cause unexpected results. This paper illustrates one of these, caused by reliance on default variable attributes, and recommends a practice which can prevent such difficulties. Coders' CornerNESUG 2012 input statement, character variable, infile statement 4
34 Checking for Duplicates Wendi L. Wright This introductory level paper demonstrates a quick way to find duplicates in a dataset (with both simple and complex keys). It discusses what to do when they are found, and shows the difference between the PROC SORT options NODUP and NODUPKEY. The last example presented will show how to use the option NODUPKEY to keep only the record with the highest value of a variable when duplicates are found by group processing, proc step, proc sort 5
35 Checking Out Your Dates with SAS Christopher J. Bost Checking the quality of date variables can be a challenge. PROC FREQ is impractical with a large number of dates. PROC MEANS calculates summary statistics but displays results as SAS date values. PROC TABULATE, however, can calculate summary statistics and format the results as dates. This paper reviews these approaches plus the STACKODS option in SAS 9.3 that might make PROC MEANS the preferred method for checking out your dates proc step, proc freq, proc tabulate, date variable, missing value, proc means, sample size, sample, sysdate9, dataset, proc print 6
36 Combining Continuous Events and Calculating Duration in Kaplan-Meier Analysis Using a Single DATA Step Hui Song,
George Laskaris
Many studies require contiguous events (e.g., events one or two days apart) being combined before sur- vival analysis. Since individual events overlap in many different ways, it is challenging to effectively (1) combine the contiguous events, (2) calculate their duration (and other time-to-event parameters), and (3) output the combined events only to a dataset. In this work, we present a clean, single-data-step approach that can address the three challenges efficiently. A sample scenario is used to illustrate the process data step, set statement, sample, retain, km analysis 8
37 Condensed and Sparse Indexes for Sorted SAS Datasets Mark Keintz The standard SAS index normally can speed up data retrieval of subsets, but can be suboptimal for datasets sorted on the index variable. For large sorted groups the normal index wastes disk space by creating a "pointer" to every record in the group. This paper demonstrates a condensed index with pointers only to the first and last record in each group. Dramatic reductions in elapsed time, input/output, and disk space are realized. The paper will also show a "sparse" index for sorted data in which groups are relatively small but the index range is large (e.g. every millisecond over a span of days). When retrieving a subset of cases between a pair of values of the sort variable, an index that points to only a few selected records can also save disk space and elapsed time. The paper will show the SAS programs used to create, and make use of these special indexes index, set statement, elapsed time, cpu time, data step, sorted data, dataset, where statement, macro variable 16
38 Correcting for Natural Time Lag Bias among Non-Participants in Pre-Post Intervention Evaluation Studies Gandhi Bhattarai Measuring the change in outcomes between post perio d and pre-period across intervention and control group (difference-of-difference) has been the standard approach in program impact evaluation studies. When t he intervention involves initially contacting large number of its qualified members there may be a natura l time lag between the qualified date and the final confirmation of engagement by the member. This will result in an unbalanced distribution of time and duration of follow-up period. This paper presents a SAS macro to systematically adjust for the index date in non-participants so that the follow-up time and duration is comparable sample, follow-up period 5
39 Create User-Defined Formats: Using SAS Code to Write Code Yonghong Shang The Base SAS product comes with many built-in pre-defined formats, powerful tools within the SAS System. However, users often want to change how information is stored in SAS data sets and how it is displayed. For- mats can be used to reshape the data itself by creating user written specialized formats. In this paper, a user- friendly method called 'SAS code to write code' will be used to create the hybrid user-defined formats. Two ex- amples are provided to explain how this method can efficiently create hybrid user-defined formats directly from a SAS dataset. The following key SAS terms will be shared in this paper- PROC FORMAT; the LIBNAME, FILE, PUT statements, the MOD option, and +(-1) notation in the PUT statement proc format, user-defined format, proc step, put statement, dataset, nominal variable, txt, proc sql 11
40 Creating a Data Dictionary for an Oracle Database Using SAS 9.3 Christopher Battiston data dictionary, oracle, proc step, key, proc sql, where statement 8
41 Creating an Interactive SAS Textbook in the iPad with iBooks Author William 'Gui' Zupko II Mobile media is becoming more popular and prevalent in today's workplace. Currently, very few applications ex- ist for the iPad that actively run SAS programs. That does not negate the value of the iPad as a teaching tool and reference database. Recently, Apple announced the release of iBooks 2, updating the current iBooks appli- cation with even more capabilities and possibilities than before. One of these capabilities is utilized with iBook Author. This application allows for the creation of interactive textbooks that allow users to learn SAS in a self- paced environment. These tools, called widgets, allow the use of screenshots to show how programs run, as well as the use of tests to check comprehension of lessons taught. These widgets also allow the use of Keynote presentations to be played directly in the iPad sas output, sas function 10
42 Creating and Displaying an Econometric Model Automatically William 'Gui' Zupko II,
Justin Smith
proc step, proc arima 26
43 Data Rolls Up-Hill: Reverse Waterfall Provider Analysis Using SAS John Busch Analyzing change in dollar amounts paid to a provider from one time period to another can be a complex task i n- volving multiple moving pieces. Dollars paid can be affected by multiple factors and lead to scenarios where the real reasons for change are hidden in the "mix". By breaking down that change into discreet reasons for change we can numerically and graphically represent change in such a way as to pinpoint exact reasons for the change. Using Base SAS 9.3 we can create measures to represent new and obsolete members and services between the two time periods for that provider. O nce that is determined and we are vie wing only same member, same service data we can look into changes in volume and pricing. These results can then be represented in a High -Low- Close stock chart for easy consumption and clearer insight into that provider's change proc step, proc sql 12
44 Data Validation and Transformation in ETL Processing with Help of Perl Regular Expressions in SAS Val Volovik ETL processing in SAS requires text data validation and transformation. SAS offers several tools to achieve this goal: string (text) functions, formats and one of the most powerful tools - Perl Regular Expressions (the name of expressions is probably used to calm down anxious SAS programmers). This paper provides a short introduction to Perl Regular Expressions in SAS and examples of their use in ETL validation and transformation processing as well as SAS Log tracing routines. In version 9, the SAS System introduced Perl regular expressions (sometimes known by the acronym PRX, the first three letters of these functions or call routines) data cleaning, numeric variable, sas log, error message 11
45 Decision-Making Using the Analytic Hierarchy Process (AHP) and SAS/IML Melvin T. Alexander SAS/IML can be used to implement the Analytic Hierarchy Process (AHP). AHP helps decision-makers choose the best solution from several options and selection criteria. Thomas Saaty developed AHP as a decision-making method in the 1970s. AHP has broad applications in operations research, quality engineering, and design-for-six-sigma (DFSS) situations. AHP builds a hierarchy (ranking) of decision items using comparisons between each pair of items expressed as a matrix. Paired comparisons produce weighting scores that measure how much importance items and criteria have with each other. This presentation will model AHP using personal, business, and medical decision-making examples. SAS/IML scripts will generate output that includes measures of criteria and selection importance and data consistency geomean, dataset, if-then-else, conjoint analysis 12
46 Destination Known: Programmatically Controlling Your Output in SAS Enterprise Guide Aaron Hill In a SAS Enterprise Guide project with multiple reports and graphics, you can organize output by selectively sending content to different ODS destinations embedded within the project. For example, within a single program you could embed tables in RTF format, graphics in PDF, and other output in Text. The SAS syntax is simple and gives you programmatic control over all output and destinations. The result: a well-organized project with all sas enterprise guide, output delivery system, sas output, proc step, proc print 9
47 Determining What SAS Version and Components Are Available David D. Chapman For many reasons a user may not know the version of SAS used or what components of SAS are installed on a particular computer. This paper discusses three different methods for determining what SAS is being used on a particular computer. The three methods discussed include PROC SETINIT, PROC PRODUCT_STATUS, and the SASINSTALLREPORT3.SAS macro. PROC SETINIT shows wh at is licensed; PROC PRODUCT_STATUS shows what is installed; and the SASINSTALLREPORT m acro creates a report describing the complete setup and environment of the machine. Also discussed is the use of SAS system macro variables to determine the ver- sion of SAS used proc step, macro variable, sas log, sas base, sas 9 7
48 Developing an Analytics Center of Excellence (Or The Care and Feeding of Magical Creatures) Chuck Kincaid Analytics is becoming a mission-critical venture for companies who want to be ahead of their competition. For those of us in the field it's been a long-time coming and we're excited to see the possibilities. But what does it take for companies to really succeed in analytics? We have a talent shortage of analytics professionals, a wealth of tools and technology, tons of buzz words, and organizations that know they want it, but don't know what "it" is. Based on our experience and expertise, this paper will give the reader insight into some of the challenges of building an Analytics Center of Excellence and guidance in ways to overcome them. The paper will be accessible and valuable to any attendee in any industry. It will be of particular interest to anyone with the desire to promote analytics within their organization business intelligence, data science 11
49 Dynamic Data Processing Using Data-Driven Formats and Informats Jedediah J. Teres PROC FORMAT is a powerful tool for reading and writing data. The PUTN, PUTC, INPUTN, and INPUTC functions use formats and informats at run time. They allow you to assign different formats and informats to values across different observations. Dynamic formats can be used instead of IF -THEN/ELSE blocks to process data. This paper describes how to use them in the context of processing school records input statement, proc step, proc sql, proc freq 9
50 Efficiently Screening Predictor Variables for Logistic Models Steven Raimi,
Bruce S. Lund
This paper discusses the situation where a modeler must fit a multinomial logistic model with nominal target and has available hundreds of potential predictor variables. Such situations may occur when third-party data sets are added to in-house transactional data for direct marketing applications. The paper discusses statistical measures for evaluating the predictive power of numeric predictor variables and whether the eventual use of the predictor in the model could be improved via a non-monotonic transformation. Much of our focus is on the case where the target is binary. Simulated probability distributions for these statistical measures are also discussed. Finally, we provide a methodology and a tool kit (using SAS macros) that identifies a subset of predictors for further study and eventual usage in fitting a model logistic distribution, proc step, predictor variable, proc rank, sample, logistic regression, regression analysis, proc logistic, numeric variable, proc freq, binary variable, macro call, response variable, degrees of freedom, likelihood function, class variable, macro definition, spearman correlation 13
51 Elongated Intersected Clusters and Radial Coordinates Transformation Using SAS Alexander Suprun The paper compares a traditional approach to elongated intersected clustering using SAS ACE- CLUS, CLUSTER, TREE procedures with a suggested approach that includes a preliminary transformation to radial coordinates. This transformation produces a much clearer picture of clus- ters and allows their easy separation. The approach is good for elongated clusters intersecting at the same point. It does not matter if this point is the origin or not. If more then two clusters intersect at more than one point then this approach can be used in stages for every intersecting point separately. Base SAS 9.2 has been used to implement this approach, but older versions can be used too. The only limitation is the availability of the clustering procedures mentioned. Operating system is Windows XP proc step, proc aceclus, proc cluster, proc tree 7
52 Exploring the PROC SQL _METHOD Option Kirk Paul Lafler The SQL Procedure contains powerful options for users to take advantage of. This presentation explores the fully supported _METHOD option as an applications development and tuning tool. Attendees learn how to use this powerful option to better understand and control how a query processes proc sql, proc step 3
53 Financial Impact Analysis of the New RUG-IV on Post-Acute Medicare Providers Using Monte Carlo Simulation John Gao,
Cheryl Caswell,
Barry Fogel
CMS has proposed new reimburseme nt rate of RUG -IV groupers based on the STRIVE project. We have conducted Monte Carlo simulation on the STRIVE project data to study the financial impact of new RUG -IV reimbursement rate on service providers, especially with different concurrent therapy and group therapy time rate, under the CMS final rule in FY 2011 and FY 2012. First, we have compared the difference between RUG-III and RUG -IV on ADL(Activities of Daily living), Nursing and Therapy Index (Case Mix index) and concurrent therapy time in STRIVE data. Then the simulation analysis is conducted under the assumption that the concurrent and group therapy time in a service provider has the same shape parameter of Gamma distribution function as that in the STRIVE project data. In the financial impact analysis from RUG-III to RUG-IV, the first step is to estimate the reimbursement change of each RUG -III group under RUG -IV from STRIVE project data monte carlo, gamma distribution, sample, clinical data 13
54 Fun with PROC SQL Darryl Putnam PROC SQL is a powerful yet still overlooked tool within our SAS arsenal. PROC SQL can create tables, sort and summarize data, and join/merge data from multiple tables and in-line views. The SELECT statement with the CASE- WHEN clause can conditionally process the data like the IF-THEN-ELSE statement in the DATA STEP. An advantage specific to PROC SQL is that with careful coding, the SQL code can be ported to 3rd party Relational Database Management Systems (RBMS) such as Oracle and SQL Server with virtually no changes. This paper will show some techniques to QA and reshape data the way you want to see it, with a focus on in-line views proc sql, proc step, dataset, group by, ansi sql, select, relational database 6
55 Generalized Additive Models in Marketing Mix Modeling Revisited Patralekha Bhattacharya Marketers have always struggled to accurately determine the lagged effects of marketing. Correctly estimating marketing contributions is another important challenge faced by marketing professionals. In an earlier paper, we showed that a generalized additive model (using PROC GAM) accurately estimates the lagged effects of advertis- ing efforts in simulated models with one independent variable. In this paper we take this research a step further, and perform simulations with additional independent variables to examine whether GAM is still able to accurately estimate lagged effects. We also look at the calculation of marketing contributions to determine the accuracy of those estimates. This will allow the end user to determine if the promising results obtained earlier will carry over in real world applications proc gam, predictor variable, proc step, lag function, marketing mix, response variable, regression analysis, monte carlo, binomial distribution, proc reg 9
56 Generating Estimates for U.S. Healthcare Costs and Use Paul Gorrell A central component of discussions of healthcare reform in the U.S. are estimations of healthcare costs at th e national level, as well as for individuals with cert ain demographic properties or medical conditions. A s triking, but persistent, observation is that 1% of the U.S. popu lation accounts for more than 20% of total healthcare costs, and 5% account for almost 50% of total costs. Many estimates of U.S. healthcare costs are based on the Medical Expenditure Panel Survey (MEPS), conducted each year by the Agency for Healthcare Research and Quality (AHRQ). Data from the survey, supplemented by admin istrative data, are released each year in SAS transpo rt format, with accompanying documentation for SAS programmers. This paper presents a practical overview of how to do wnload files, create analytic data files, and use SAS p roce- dures (including the survey analysis PROCs) to generat e estimates of healthcare costs for selected populatio ns and subpopulations dataset, proc step, proc surveymeans, proc freq, sample, proc calis, binary variable, proc surveyfreq, numeric variable, standard deviation, health insurance, sas programmer, sas programming 18
57 Graphics for Univariate Data: Pie is Delicious But Not Nutritious Peter L. Flom When you have univariate data, that is, a single measure on a variety of units, the most common statistical graphic is a pie chart. But pie charts should not be used. Ever. When there are a lot of units, pie charts are unreadable. When there are only a few units, pie charts waste space. And research Cleveland (1993, 1994) shows that, even with a moderate number of units, pie charts can distort the data (for example, using different colors leads to different estimates of the size of the wedges). Fortunately, there are better methods. Keywords: pie dot univariate graphics ods graphics, output delivery system 11
58 Harnessing the Power of SAS ISO 8601 Informats, Formats, and the CALL IS8601_CONVERT Routine Kim M. Wilson Clinical Data Interchange Standards Consortium (CDISC) is a data standards group that governs clinical research around the world. This data consists of many date, time, DATETIME, duration, and interval values that must be expressed in a consistent manner across many organizations. The International Organization for Standardization (ISO) approved the ISO 8601 standard for representing dates and times, and this standard is compliant with CDISC. This paper addresses how to create and manage ISO 8601 compliant date, time, and DATETIME values in a CDISC environment. The paper also discusses the computation of durations and intervals. Examples that use the SAS call routine CALL IS8601_CONVERT and other programming logic are also provided, along with helpful tips and suggestions. In addition, the paper presents solutions to some common date and time problems, such as handling missing date components datetime, time, date variable, sysdate9, sas log, clinical trial, datetime variable, cdisc 15
59 He Who Graphs SAS Graphs Best Lisa Aronson Friedman Graphs are often the most effective way to present statistics. Since SAS includes procedures that make it very easy to produce simple plots and charts, many statisticians believe that SAS/GRAPH is limited in its capability to produce more complex and attractive figures. However, using a combination of the many options of SAS/GRAPH procedures, the annotate facility, the DATA STEP and ODS, SAS can produce beautiful and professional-looking graphs. Working with SAS/GRAPH has the additional advantage of going directly from the DATA STEP to the graph code, making it effortless to recreate graphs when the data change. This is particularly helpful when producing multiple figures. This paper assumes basic knowledge of SAS/GRAPH procedures, as well as the basics of ANNOTATE and ODS. Examples of graphs made with PROC GCHART, PROC GPLOT, PROC G3D and PROC GREPLAY will be presented along with the SAS code proc step, proc greplay, regression analysis, proc gchart, data step, proc gplot 18
60 Here Comes Your File! File-Watcher Tool with Automated SAS Program Trigger Rajbir Chadha In a typical warehousing environment, users are notified about file availability by system generated e-mails. Users then run their SAS processes. There was a need for a file-watcher tool to trigger the user processes as soon as input files become available. This paper talks about a file-watcher tool that searches for files and looks to see when they were last updated. The tool uses UNIX shell scripting to search for the file. The parameters to the file-watcher tool are supplied using a 'wrapper' script that can be modified by the user as and when required. It can be programmed to look for the file within a specified time period. The script is scheduled using a 'CRON' scheduler in UNIX. The file-watcher searches for the updated file based on the specified parameters. Once the updated version is found, the SAS program execution begins. If the file is not found or not updated within the specified time period, the script terminates sysrc, dataset 8
61 How to Monitor Production and Development Processing Using the SAS Logging Facility Curtis E. Reid An innovative diagnostic feature was introduced in the release of SAS 9.2 called the SAS Logging Facility ("SLF"). The SLF provides a way to categorize and filter log messages from the server and the programs and to redirect them to a variety of output destinations. This paper shares how one can use the SLF during the ex ecution of production jobs, in the development and mainten ance of programs, and the associated benefits. The intended audience members for this paper are entry -level to inte rmediate SAS developers and system administrators who want to learn how to better support SAS applications file statement, autocall macro, sample, macro definition 15
62 Implementing and Interpreting Canonical Correspondence Analysis in SAS Laxman Hegde Canonical Correspondence Analysis (CCPA)1 is a popular method among ecologists to study species environmental correlations using Generalized Singular Value Decomposition (GSVD) of a proper matrix. CCPA is not so popular among researchers in other fields. Given two matrices Y( n by m) and Z( n by q), CCPA involves computing GSVD of another matrix A( m by q) which can be thought of as a weighted averages for the columns of Z using the frequencies (the row totals) in Y matrix. The SAS output for CCPA has several interesting parts (algebraically, numerically and graphically) that require interpretations to end users. In our presentation, we like to show how to perform CCPA in SAS/IML and interpret a few important results. The climax of this program is about constructing a Biplot of the A matrix. Keywords: Canonical Correspondence Analysis, Singular Value Decomposition, Biplot, Species Scores, Sample Scores, Species-Environmental Correlations proc corresp, correlation, sample, proc freq 10
63 Imputing Endpoints after Collapsing Longitudinal Data across Related Events James Joseph proc step, if-then-else 11
64 Integrating SAS and Excel: An Overview and Comparison of Three Methods for Using SAS to Create and Access Data in Excel Nathan Clausen,
Edmond Cheng
This paper looks at several ways integrating EXCEL with SAS. While SAS is powerful data manipulation and anal y- sis tool, there are times when it may be better to view and interact with data in EXCEL. SAS easily facilitates this interaction in several ways. Only a basic knowledge of SAS is assumed, with references to more in -depth SAS resources provided. First, we look at three methods for creating/consuming EXCEL data in SAS: PROC EXPORT, ODS with the E x- celXP tagset, and the EXCEL LIBNAME engine. For each method, we give a brief overview of usage and an outline of features that can be advantageous depending on the use case. Second, we outline a practical scenario for implementing each of the interaction methods, with some basic exa m- ples of the resulting solution. These include creating custom reports, distributing SAS data to non -SAS users, creating interactive EXCEL analysis tools, and incorporating EXCEL inputs and logic in SAS programs excel, proc step, proc export, libname engine, dataset, raw data, proc import, proc report, label statement, proc datasets, proc sgplot 14
65 Interesting Technical Mini-Bytes of Base SAS - From DATA Step to Macros Airaha Chelvakkanthan Manickam Over the last several decades, SAS has improved and added thousands of features to Base SAS. It is almost impossible for someone to know all of the tricks and tips of Base SAS. This paper highlights some useful tips and advanced tricks of Base SAS that I have encountered during my experience working with SAS. These technical mini-bytes are divided into two sections-DATA STEP mini- bytes and macro mini-bytes. In this paper, I present interesting examples involving common and advanced DATA STEP executions such as CALL SET, dynamically accessing SAS data sets, and PERL pattern matching. Similarly, simple to advanced macro tips including CALL EXECUTE and QUOTE functions in macros are discussed data step, call execute, set statement, macro variable, proc step, raw data, put statement, sas base, pharmaceutical industry, reference data, variable list, proc print, data validation rules, by group processing, macro call, macro definition, master data management, sample, proc sql 13
66 Introducing the FMM Procedure for Finite Mixture Models Maura E. Stokes Y ou've collected the data and performed a preliminary analysis with a linear regression. But the residuals have sev- eral modes, and transformations don't help. Y ou need a different approach, and that calls for the FMM procedure. PROC FMM fits finite mixture models, which enable you to describe your data with mixtures of different distributions so you can account for underlying heterogeneity and address overdispersion. PROC FMM offers a wide selection of continuous and discrete distributions, and it provides automated model selection to help you choose the number of components. Bayesian techniques are also available for many analyses. This paper provides an overview of the capabilities of the FMM procedure and illustrates them with applications drawn from a variety of fields poisson distribution, likelihood function, proc step, proc reg, estimate, regression analysis, poisson regression, response variable, sample, maximum likelihood estimation, bayesian statistics, binomial distribution, histogram, zero-inflated poisson, normal distribution, normality test, posterior probability, proc univariate, proc calis, proc genmod 22
67 Introduction to Statistics with Wavelets in SAS David J. Corliss In statistics, wavelets are used to describe transitory periodic behavior. Wave lets' property of cyclic al behavior with a definite start and end finds applications in many different areas of statistics, such as EKG and brainwaves in biometrics and the way a commodity market responds to good or bad news. Many physical systems can be described by wavelets, wi th important applications used in the detection of new oil fields, the analysis of hearing and the study of vibrational events on the surf ace of stars. Although source code for wavelet analysis has existed in R for some time, published SAS programs have re lied on the use of IML to execute R functionality within a SAS platform. This paper gives a brief introduction to wavelets, provides source code in base SAS for the time series analysis using the Morlet wavelet and reviews advanced wavelet capa bilities available in the SAS / IML package. Keywords: Wavelet, Morlet, IML, Time Series time series analysis, sas base, proc freq 11
68 K-Nearest Neighbor Classification and Regression in SAS Liang Xie K-Nearest Neighbor (KNN) classification and regression are two widely used analytic methods in predictive modeling and data mining fields. They provide a way to model highly nonlinear decision boundaries, and to fulfill many other analytical tasks such as missing value imputation, local smoothing, etc. In this paper, we discuss ways in SAS R⃝ to conduct KNN classification and KNN Regression. Specifically, PROC DISCRIM is used to build multi-class KNN classification and PROC KRIGE2D is used for KNN regression tasks. Technical details such as tuning parameter selection, etc are discussed. We also discuss tips and tricks in using these two procedures for KNN classification and regression. Examples are presented to demonstrate full process flow in applying KNN classification and regression in real world business projects proc step, regression analysis, proc discrim, proc krige2d, data cleaning, response variable, create table, training set, sample, proc princomp 16
69 Kick It Old School - Creating Reports with the DATA _NULL_ Step Sai Ma,
Suwen Li,
Minlan Li
The powerful PROC REPORT can handle most of the clinical trial data reporting tasks. But when the report needs to be customized to meet special requirements, PROC REPORT can sometimes be awkward. This is where the DATA _NULL_ step comes to the rescue. It is old school. However, it allows you to have complete control in customizing your reports. This paper illustrates when and how to generate study reports using DATA _NULL_ step by two examples proc report, proc step, system organ class, sample, adverse events 10
70 Leading and Lagging Indicators in SAS David J. Corliss Leading indicators are familiar to us from economics as factors whose changes are correlated with future events, while lagging indicators are correlated with previous activity. However, leading and lagging indicators appear in many areas on interest: changes in a person's diet, su ch as gaining or losing weight, correspond to risk group changes at a later da te. An increase in poverty over time corresponds to an increasing pris on population later on. Lagging indicators may be used to infer the past, unobserved history of a physical systems from automobile repairs to stellar explosions. This paper demonstrates code in Base SAS for identifying leading and lagging indicators and measuring the difference in time between two linked behaviors. A facility is included for addressing the presence of missing data by suppressing points in time where the data are insufficient to support accurate results correlation, time series analysis 8
71 Length of Intensive Care Unit Stay Computed from the VA Corporate Data Warehouse Adeline J. Wilcox Part of the American Recovery and Reinvestment Act (ARRA) of 2009, the Health Information Tech- nology for Economic and Clinical Health Act (HITECH), offers incentive funding for Meaningful Use (MU) of electronic health records (EHRs). Reporting of Clinical Quality Measures (CQMs) to the federal government is a MU of EHRs. To receive the maximum incentive payment, Medicare providers must register with the Centers for Medicare & Medicaid Services (CMS) this year. I describe the SAS R⃝code I wrote to program a small part of one CQM called Venous Thromboembolism Prophylaxis (VTE-1), a Patient Safety measure foreign key, proc sql, sql server, date variable, fact table, dimension table, data standard 14
72 Let SAS/SHARE Deliver Formatted Data to Microsoft Office Hsiwei Yu,
Tao Dong
When working in a company with multiple platforms, it is preferred to use Windows SAS, accessing SAS, DB2, Oracle, and SQL Server data, etc., from different p latforms as if they are all local data. This paper showcases a relatively new feature since 9.2 - making remote da ta and formats automatically available to the Windo ws SAS session. We will discuss ways to deliver formatted values; e.g., from a low-tech solution building a new table of formatted values, to a more advanced macro solution that dynamically delivers formatted values for any table. We will examine the merits and applicability of eac h solution. Showing formatted values for Microsoft Office products improves user acceptance of SAS values and their productivity excel, proc sql, create view, format statement, dataset, proc step, lookup, macro variable 10
73 Loading Metadata to the IRS Compliance Data Warehouse (CDW) Website: From Spreadsheet to Database Using SAS Macros and PROC SQL Robin Rappaport,
Jeffrey S. Butler
As the largest database in the Internal Revenue Service (IRS), the Compliance Data Warehouse (CDW) provides data, metadata, tools, and computing services to hundreds of research analysts whose work is aimed at improving tax administration. CDW manages an online repository of metadata to help users quickly search for and understand the meaning of data. With more than 31,000 unique columns and over 550,000 separate attributes, these metadata represent a key component of the overall user experience, and are part of a broader data quality initiative. In addition to standardized column definitions that are searchable through the CDW website, metadata also include lookup reference tables, data types, legacy source information, and other attributes. Most metadata are initially created or updated in EXCEL, after which they are imported into SAS data sets for additional processing proc sql, dataset, sql server, proc step, excel, macro definition, data cleaning, proc import, data profiling, libname statement, data validation rules, proc freq 7
74 Long-to-Wide: PROC TRANSPOSE vs Arrays vs PROC SUMMARY Michael S. Zdeb When data for the same entity (person, place, thing) are stored across multiple observations, it is a common task to place all the data for a given entity into a single observation. The task is sometimes referred to as converting a data set from long-to-wide and the complexity differs depending on whether one or more variables are involved. This paper compares three methods of long-to-wide conversion, two common (PROC TRANSPOSE and arrays) and one not commonly used (PROC SUMMARY). It also shows how PROC SQL can be used to find information needed for both the array and PROC SUMMARY methods. The good and bad points of each method are discussed in both one and many variable situations and the discussion is intended for an audience with a skill level ranging from beginner to intermediate. All the techniques require only base SAS. (Note some text in this paper and some examples also are used in a previous paper by the author on reshaping and merging data ... see proc step, proc transpose, proc means, data step, proc sql, macro variable, by group processing, output 14
75 Look Out: After SAS/STAT 9.3 Comes SAS/STAT 12.1! Maura E. Stokes Heralded by a new release-numbering scheme, SAS/STAT 12.1 comes loaded with new statistical capabilities. New development areas include model selection for quantile regression, quantile regression for censored data, and multi- variate adaptive regression splines. Epidemiologists will like the STDRATE procedure for computing direct and indirect standardized rates and risks for study populations. The FMM procedure becomes production and includes new features such as additional distributions. Other notable enhancements include modeling missing covariates with the MCMC pro- cedure and fitting Bayesian frailty models with PROC PHREG. This paper reviews highlights from earlier releases and describes highlights of SAS/STAT 12.1, slated for release during 2012 proc quantreg, regression analysis 27
76 Loop-Do-Loop Around Arrays Wendi L. Wright Have you ever noticed your DATA STEP repeats the same code over and over? And then thought … there must be a better way. Sure, you could use a macro, but macros can generate many lines of code. Arrays, on the other hand, can do the same job in only a few lines. Many SAS programmers avoid arrays thinking that they are difficult, but the truth is they are not only easy to use, but make your work easier. Arrays are SAS DATA STEP statements that allow iterative processing of variables and text. We will look at many examples, including 1) input and output of files using arrays, 2) doing the same calculation on multiple variables, and 3) creating multiple records with one observation. This tutorial will present the basics of using array statements and demonstrate several examples of usage do loop, array, temporary array, data step, array bounds, character variable, if-then-else, conditional do loop, numeric variable, proc means, sas function, missing value, numeric functions 17
77 Managing SAS Dates with Irregular Granularity Howard L. Schreier The SAS date convention and the associated functions, formats, etc. constitute a rich toolkit for working with calendar information. The tools work best when the granularity is complete, down to the day, or when imputation of absent detail is possible. Other situations create difficulty. This paper demonstrates techniques for standardizing the representation of incomplete dates and suggests a convention for recording the original granularity in the otherwise unused fractional portion of a SAS date. Coders' CornerNESUG 2012 sysdate9, missing value, date variable, mdy, proc step 10
78 Mimicking the DATA Step Dash and Double Dash in PROC SQL Arlene Amodeo The SQL procedure is a powerful and versatile procedure in SAS that allows the programmer to utilize SQL syntax to perform data set merges (joins), update data sets (tables), and update observations (records). Its main use is to duplicate the functionality of the MERGE…BY statements in the DATA STEP, but most of its worth comes from its expansion upon these functionalities and its shorter processing time. It allows the user to utilize a wide range of summary functions without having to code PROCs and to merge on variables without the restrictions inherent in the BY statement. However, there are two shortcuts in the DATA STEP that are not available in PROC SQL: the dash (-) for selecting a range of suffixed variables, and the double dash (--) for selecting a range of variables from a data set. This paper shows how to integrate PROC SQL, dictionary members, and character functions to mimic the functionality of the dash and double dash proc sql, macro variable, proc step, variable list, character variable, character functions, where statement, pdv, by group processing, substr function, dataset, macro definition 24
79 Modeling Loss Given Default by Finite Mixture Model Chao Huang,
Liang Xie
The loss given default or claim data, which tends to be skewed , heavy-tailed, multimodal, or kurtosis -likely, from the insurance and banking industry is routinely fitted by a single distribution such as beta, lognormal, gamma, Pareto, etc., while the effects by the underlying sub -distributions within the overall distribution are generally ignored. Finite mixture mode l (FMM) is a widely used probabilistic model to make statistical inferences on parameters from an unknown distribution in terms of mixtures of known distributions . The new FMM procedure shipped with SAS 9.3 makes the building and diagnose of the finite mixture model much easier. In this paper, we illustrate how to create valid finite mixture models for Loss Given Default (LGD) by an example of a credit portfolio with 317 obligors density plot, lgd 5
80 Multitasking with Nested Formats Jonathan Kerman proc freq, format statement 5
81 Not Dividing by Zero: Last of the Low-Hanging Efficiency Fruit Bruce F. Gilsen As SAS Institute has improved the efficiency of its code, some of the old ways for users to improve efficiency, such as using WHERE or WHERE= instead of IF in the DATA STEP, no longer make much difference. Current user efforts to improve efficiency tend to focus on more sophisticated techniques such as indexes or hashing. However, one of the classic methods, not dividing by zero in the DATA STEP, can still offer a large efficiency improvement. This paper shows some sample code that divides by zero and some benchmark results from changing the code to test for zero denominators to avoid dividing by zero. Efficiency in "the old days" and now Longtime SAS users can recall that there were some fairly easy ways to improve SAS code efficiency. Perhaps most common was to use a WHERE statement or WHERE= clause instead of a subsetting IF statement, which was extolled frequently in conference papers, including Gilsen (1999) missing value, if-then-else, subsetting if 4
82 ODS DOCUMENT Step by Step Wendi L. Wright ODS DOCUMENT is a great destination that few people realize can make their life a lot easier. This destination can be used to re-print outputs from programs that you've already run without having to re-run the program. With this destination, you can re-print them in different orders, using different styles and templates, and even remove parts of what was in the earlier report. This customization allows you to create different reports for different people (or departments), all without having to re-run the program multiple times. This paper will cover the basics of the ODS DOCUMENT destination and some of the features that make it such a useful tool proc step, where statement 10
83 Off the Beaten Path: Create Unusual Graphs with ODS Graphics Prashant Hebbar You open the latest edition of Time magazine and see a unique spiral bar chart of revenue shortfall by state, or your coworker sends you a link to an interesting population pyramid graph on a Web site and you ask yourself: "Can I do that using SAS"? Often, as it is for these two graphs, the answer is "Yes." With a little bit of data transformation and some creativity, you can generate spiral plots, conditional regression trees, and population pyramids using ODS Graphics, without a shred of annotate code. This presentation covers many tricks and tips to create unique graphs that grab the reader's attention, and also deliver the information effectively. Learn how to stretch the boundaries of what is possible with ODS Graphics series plot, scatter plot, bar chart, box plot, regression analysis, time series analysis, bubble plot 26
84 Patient Profiles "On the Cheap": Quickly Capitalizing on PROC SQL and PROC REPORT to Efficiently and Cost Effectively Create Patient Profiles for Sponsor Source Data Verification, Audit, and Other Types of Clinical Data Verifications and Reviews Mark Rothe As part of its compliance efforts, the FDA's Office of Scientific Investigations (OSI) may request patient profiles to be produced for patients from select investigator sites whose data is part of an NDA (New Drug Application). The- se patient profiles are then used to verify data integrity against source documents during on-site inspections. If patient profiles are not already producible from the sponsor's clinical database (especially likely if database man- agement is outsourced and costs/resources are prohibitive or if the database were inherited without such capabil- ity), this paper illustrates some key BASE SAS Version 8+ functionalities-available in PROC SQL and PROC REPORT on any operating system-that allow patient profiles to be quickly created to meet OSI's needs. This same profile-generating methodology can be applied whenever clinical verification or review of patient data cannot be readily facilitated by other means proc step, proc sql, proc report 9
85 Penetrating the Matrix Justin Smith,
William 'Gui' Zupko II
While working on a time series modeling problem, we needed to find the row and column that corresponded to the minimum of a dataset. Processing the dataset via SAS1 DATA STEP methods proved somewhat inefficient for the task because SAS is designed to run along observations, but not through variables without considerable manipulation of the dataset. By reading the dataset into PROC IML and treating it as a matrix, we were able to pinpoint the specific location with ease. PROC IML was able to penetrate the matrix and create macro variables that told us where in the matrix our minimum value was located. These macro variables were then used to identify the tentative autoregressive and moving average orders for time series modeling using PROC ARIMA proc step, proc iml 11
86 Pharma Sales Reporting Using SAS Enterprise Guide 4.3 - A Step-by-Step Practical Approach Airaha Chelvakkanthan Manickam,
Ramya Purushothaman
SAS Enterprise Guide can be looked at as the Integrated Development Environment (IDE) for SAS which can be used by business users even with minimal SAS programming experience to derive meaningful reports. This paper explains a step-by-step representation of a real-time scenario in the Pharmaceutical industry addressed through SAS Enterprise Guide. The example illustrated here covers importing the raw sales data purchased from an external vendor, perform business transformations, summarization and creating visual representation like charts, reports for Executive dashboard presentation, scheduling and e-mailing the reports to the end users without manual intervention. All these needs are easily accomplished using a series of simple clicks in SAS Enterprise Guide sas enterprise guide, proc freq, distribution channel, proc means, inner join 18
87 Practical Application of SAS Capabilities for Pharma Goaling and Performance Review Ramya Purushothaman This paper discusses a Pharma application that uses SAS to leverage internal and purchased information such as Sales and Marketing data including drug prescriptions, dollar and unit demand, target prescribers, and key customer account profiles to set goals, measure sales performance and identify trends across the geography. The capability of SAS to handle huge volumes of data seamlessly provides an advantage over other technologies. The reusability of SAS macros makes SAS solutions extensible across various brands, sales teams, and geo levels for reporting. All of these tasks are performed through familiar Base SAS procedures, functions, statements, and options. The paper explains how the business need is addressed using SAS by accessing, cleansing, and transforming information proc step, data validation rules, sample, macro definition, data cleaning, proc sort 15
88 PROC CPM and PROC GANTT: The Next Step in Multi-Project Management Stephen B. Sloan,
Lindsey Puryear
Challenge Instead of managing a single project, we had to craft a solution that would manage hundreds of projects sharing a set of resource pools. Solution Develop a Project Optimizer tool using the SAS/OR CPM procedure and display the results using the SAS/OR GANTT procedure. The Project Optimizer tool takes information about the following: Resource availability by resource profiles including information on type of resource and time period Resource requirements by type of resource and time period Start date of the projects Due date of the projects, with the caveat that constrained resources could influence the due dates The Project Optimizer will then produce a schedule that can be displayed as a report or Gantt chart proc step, excel 9
89 PROC SQL for DATA Step Die-Hards Christianna S. Williams PROC SQL can be a bit daunting for the 'old dogs' who have learned SAS data management techniques using exclusively the DATA STEP. However, when it comes to dat a manipulation, SAS often provides more than one method to achieve the same result, and SQL provides another valuable tool to have in one's repertoire. Further, Structured Query Language is implemented in many widely used relational database systems with which SAS may interface, so it is a worthwhile skill to have from that perspective as well. This paper will present a series of increasingly complex examples and hands -on exercises. In each case I will demonstrate the DATA STEP method with which users ar e probably already familiar, followed by SQL code that will accomplish the same data manipulation proc sql, proc step, create table, group by, order by, inner join, subsetting if, where statement, filtering, set statement, standard deviation, proc means, by group processing, data governance, outlier 20
90 Process Simplification - The Simple Way! X Minal Vyas "If you can't describe what you are doing as a process, you don't know what you're doing." W. Edwards Deming The statement above is subjective, but what is true is that each one of us needs to know what is expected from us. So how do we ensure that we are all doing what we are supposed to…and in the most efficient manner? - A SIMPLE clinical programming, clinical trial 12
91 Profiling Consumer Price Index Formulas Joshua Klick The Bureau of Labor Statistics (BLS) Consumer Price Index measures changes to consumer prices for a ma rket basket of goods and services between two periods of time. The index structure defines the representat ive popu- lation, items, and geography. Once prices and weights are collected for an index structure one can construct a variety of index formulas to measure price change. The purpose of this paper is to use JMP Prediction Profiler to interactively evaluate the impact of changes to component series price index relatives on an aggreg ate price index. This paper first reviews JMP Profiler and compares its functionality to the JMP Add-In for E xcel Profiler. The next section evaluates JMP Profiler functional ity, data setup required for the price index formul as, and a few useful JMP Profiler options excel, predictor variable, response variable 6
92 Programming to Stay Afloat in Data Waves Gayle K. Springer,
Lorie Benning
The same data tables are updated every six m onths in the W IHS study. T hese data files contain all th e historic data as well as any new data and variables added at the last study vis it. Creating SAS programs that work with each new dat a up dat e m ay be chal lengi ng. Through consi stent dat a m anage ment pract ices, our division h as dev eloped sev eral m ethods for SAS progr am ming wi th da ta wav es. The m ost app ropr iate st yle for readi ng t he dat a files i s dep enden t on the p rogr am 's pur pose. Two m ethods for wor king wi th da ta wav es wi ll be present ed h ere. One m ethod utilizes a macr o to read in the d ata. The other m ethod reads in data with a FILENAME statement. Both styles utilize a SAS m acro variable created with a %LET statement, existing SAS input statement files and documentation of data versions in the SAS LOG. T his paper assum es f am iliarity with the SAS D AT A st ep a nd a basi c knowl edge of SAS m acr o variables input statement, filename statement, dataset, macro variable, macro definition, sas log 5
93 Prove QC Quality - Create SAS Datasets from RTF Files Honghua Chen Since collecting drug trial data is expensive and affects human life, the FDA and most pharmaceutical company SOPs require all datasets and TLFs to be checked by independent secondary QC programmers. Sometimes, comparing hundreds or even thousands pages of tables and listings is tedious and consumes a huge amount of QC programmer's time. This paper outlines a process flow to replace a primary SAS program with ODS RTF statements, create a temporary SAS program, execute the program to create a temporary RTF file [3], extract data from that RTF file to create primary final SAS dataset, and do the PROC COMPARE with QC final SAS dataset. The listing produced from PROC COMPARE can be saved for auditing purposes. The process can improve QC performance, reduce validation processing and paperwork, and finally prove QC quality. The full program, sample input RTF file and output dataset are available as appendices dataset, proc step, proc report, proc compare, output delivery system, ods rtf 10
94 Publishing SAS Metadata Using Macros, PROC SQL and Dictionary Tables John Fahey,
Barry Campbell
Users of your SAS data may not have the skills or access to obtain the metadata ab out it they require. This paper provides a method to extract and publish a catalogue containing variable names and types, descriptions, availabi l- ity, and proportion missing. The macro is most useful when dealing with wide data; the motivating example has more than 10,000 variables. It iterates through a provided list, and uses PROC SQL to pull the relevant details from built-in dictionary tables. A summary dataset is produced and used as the basis for delivery to the end user via EXCEL, web applications, or portable documents. One unique feature of this macro is that, for datasets with an observation date, it determines the start and end of availability for each variable proc sql, proc step, dictionary tables, date variable, macro variable, macro definition, macro loop, do loop, select, %if-%then-%else 9
95 Quality Assurance: Best Practices in Clinical SAS Programming Parag Shiralkar SAS programmers working on clinical reporting projects are often under constant pressure of meeting tight timelines, producing best quality SAS code and of meeting needs of customers. As per regulatory guidelines, a typical clinical report or dataset generation using SAS software is considered as software development. Moreover, since statistical reporting and clinical programming is a part of clinical trial processes, such processes are required to follow strict quality assurance guidelines. While SAS programmers completely focus on getting best quality deliverable out in a timely manner, quality assurance needs often get lesser priorities or may get unclearly understood by clinical SAS programming staff. Most of the quality assurance practices are often focused on 'process adherence'. Statistical programmers using SAS software and working on clinical reporting tasks need to maintain adequate documentation for the processes they follow clinical trial, quality assurance, data governance, quality control, pharmaceutical industry, data cleaning, clinical programming, data science 8
96 Quick Results with Output Delivery System (ODS) Kirk Paul Lafler ODS introduces exciting new features for your output. Using built-in format engines, ODS provides SAS users with a powerhouse of exciting capabilities to produce "quality" and publishable output. This hands-on workshop shows users how to select the output of interest using selection (and exclusion) lists; and how ODS is used to send selected data and output to output destinations including RTF, MS EXCEL spreadsheets, PDF, HTML, and SAS data sets proc univariate, sas output, output delivery system, ods pdf, ods html, ods rtf, dataset, file statement, proc step 14
97 Quick Results with PROC SQL Kirk Paul Lafler Structured Query Language (SQL) is a universal language that allows you to access data stored in relational databases or tables. This hands-on workshop presents core concepts and features on using PROC SQL to access data stored in relational database tables. Attendees learn how to define, access, and manipulate data from one or more tables using PROC SQL quickly and easily. Numerous examples are presented on how to construct simple queries, subset data, produce simple and effective output, summarize data with summary functions, and join two tables proc sql, proc step, dictionary tables, where statement, select, inner join, macro variable, sas library, sas log, macro facility, view, create table, group by, macro call, order by, relational database, right join 17
98 Rediscovering the DATA _NULL_ for Creating a Report, and Putting That Text File into RTF in a Single DATA Step David W. Franklin Before PROC REPORT existed, most text output files were created by PROC PRINT and PROC TABULATE, or where a report was needed that needed a bit more sophistication, DATA _NULL_ was used. This paper rediscovers the DATA _NULL_ as it is used for creating a text output file and presents a few macros, tricks and techniques that will make your report shine, including a macro for wrapping text so it can go onto multiple lines, doing "Page x of y" processing, centering or right aligning text, page breaking where you want it, and carrying over group values from one page to another. Finally, the output that is produced from a full example will be transformed into an RTF file by a macro in a single datastep put statement, proc step 14
99 Remove Voided Claims for Insurance Data Qiling Shi The purpose of this study is to remove voided claims for insurance claim data using SAS. Suppose that for these voided claims, we don't have a flag to identify them at first. All we know is that they have the same absolute values with positive and negative amounts for the same insurance ID. A SAS macro with procedures such as PROC SQL and DATA STEPS is employed to do the data analysis insurance claims, proc sql 6
100 Rolling Regressions with PROC FCMP and PROC REG Mark Keintz Although the technique of applying regressions to rolling time windows is commonly used in financial research for a variety of uses, SAS offers no routines for directly performing this analysis. The recent introduction of PROC FCMP, along with the long-standing capability of PROC REG to accept sum-of-squares and cross-products matri- ces, provides an easily-programmed way to have the flexibility of PROC REG (or other PROC's) for rolling win- dows. This presentation shows how to use the two PROCs, without the usual performance-sapping burden of generating large intermediate data sets of rolling window data proc step, proc reg, rolling window, regression analysis, proc fcmp, data step, time series analysis 13
101 Rounding Up the Stragglers: Dynamically Detecting and Processing All Existing Data Sets Adam Miller As your project grows, it's not uncommon to have an ever-increasing number of SAS data sets you need to process in the exact same manner. Instead of rewriting your processing code every time a new data set is added, why not utilize Base SAS functionality to dynamically detect and loop through each data set out there? With the help of PROC DATASETS, PROC SQL, and some good, old-fashioned macros, you can write your code once and forget about it, letting SAS handle the roll call for you macro variable, proc sql, proc step, dictionary tables 5
102 Running SAS on the Grid Margaret A. Crevar Have you ever wondered if you are really prepared to start the installation process of SAS software on your hardware? Perhaps you have read the System Requirements sheets for your SAS release and version, and the appropriate SAS platform administration guide for your operating system. Are there other crucial items to consider before the installation process that are targeted toward your company's expected performance of SAS? dataset, data science 10
103 SAS and R Working Together Matthew Cohen This paper will explore the ways SAS and R can work together. It will cover data transfers using SAS Transport and ASCII files and how to call R directly from within SAS. Rather than focusing on the pros and cons of each language, I will assume that some people want to use both txt, missing value, sas log, date variable, sas programmer, dataset 9
104 SAS Enterprise Guide: Finally, a Programmer's Tool Marje Fecht,
Rupinder Dhillon
Have you been programming in SAS for a while and just aren ¶t sure how SAS Enterprise Guide can help you? This presentation demonstrates how SAS programmers can use SAS Enterprise Guide 4.3 as their primary interface to SAS, while maintaining the flexibility of writing their own customized code. We explore: navigating the views and menus using SAS Enterprise Guide to access existing programs and enhance processing exploiting the enhanced development environment including syntax completion and built-in function help using Code Analyzer, Report Builder, and Document Builder adding Project Parameters and dynamic parameters to generalize the usab ility of programs and processes leveraging built-in capab ilities available in SAS Enterprise Guide to further enhance the information you deliver. Audience: SAS users who understand the basics of SAS programming and want to learn how to use SAS Enterprise Guide sas enterprise guide, sas programmer, bar chart, excel, proc step, dataset, sas log, macro variable, work library, temporary dataset 24
105 SAS for Six Sigma - An Introduction Daniel R. Bretheim Six Sigma is a business management strategy that seeks to improve the quality of process outputs by identifying and removing the causes of defects (errors) and minimizing variability in manufacturing and business processes. Each Six Sigma project carried out within an organization follows a defined sequence of steps and has quantified financial targets. All Six Sigma project methodologies include an extensive analysis phase where SAS software can be applied. SAS JMP software is widely used for Six Sigma projects. However, this paper will demonstrate how base SAS (and a bit of SAS/GRAPH and SAS/STAT) can be used to address a wide variety of Six Sigma analysis tasks. The reader is assumed to have a basic knowledge of Six Sigma methodology, therefore the focus of the paper is the use of SAS code to produce outputs for analysis null hypothesis, standard deviation, anova, sample, correlation, box plot, proc freq, histogram 32
106 SAS UNIX-Space Analyzer - A Handy Tool for UNIX SAS Administrators Airaha Chelvakkanthan Manickam In the fast growing area of information and technology, SAS users tend to occupy a lot of space with their SAS data sets. As time goes on, these SAS data sets tend to grow and slowly occupy the entire space on the file system. It is a challenge for the SAS admin to bring control over the file system as there are numerous SAS users and everyone utilizes the file system for their day-to-day use. Hence a solution is necessary to manage the UNIX file system from the perspective of top space utilizing users, high volume SAS files, how long SAS files are kept and owners of oldest SAS files and newest SAS files, etc. The proposed solution uses SAS to issue UNIX commands to capture the attributes of every file on the file system and SAS to build a mini-data warehouse around the usage of the file system. Using the data warehouse, the SAS admin can issue simple queries to understand the utilization of the file system at any point in time data mart, excel, sas enterprise guide, proc means, proc step, where statement, flat file, sample, proc sort 12
107 Scatter Plot Smoothing Using PROC LOESS and Restricted Cubic Splines Jonas V. Bilenas SAS has a number of procedures for smoothing scatt er plots. In this tutorial we will review the nonp arametric technique called LOESS which estimates local regres sion surfaces. We will review the LOESS procedure and then compare it to a parametric regression methodol ogy that employs restricted cubic splines to fit no nlinear patterns in the data. Not only do these 2 methods f it scatterplot data but they can also be used to fi t multivariate relationships regression analysis, proc loess, restricted cubic spline, predictor variable, proc step, proc sgplot, response variable, loess, scatter plot, proc reg 12
108 Seek and Ye Shall FINDC: A Powerful Function for Qualitative Data Validation Xiaoke Yang,
Peter C. Landi
Often, one must validate qualitative data prior to analysis. For example, consider a dataset with a variable "Person's Name," and wishing to ensure it contains only letters and not numbers. SAS has a variety of functions to create a customized "validation" test. The INDEX function and VERIFY function can search a string for specific characters, however, for our example, both functions would require the programmer to delineate the entire alphabet as "acceptable" characters. In this paper, we review the pros and cons of the INDEX and VERIFY functions, then highlight the powerful function FINDC for more expedient qualitative data validation verify, index, sas log, data cleaning 7
109 Simple Statistical Programming: Preventing Errors When Creating Output Datasets Containing Statistical Test Results for McNemar's Test Stephen Bosch SAS programmers come from a variety of backgrounds in terms of both work experience and education. Some SAS Programmers may have to produce statistical output in spite of having an educational background that does not include advanced statistics. McNemar's Test, performed via the FREQ procedure, is an example of a statistical procedure that may require some basic statistical knowledge in order to produce viable results. This can be accomplished with slight manipulation of the source data set that is used to produce the test, along with the use of the WEIGHT/ZEROS statement in the PROC FREQ code. The purpose of this paper is to educate SAS programmers, especially those who may not have strong backgrounds in Statistics, on the accurate, error-free and warning-free production of an output data set that contains results for the McNemar's test null hypothesis, proc freq, proc step 10
110 Some _FILE_ Magic Michael S. Zdeb The use of the SAS automatic variable _INFILE_ has been the subject of several published papers. However, discussion of possible uses of the automatic variable _FILE_ has been limited to postings on the SAS-L listserv and on the SAS Support Communities web site. This paper shows several uses of the variable _FILE_, including creating a new variable in a data set by concatenating the formatted values of other variables and recoding variable values put statement, input statement, numeric variable, missing value, data step, length statement, pdv, character functions, proc step, character variable, proc format, automatic variable, trailing @ 7
111 Sorting a Large Data Set When Space is Limited Selvaratnam Sridharma Sometimes, there may be insufficient disk space to sort a large data set. One approach that might work to solve this problem is to use TAGSORT with PROC SORT. It will reduce the space needed to sort. If this approach does not work, one can divide the large data set into smaller data sets, and then sort each of the smaller datasets. Finally, these sorted smaller data sets can be combined to create the sorted large data set. A macro developed here, can do the above process automatically character variable, numeric variable 4
112 Standardized Production Processes for One Routine Government Publication - Using SAS 9.2 to Produce Mortality Tables for the National Center for Health Statistics' Annual Report, "Health, United States" Mary Ann Bush,
Sheila Franco,
Li-Hui Chen,
Shilpa Bengeri
Health, United States is an annual government publication presenting trend data on the health of the nation. Groups of tables with similar design are included and updated annually with new data. We redesigned our programming approach to streamline and standardize this process, starting with tables presenting mortality rates. First, SAS code was written to create a summarized input data file. Next, all recoding was standardized, including cause-of-death and demographic variable definitions. Then, population data were incorporated to calculate both age-specific and age-adjusted rates. Finally, the mortality estimates were output to tables. The approach used may be helpful to others interested in streamlining data updates proc step, dataset, proc format, if-then-else, macro variable, macro definition, raw data, excel, proc sql 10
113 Step by Step Approach to Port CDISC SAS Data Integration Repositories on Cross Platforms Using %OMAPORT Macro Salman Ali Data Integration ( DI) Studio provides an interface to the SAS Metadata Server for designi ng and running metadata driven processes. This paper summarizes my experience in migration of a custom CDISC compliant SDTM DI Studio application from one platform to another. The examples and techniques discussed throughout this paper are based on a sourc e environment of DI Studio 3.4 on Window s XP and a target environment of DI Studio 3.4 on HP -UX 11i. Specifically, the paper will describe the use of %OMAPORT macro and tasks to be completed on the target host (HP-UX). The target audience is members of you r migration team, who know SAS and are familiar with your overall SAS Business Intelligence environment. Also, the migration team must work closely with the system administrator of the Windows and HP-UX 11i environments sas data integration studio, proc step, cdisc 6
114 Store and Manage Routinely Extracted Observations: A Practical Application Si Gao,
Xin Li
This paper proposes a method to manage frequently (monthly, quarterly, etc.) extracted observations (episodes) from external data set using SAS Macro. I illustrate this through an example from health data and it can be extended to a broader range of data sets, like customers, sales and finance data. Instead of typically creating and storing data files ( and possibly the corresponding SAS codes) for every extraction period, only one master file is created and we update it whenever the database is updated with new period's data. With indicators for upload time, historical data set for each period can be easily queried from the master file. It improves the efficiency of storing and managing routinely updated data sets and also facilitates comparison and analysis across periods. We highly recommend this practice in research and in the workplace as it gives us a neat and replicable way to carry out the routine data management work macro definition, macro variable 6
115 Summing Data with the SUM Function in SAS Anjan Matlapudi,
Daniel Knapp
SUM is one of the most frequently used SAS functions for aggregating numeric variables. Although summarizing data using the SUM function is a simple concept, it can become more complex when we deal with large data sets and many variables. This can sometimes lead to inaccurate results. Therefore it requires careful logic to choose the most appropriate function or procedure in each situation in order to output accurate results when we roll up or group data. There are several ways to summarize data using the SUM function. This paper illustrates various methods ranging from using the SUM function in the simple DATA STEP to using the SUM function in SAS procedures such as PROC PRINT, PROC SUMMARY, PROC MEANS, PROC TABULATE and PROC SQL. This paper also covers how SAS handles missing values when you sum data proc step, sum, proc means, sample, proc print, proc sql, numeric variable 11
116 Target Trained Transformations for Predictive Modeling Talbot M. Katz The relationship between a predictor variable and an outcome may be nonlinear and non-monotonic, and the interactions between predictor variables may be more complex than the product of those predictors. We introduce three varieties of transformations of continuous / interval- valued predictor variables that use the relationships between predictors and outcomes to enhance the predictive powers of those variables. These are developed and illustrated for binary outcomes, but can be adapted to continuous / interval-valued outcomes. The three methods are: 1. a binning algorithm that can optimize the number of bins and their sizes; this is especially useful for capturing interactions between pairs of variables; one-dimension requires only base SAS, full implementation requires SAS/OR. 2. a multi-dimensional density smoother that associates a value to each point based on its most predictive neighborhood; implementation requires SAS/STAT. 3 response variable, sample, predictor variable, proc princomp, sas base, integer programming 9
117 The Disk Detective Darryl Putnam Ever needed to know detailed information about a file on your disk subsystem, such as: who owns the file, when was it modified, how much space does it take? Ever wonder how much free space is on my server before I run this huge SQL query? Luckily with SAS we can directly access the functions within the Windows API to accom- plish these and many more tasks by using the SASCBTBL attribute table and the MODULE family of call routines and functions. This paper will demonstrate how to setup the SASCBTBL attribute table to be able to call all the Windows func- tions needed to get a complete picture of a disk drive bufsize, txt, sas enterprise guide 19
118 The SAS System Generates Code for You While Using File IMPORT and EXPORT Procedures Anjan Matlapudi It is a very common programming task to input data from flat files and export data into flat files. Most of these files are delimited text (tab, pipe, comma, etc.) or CSV files come from various sources such as third party vendor software. Earlier we demonstrated techniques to read complex flat files extracted from DB2 data source. Many of us use different approaches to read and write data files such as text, ASCII, sequential or flat files. Some of us might not be aware of how the SAS system generates code. This paper illustrates an easy way to obtain the actual SAS code while importing or exporting data from an external source using either the IMPORT/EXPORT wizard or IMPORT/EXPORT procedures flat file, proc export, macro variable, delimited file 6
119 Tips for Using SAS to Manipulate Large-scale Data in Databases Shih-Ching Wu,
Shane McLaughlin
SAS programmers sometimes run into difficulty when transitioning from working with small databases to working with large data sets. There are two common issues that arise. One is that the data set is too large to move around during processing. In this case, the SAS log might show error messages such as "out-of-memory" or "fetch error." A second issue arises when the SAS program will run, but it takes a very long time to finish, such as days, weeks, or longer. This situation is problematic because it exposes the project to risks from network connec- tion failures, database service interruptions or power outages, and if in the end, results are in error, the user must start an already long process over. The first part of this paper provides a SAS Macro solution to break down a large problem into smaller pieces. This can solve issues created by code that attempts to handle too much data. The second part of the paper provides helpful tips to monitor, manage, and time lengthy SAS programs sas log, macro definition, sample, macro variable, proc sql, error message, proc step 10
120 Top Ten SAS Performance Tuning Techniques Kirk Paul Lafler The Base-SAS software provides users with many choices for accessing, manipulating, analyzing, processing and producing quality data and results. Partly due to the power offered by the SAS software and the size of data sources, many application developers and end-users are in need of guidelines for more efficient use. This presentation highlights my personal top ten list of performance tuning and coding techniques for SAS users to apply in their applications. Attendees learn DATA and PROC STEP language statements and options that will help conserve CPU, I/O, data storage, and memory resources while accomplishing tasks involving processing, sorting, grouping, joining (merging), and summarizing data dataset, cpu time, proc sql, where statement, pdv, options statement, proc step, if-then-else 7
121 Use the Full Power of SAS in Your Function-Style Macros Michael D. Rhoads Function-style macros are macros that can be used within a SAS statement. Although such macros are extremely flexible, they can only use macro language code. So what do you do if you need a macro that can be embedded within a SAS statement, but the underlying task requires the execution of one or more DATA or PROC steps? You can now leverage the capabilities of user-written SAS functions to circumvent this limitation, meaning that your macros can now have the flexibility of a function-style interface while still being able to execute one or more SAS steps in the background. This paper describes the necessary techniques for developing such macros and provides examples of situations where they can be most beneficial proc step, proc sql, variable list, macro variable, dataset, macro function, macro facility, proc fcmp, sas function, macro definition, proc transpose, select, character variable, order by, sas programmer, dictionary tables, macro call, macro quoting function 10
122 Using Axes Options to Stretch the Limits of SAS/GRAPH Template Language Perry Watts While Graph Template Language (GTL) in ODS statistical graphics has made it possible to produce a wide variety of high quality graphs with relative ease, problems remain that defy a simple solution. Two that are discussed in this paper are resolved by applying axes options available in GTL. Ironically, the first problem addressed is an axis problem involving the placement of minor ticks along a continuous axis. Minor ticks have always been available in SAS/GRAPH to facilitate value tracking and to signal the precision of the underlying data that are being graphed. Unfortunately, though, they are not available in GTL. This paper shows how they can be implemented in 9.3 SAS with the application of several embedded user-defined macros. The second problem addressed is the inability to generate true n-bin endpoint or midpoint histograms in GTL histogram, bar chart, proc freq, graph template language, scatter plot, proc gchart, interest rate, macro call, raw data, series plot, proc sgplot, lookup, proc step 20
123 Using FORMATs Where SQL Won't Do James Zeitler I've found PROC SQL to be a very valuable tool in many situations, especially where "fuzzy" matches and many-to-many merges are appropriate. However, I've often also found it to be really slow when dealing with large datasets. Consequently, I frequently find myself looking for ways to work around SQL, despite its apparent advantages. The Problem A colleague came to me recently with a problematic SAS program. She had a transactions file with an identifier, a date, and some additional variables describing the transaction. She also had a "blackout" dataset with a set of ranges of identifiers. The idea was that transactions with identifiers within those ranges would be treated differently for a specific range of dates. These listings will give you some idea of the data we're working with. I've pared down the contents of the transactions dataset for clarity. This Blackout dataset corresponds to dates in December 2008 proc sql, proc step, proc format, cpu time 10
124 Using PROC FCMP to Solve Rolling Regression Rapidly Chao Huang,
Liang Xie
Ordinary Least Squares (OLS) r egression is a widely used technique to model financial time series . A r olling regression is the regressions on a fixed sample length or time horizon by moving the beginning and ending boundaries, which involves thousands of OLS equations and thus requires a lot of computing power. Starting from 9.1, the FCMP procedure in Base SAS, provides the matrix manipulation feature by some of its native routines. PROC FCMP deals with matrices in the pre-allocated memory, which significantly increases the efficiency to solve the rolling regression . In this paper, we demonstrate how to solve rolling regressions to backtest Jensen's a lpha, portfolio beta and coefficient of determination with a simulated asset portfolio against market benchmark regression analysis, proc fcmp, time series analysis, proc step, series plot, time series data, sample, proc reg 4
125 Using PROC SQL and the SAS Macro Facility to Blind Formatted Dates on a Group of Datasets within a Single Directory Diana Ventura Sometimes as part of making datasets anonymous, it is necessary to "blind" dates and convert them into the number of days form a specified date. This is common practice when data need to be made anonymous to preserve confidentiality. When this needs to be done to a large number of datasets it makes sense to create a macro to isolate the dates and compile the metadata into macro variables in order to apply the necessary changes to the group of datasets. The PROC SQL DICTIONARY COLUMNS dataset contains a variable named memname. The memname variable can be read as a macro variable. The macro variable allows SAS to dynamically generate the dataset names so that additional SA S macro code can be to used anonymize date variables within each individual table of a group of datasets. This type of utility can reduce the time needed to "blind" dates for confidentiality macro variable, proc sql, proc step, date variable, do loop, macro loop, where statement 5
126 Using PROC TABULATE and ODS Style Options to Make Really Great Tables Wendi L. Wright We start with an introduction to PROC TABULATE, looking at the basic syntax, and then building on this syntax by using examples. Examples will show how to produce one-, two-, and three-dimensional tables using the TABLE statement. More examples cover how to choose statistics for the table, labeling variables and statistics, how to add totals and subtotals, working with percents and missing data, and how to clean up the table using options. A look at the three ways you can use the PRELOADFMT option is also covered. Next the ways to use the ODS STYLE= option in PROC TABULATE are covered. This option helps to customize the tables and improve their attractiveness. This option is very versatile and, depending on where the option is used, can justify cells or row and column headings, change colors for both the foreground and background of the table, modify lines and borders, controlling cell width, add a flyover text box in ODS HTML, or add GIF figures to the row or column headings proc tabulate, proc step, class variable, proc format, proc means, missing value 19
127 Using PROC TCALIS to Investigate Equality of Covariance Matrices across Two Groups Chen Li,
Steven L. Holtzman
It is often important for researchers when comparing two groups to investigate whether a set of variables has consistent relationships within each group. This qu estion can be applied based on gender, race/ethnicity, age or other background characteristics. A good approach to ma ke these comparisons is to test the equality of covariance matrices. Once the covari ance matrices are computed for the se t of variables of interest, the SAS procedure PROC TCALIS (SAS Institute, 2008) can be used to answer the questi on of equality. In this paper we use an artificially constructed dataset to demonstrate how PROC TCALIS is useful for comparing covariance matrices. The dataset emulates an example where the rela tionships between test scores and course grades over multiple years for native English speakers and English language learners are compared, and the results shows that group differences exists in the covariance matrices covariance, proc step, macro variable, sample 5
128 Using SAS Enterprise Guide to Handle Backend Data Preparation for the Health Indicators Warehouse Li-Hui Chen,
Mary Ann Bush,
Kate Brett
The Health Indicator Warehouse (HIW), developed and maintained by the National Center for Health Statistics, is part of a federal initiative called Data.gov designed to increase public access to high value, machine readable datasets generated by the Executive Branch of the Federal Government. The HIW contains almost 1,200 health and health related indicators from more than 200 different data sources, including vital statistics, survey data, surveillance data, census data, and Medicare and Medicaid administrative data. A substantial portion of the backend data preparation for HIW involves processing large micro data files. This report describes a programming approach to efficiently aggregate and summarize data to produce statistics in a standard format sas enterprise guide, dataset, sas enterprise guide project, data wrangling 10
129 Using SAS GTL with 9.3 Updates to Visualize Data When There is Too Much of it to Visualize Perry Watts,
Nathaniel Derby
Developing a good graph with ODS statistical graphics becomes a challenge when input data map to crowded di s- plays with overlapping points or lines. Such is the case with the Framingham Heart Study of 5209 subjects captured in the sashelp.heart data set, a series of 100 booking curves for the airline industry, and interleaving series plots that capture closing stock values over a twenty year period for three giants in the computer industry. In the paper, transparency, layering, data point rounding, and color coding are evaluated for their effectiveness to add visual clarity to graphics output. Version 9.2 compatible Graph Template Language (GTL) plotting statements referenced in the paper include HISTOGRAM, SCATTERPLOT, BOXPLOT, SERIESPLOT and BANDPLOT plus layouts OVERLAY, GRIDDED, DATAPANEL and LATTICE that produce single or multiple-panel graphs. GTL 9.3 updates have also been added to the paper scatter plot, histogram, series plot, time series analysis, proc step, graph template language, heatmap, proc template, proc freq, bar chart, proc means, macro variable, raw data, box plot 20
130 Using SAS ODS Graphics Chuck Kincaid SAS has a new set of graphics procedures called ODS Graphics. They are built upon the Graphics Template Language (GTL) in order to make the powerful GTL easily available to the user. SGPLOT and SGPANEL are two of the procedures that can be used to produce powerful graphics that used to require a lot of work. This upgrade is similar to the ease-of-use upgrade in output manipulation when ODS was first published. This present ation will teach the audience how to use PROC SGPLOT and SGPANEL and the new capabilities they provide beyond the standard plot. By using these new capabilities, any user can tell the story better proc step, series plot, proc sgplot, numeric variable, proc sgpanel 18
131 Using SAS SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn SAS is a powerful programming language. When you find yourself writing repetitive code, you should use a macro. You probably already know that, and might even do it sometimes. There are limitations to what a macro can do, and that can get frustrating. It may even be a deterrent to trying. The big problems come when you need a parameter that is unknown at compile time... or when you spend almost as much time writing the macro calls as you would just writing the whole thing "longhand." With SCL you are able to write code that is both efficient and stable. Once the code has been tested, it will not need to be edited if the parameters change. Hard coding of macro calls means there is potential for errors, which means that testing would be necessary after every macro call change. When there are lots of macro calls with multiple parameters, these updates can be time consuming, and it is easy to make mistakes sas base, in=, data step, macro call, keep statement 16
132 Using SAS to Control the Postprocessing of MS Documents Nat H. Wooding Jr. This paper uses different SAS coding to control a m odified version of Chen's code to convert RTF files into Word documents and discusses other post processing activ ities that might be useful. The target audience is MS Windows users call execute, excel 8
133 Using SAS to E-Mail Reports and Results to Users Stuart Summers SAS applications that are repeatedly and periodically run have reports and files that need to go to various end users. SAS is able to use Simple Mail Transfer Protocol (SMTP) to send completion notices and logs, lists and any other reports as attachments. With three lines in the config file you can set up the code in your process to email your results to individuals and/or distribution lists. This paper will provide the lines to add to the config file as well as an example of how to set up your code to send the emails filename statement, put statement 5
134 Using SAS to Test, Probe and Display Interaction Effects in Regression Timothy Gravelle Interaction effects (or moderated effects) in regression models capture how the effect of an independent variable on the dependent variable varies as a function of a third variable. In general terms, interaction effects are interpreted as the effect of X 1 on Y at different values of X 2. Such interactive (or moderated) relationships pervade statistical research in a wide variety of disciplines. Still, their specification and communicating their substantive interpretation remains a challenge. This paper demonstrates how SAS software can be used to specify, probe and display interaction effects in linear regression models. It covers a number of techniques, including different graphical displays for interaction effects, and techniques for identifying the regions of statistical significance for an independent variable interaction effect, predictor variable, regression analysis, response variable, proc step, proc reg, confidence interval, degrees of freedom, proc stdize, main effect, data visualization, standard deviation 16
135 Using SAS/OR for Automated Test Assembly from IRT-Based Item Banks Yung-Chen Hsu,
Tsung-hsun Tsai
In recent years, advanced development in psychometric theory and computer technology has led to dramatic changes in test construction practices. In testing organizations, the task of assembling test forms can be consid- ered as an assignment to solve a mathematical programming problem, in which a certain objective fun ction needs to be met subject to specific practical constraints, such as test length and content coverage. The SAS/OR is a powerful modeling environment for solving mathematical optimization problem s. Large or mid- sized testing organizations can greatly benefit from its available solvers to handle real test assembly problems and needs. We used PROCEDURE OPTMODEL to present the programming formulation of a test assembly prob- lem. The merit of the PROC OPTMODEL is that the models in the SA S statements are declared in a form which mimics the symbolic formulation of an o ptimization model odds ratio, proc step 5
136 Virginia's Best: How to Annotate County Names and Values on a State Map Anastasiya M. Osborne This paper describes a work project to annotate a Virginia state map with long county names and National Agricultural Statistics Service (NASS) data, using enhanced color and techniques to minimize map crowding. Displaying text and numeric data by county on a state map is different from displaying state-level data on a U.S. map. Long county names rather than two- letter state abbreviations require additional effort by a programmer to create a readable map. The SAS code with %ANNOMAC, %CENTROID, PROC GPROJECT, PROC GMAP, and a 20-pattern color scheme were developed to create requested maps that showcased in color Virginia's top agricultural counties. This paper is for intermediate level programmers excel, proc step 20
137 Wake Up Your Data with Graph'n'Go Christopher Battiston Graph'n'Go is a quick and easy way to visualize your data, from simple bar charts to complex, multi-graph dashboards. With a lot of the functionality being hard to find, this presentation aims to navigate the new user through GnG to find the hidden gems. These will enable the newcomer not only to produce graphs effectively, but will also teach them about SAS programming sas base, sas enterprise guide 6
138 What?? SAS/AF & SCL Can Enhance Rapid Prototyping of Modern Web Development Efforts? Joe Whitehurst,
Richard A. DeVenezia,
Arthur S. Tabachneck
This paper describes how SAS/AF and SAS Component Language were used to do rapid prototyping of a web- based application that we wanted to develop. This paper will describe the development process and present demonstrations of both the final version of the SAS/AF prototype and the web-based product we brought to ma r- ket based on the prototype. The application is a Cluster Management Utility (CMU) designed to produce data driven clusters of the members of a multi-location organization for decision making purposes. The target market for the application is retail store chains, but many other types of multi-location organizations could also use the CMU. The main purpose of the CMU, however, is to drastically reduce the labor required to take advantage of merchandise planning software from any vendor by allowing the merchandise planning software to operate on clusters of stores rather than individual stores to the maximum extent possible macro variable, proc step, put statement, &variable, data step, %if-%then-%else, macro definition 19
139 With a Trace: Making Procedural Output and ODS Output Objects Work For You Louise S. Hadden The Output Delivery System (ODS) delivers what used to be printed output in many convenient forms. What most of us don't realize is that "printed output" from procedures (whether the destination is PDF, RTF, or HTML) is the result of SAS packaging a collection of items that come out of a procedure that most people want to see in a predefined order (aka template.) With tools such as ODS TRACE, PROC CONTENTS and PROC PRINT, this paper explores the many buried treasures of procedural output and ODS output objects and demonstrates how to use these objects to get exactly the information that is needed, in exactly the format wanted proc step, estimate, output delivery system 11
140 Working with a Large Pharmacy Database: Hash and Conquer David Izrael Working with a large pharmacy database means having to process - merge, sort, and summarize - hundreds of millions of observations. By themselves, traditional methods of processing can lead to prohibitive data processing times that endanger deadlines. The hash object is the fastest and most versatile method in the SAS system of substantially accelerating the processing. In our paper, we apply hash methods to a routine lookup function where one needs to merge the kernel pharmacy database with its satellites. We also present comparatively new non-traditional features of the hash object, such as handling duplicate keys and finding frequency counters. At the same time, we underscore the necessity of traditional sort-and-merge hash table, conditional do loop 7
141 Writing Flexible SAS Codes: Exploring the Value of Global Macro Variables, Conditional Statements, and %SYSFUNC Victoria Porterfield Many SAS codes are developed to be run routinely and not always on a case by case basis. Therefore, it becomes more important to write flexible code which requires only minor changes, if any, by the user and that allows for a wider range of possibilities. For instance, a code may be run on a monthly basis to examine the relationship between the purchase of a particular item and the various age groups of the buyers. However, what happens if there are no buyers from one of the age groups for a particular month and as a result unwanted warnings, notes, and/or errors appear in the log? Instead of rushing through and revising the code after the fact, it may be more beneficial to be proactive in safeguarding your code. This paper explores various methods that can be used to increase the flexibility of routine codes. These methods include using global macro variables, conditional statements, and %SYSFUNC to execute DATA and PROC steps within a macro macro variable, macro function, proc step, macro definition 10
142 Yes, No, Maybe So: Tips and Tricks for Using 0/1 Binary Variables Laurie Hamilton Many SAS programmers are familiar with the use of 0/1 binary variables in various statistical procedures. But 0/1 variables are also useful in basic database construction, data profiling and QC techniques. By definition, a binary variable is a flavor of categorical variable, an outcome or response measure with only two possible values. In this paper, we will use a sample dataset composed of 0/1 numeric binary variables to demon- strate some tricks and tips for quick Data Profiling and Quality Assurance using basic SAS functions and the MEANS and FREQ procedures binary variable, proc step, proc freq, quality assurance, proc means, frequency analysis, character functions, missing value 6
143 You Have SASMAIL! Rajbir Chadha As SAS software programs become complex, processing times increase. Sitting in front of the computer, waiting for the program to finish isn't something that everyone enjoys. This paper talks about a way to have SAS send out automatic emails once the process finishes and include the log, output or reports as an attachment. This function gives users the freedom to work on other pressing tasks rather than constantly checking the SAS process log for completion. The SASMAIL custom macro function combines the functionality of FILENAME EMAIL, SAS Macros and the SQL Procedure to deliver the intended results. It sends out an e-mail with a copy of the log (when available) as an at- tachment providing users with the flexibility to access required information even when mobile. SASMAIL detects the SAS session you are running, whether DMS or BATCH, and selects the attachment options accordingly stored macro, macro facility, autocall macro, macro function, options statement, excel, proc sql, proc step, macro definition, sas log 8

Back to Conf go 2013 go 2011

This site serves as a convenient hosting location and does not work as a publisher. All copyrights belong to their respective owners.

The information on this site is provided for general reference purposes only. Whilst every effort is made to ensure that the site is up to date and accurate, no warrant, nor any responsibility or liability for, the accuracy or completeness of the content or for any loss which may arise from reliance on information contained in this site is provided. Links to other sites are provided for your convenience but no responsibility or liability for the content of those sites or of any external site which links to this site is accepted. References to any specific commercial product, process, service, or corporation are also for information only, and do not constitute endorsement, recommendation or favoring.

SAS is a registered trademark of SAS Institute Inc. SAS, Statistical Analysis System, 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.