HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

PNWSUG 2009 Papers - Index

43 papers. Source: PNWSUG (Pacific Northwest SAS Users Group) conference proceedings.

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 A "SAS Programmer's" Guide to SAS Enterprise Guide Marje Fecht,
Rupinder Dhillon
You have been programming in SAS for a while… .. You have been told "we are moving to Enterprise Guide" and removing Display Manager". You say … … I can program everything just fine myself, thank - you! OR What am I supposed to do with all these windows? This presentation will demonstrate how SAS programmers can use SAS Enterprise Guide as their primary interface to the SAS system while maintaining the flexibility of writing their own customized code. We will look at · how to navigate the views and menus · how SAS Enterprise Guide can be used as your primary SAS Editor · how you can leverage the more complex built-in capabilities available in SAS Enterprise Guide to further enhance the information you deliver · some tips and tricks to get the most out of SAS Enterprise Guide Enterprise Guide version 4.1 will be used sas enterprise guide, bar chart, macro variable, sas programmer, sas log 19
2 A Demonstration of Different Approaches to Export Formulas into Excel Using SAS Collin Elliot The ubiquity of Microsoft EXCEL in office settings makes EXCEL a commonly used format for SAS output. While SAS features many ways to export data into EXCEL, the output consists of hard-coded values. What options are there when clients or supervisors want to see the formulas that underlie the exported values? While the analyst can manually construct the formulas in EXCEL following the export of data, there are circumstances where the quantity or complexity of the formulas make this a tedious endeavor. The good news is that SAS offers some solutions to this dilemma. This paper details some of the ways that the analyst can create formulas in SAS and export them directly into EXCEL, from the use of ODS style attributes for basic formulas to the use of a dynamic framework for complex formulas involving multiple variables excel, proc step, proc print, macro variable, dataset, proc sql, character variable, ods excel, xls, ods html, sas output 12
3 A Little Stats Won't Hurt You Nathaniel Derby This paper gives an introduction to some basic but critically important concepts of statistics and data analysis for the SAS programmer who pulls or manipulates data, but who might not understand what goes into a proper data analysis. We first introduce some basic ideas of descriptive statistics for one-variable data, and then expand those ideas into many variables. We then introduce the idea of statistical significance, and then conclude with how all these ideas can be used to answer questions about the data. Examples and SAS code are provided. proc step, sample, histogram, proc univariate, outlier, box plot, bubble plot, data science, proc calis, proc freq 18
4 A Robust and Flexible Approach to Automating SAS Jobs Under UNIX Mike Atkinson So you've got a Unix server that is terrific for running big jobs, either right when you command or perhaps scheduled to run off-hours. What if those jobs could email you to indicate their success or failure, with generated reports as attachments (when successful)? And if they could automatically store all of their logs, date and time stamped? This paper describes the use of a perl script that has been developed at the BC Ministry of Health Services to schedule SAS jobs on Unix. Here the term "job" refers to a set of SAS program(s) and/or perl module(s) to be run in sequence. In practice, most of the steps in our jobs are SAS programs, with perl used to do things like emailing reports, and sending files via FTP. The Unix server is up and running 24/7, which makes it ideal for scheduling those massive jobs to run at night while everyone is sleeping macro variable, sample 17
5 A Simple Time Series Macro Scott Hanson One desirable aim within the financial industry is to understand customer behavior over time. Despite vast interest, I have seen that the goal frequently is unmet. Clearly, an array (apologies) of methodologies abounds for the analyst. One simple approach involves a SAS macro (NB. the code is written in SAS 9.2 for the PC). The macro generates a time series file and features options such as merging external data, maintaining the time series, and automatic labeling of attributes. Finally, I provide a practical example, especially suited for the beginning programmer, involving arrays and do-loop processing time series analysis, macro variable, macro call, macro definition 7
6 Advanced PROC REPORT: Getting Your Tables Connected Using Links Arthur L. Carpenter Gone are the days of strictly paper reports. Increasingly we are being asked to render our tables and reports using a variety of electronic file types that can be browsed and read using our computers. Besides the cost savings associated with the purchase of paper, paperless reports also minimize the costs associated with the printing and distribution of the reports. Another, often overlooked and potentially more important, side benefit of the paperless report is the increased availability of linked graphs, reports and tables. Navigation of the paper report is dependent on the table of contents, a strong index, and visual aids such as captions and footnotes; however in paperless reports we can easily jump from one table to its supporting and dependent tables with the click of a mouse. Easily, that is, if we have created the necessary links proc report, proc step, output delivery system, macro variable, macro loop, do loop, macro facility, footnote statement, ods pdf, macro definition, proc sql 21
7 An Alternative to SAS/Intrnet Using Base SAS, ASP.NET and SQL Server Yuying Zhang,
Leslie Hill,
Nick Kinsey,
Susan Eversole,
Bill Savage,
David Uglow,
George Grubbs,
Annette M. Green,
Jeniffer Iriondo-Perez
Dynamic, web-based SAS reports are usually generated using SAS/INTRNET or other technologies such as the SAS 9 Business Intelligence/Enterprise Business Intelligence (BI/EBI) Architecture. This paper describes a method to create SAS reports dynamically on the web, using SAS, ASP.NET and Microsoft SQL Server technologies. By leveraging what you already have with your base SAS license and other technical tools, you can achieve web-based SAS reports if SAS/INTRNET is not an available option for your report delivery. RTI devised this alternative way of creating dynamic SAS reports using ASP.NET, Microsoft SQL Server and an existing base SAS server. We used SQL Server to store report requests and developed a Windows Service that monitors user requests continuously. Users are able to submit report requests via a dynamic web user interface developed using ASP.NET. The resulting SAS reports can be either emailed or posted on the web site on, essentially, a real-time basis sql server, proc sql, sas base 6
8 Automation of Large SAS Processes with Email and Text Message Notification Seva Kumar SAS includes powerful features in the Linux SAS server environment. While creating large programs for automated data extraction and delivery on a daily, weekly, and monthly basis, we developed an internal process for scheduling, detecting database readiness, and reporting the success or failure of the process via email and text messaging. This paper illustrates methods used to check database readiness, dependent SAS data readiness, FTP final data, and notification of all recipients via email and text messaging from the Linux SAS server environment macro variable, sample, proc sql 9
9 Building Multiple Linear Regression Models - Food for Thought Colleen E. McGahan,
Mei Chong
To obtain a parsimonious set of variables that efficiently predicts the response of interest, many people delve straight in and start performing an automated model selection method such as forward selection. This paper covers the fundamentals of what the first step really should be - getting to know your data - and how SAS can help you do this! This knowledge is then utilized to build multiple linear regression models. Direct comparisons between PROC REG and PROC GLMSELECT are made proc step, proc reg, proc glmselect, feature selection, multiple regression, significance level, regression analysis, nominal variable, correlation, binary variable, predictor variable, response variable, forward selection, proc freq, box plot, scatter plot, stepwise selection, proc means, missing value, proc corr, interval variable, variable list, histogram, proc glm, proc sgscatter, class variable, outlier, proc sgplot, proc genmod 11
10 Connect with SAS Professionals Around the World with LinkedIn and sasCommunity.org Kirk Paul Lafler,
Charles E. Shipp
Accelerate your career and professional development with LinkedIn and sasCommunity.org. Establish and manage a professional network of trusted contacts, colleague s and experts. These exciting social networking and collaborative online communities enable users to connect with mil lions of SAS users worldwide, anytime and anywhere. This paper explores exciting features found in both virtual communities. Topics include creating a pro file and social network content, developing a network of friends an d colleagues, joining special-interest groups, acce ssing a Wiki- based web site where anyone can add or change conte nt on any page on the web site, sharing biographica l information between both communities using a built- in widget, exchanging ideas in Bloggers Corner, vie wing scheduled and unscheduled events, using a built-in search facility to search for desired wiki-content, collaborating on projects and file sharing, reading and responding t o specific forum topics, and much more by group processing, sample 11
11 Consuming data from SOAP and REST web services from within SAS Curtis E. Mack Presentation proc step, proc http, phase i, web service, macro variable, call symput, dataset 40
12 CSSSTYLE: Stylish Output with ODS and SAS 9.2 Cynthia L. Zender It has become the standard for most company Web sites to use cascading style sheets (CSS) to standardize Web site look and feel. Now, with ODS and SAS 9.2, you can design a single CSS file to be used with ODS RTF, PDF, and HTML. In the past, CSS usage was limited to files created with ODS HTML. This paper provides an introduction into the use of the new CSSSTYLE option in SAS 9.2. This option allows you to use cascading style sheet (CSS) style specifications for RTF and PDF files, in addition to HTML files. This paper will include a brief introduction to CSS syntax and some of the features, such as @media CSS sections, that are particularly useful when creating ODS output. Then, all the methods of using CSS with ODS are discussed, with an emphasis on the new CSSSTYLE option. In addition to these topics, a job aid will be provided that outlines the most commonly used CSS properties and property values ods html, output delivery system, sas enterprise guide, ods pdf, sas 9 10
13 Customising SAS/GRAPH Charts with Annotations Mike Atkinson For people who like writing SAS code, SAS/GRAPH is a great way to create charts. You can get crisp, attractive results, with lots of flexibility for customisation. For charts that will be run on a regular basis, or large suites of similar charts or plots, the most efficient method over the long road may be creating the finished product completely using SAS/GRAPH, using customisation possible with an annotation dataset. And it can be fun! In this paper, we'll start by building a population pyramid chart using SAS/GRAPH, without any custom annotations. Then we'll use an annotate dataset to make the chart communicate a bit more information proc gchart, proc step, bar chart, proc sql 13
14 DATA Step versus PROC SQL Programming Techniques Kirk Paul Lafler Are you considering whether to use a DATA STEP or P ROC SQL step in your next project? This presentatio n explores the similarities and differences between DATA STEP and PROC SQL programming techniques. Topics include IF- THEN-ELSE, SELECT-WHEN, and PROC SQL CASE expressio ns conditional logic concepts and constructs; and the techniques for constructing effective merges an d joins. Attendees explore examples that contrast D ATA step versus PROC SQL programming techniques to conduct c onditional logic scenarios, one-to-one match-merges and match-joins, and an assortment of inner and outer join programming constructs proc sql, if-then-else, proc step, inner join, character variable, missing value, create table, right join 14
15 Do Which? Loop, Until or While? A Review Of Data Step And Macro Algorithms Ronald J. Fehd This paper reviews the three looping constructs: loop-repeat, do until and do while and offers examples of their use. The purpose of this paper is to provide both pseudo-code and examples so that program mers may understand the difference in logic and make an appropriate choice for their algorithm. The two DATA STEP loop processing verbs: continue (return to loop-top), and leave (exit) are illustrated. Macro examples using %goto are shown for continue and leave. The Whit lock subsetting loop - also known as the Do-Whitlock (DOW) loop - and double-DOW are illustrated. conditional do loop, macro put 11
16 Ecosystem food web constellation diagram using SAS/GRAPH software Ranjeev Kumar,
Divya Varkey
Ecosystem food web diagram is diagrammatic representation of trophic relationships among various organisms (plants and animals) that belong to different trophic levels in the ecosystem. It shows the direction of flow of energy among the ecosystem components. This paper presents the use of a SAS program for generating an interactive food web in Java Applets using DS2CONST macro of SAS/GRAPH software. This interactive constellation diagram provides various user-friendly pop - up options that are helpful for easy diagnosis of trophic relationship. Diet diagrams are very useful in comparing the structure of ecosystem through time and hence the change in the system resulting from continued resource extraction. dataset, macro parameter, do loop, missing value, excel 7
17 Exploring Output Delivery System (ODS) Programming Techniques Kirk Paul Lafler Explore various SAS output formatting and reporting techniques with this Introduction to Output Delivery System hands-on workshop. Numerous examples are presented to improve mastery of ODS capabilities while providing a better understanding of ODS statements and options to perform common tasks. Topics include ODS Formatting statements and options; using the Escape character and formatting output; and various output destinations including RTF, PDF, Output SAS data set, EXCEL spreadsheet, and HTML output proc univariate, output delivery system, sas output, dataset, ods html, ods pdf, ods rtf, file statement, proc step 12
18 Fifty Ways to Lose Your Data (And How to Avoid Them) Linda T. Jolley,
Jane Stroupe
There probably are not fifty ways to lose your data, but there are a bunch. Of course, if we all backed up our data prior to working with it, there wouldn't be a problem; however, that's not always a practical solution, especially if your data sets are large. By being aware of coding syntax that can lead to data destruction, you can avoid finding yourself with a data set containing zero (0) observations. The techniques in this paper can help anyone from the novice to the experienced user prevent disasters. If you've never had this problem, these techniques will allow you to continue to be quite proud of yourself proc step, infile statement, proc sql, hash table, missing value, update statement, where statement, raw data, dataset, proc print, proc means 20
19 Five Ways to Create Macro Variables: A Short Introduction to the Macro Language Arthur L. Carpenter The macro language is both powerful and flexible. With this power, however comes complexity, and this complexity often makes the language more difficult to learn and use. Fortunately one of the key elements of the macro language is its use of macro variables, and these are easy to learn and easy to use. Macro variables can be created using a number of different techniques and statements. However the five most commonly methods are not only the most useful, but also among the easiest to master. Since macro variables are used in so many ways within the macro language, learning how they are created can also serve as an excellent introduction to the language itself. These methods include: %LET statement macro parameters (named and positional) iterative %DO statement using the INTO in PROC SQL * using the CALL SYMPUT routine macro variable, macro facility, macro put, macro loop, proc sql, put statement, do loop, macro call, proc step, missing value, macro parameter, macro definition, %macro parameters, call symput, automatic macro variable, symbol table, keyword parameter, select 12
20 Getting Correct Results from PROC REG Nathaniel Derby PROC REG, SAS's implementation of linear regression, is often used to fit a line without checking the underlying assumptions of the model or understanding the output. As a result, we can sometimes fit a line that is not appropriate for the data and get erroneous results. This paper gives a brief introduction to fitting a line withPROC REG, including assessing model assumptions and output to tell us if our results are valid. We then illustrate how one kind of data (time series data) can sometimes give us misleading results even when these model diagnostics appear to indicate that the results are correct. A simple method is proposed to avoid this. Examples and SAS code are provided. The SAS/GRAPH package is used in this paper but not required to use these methods, although SAS/STAT is required to usePROC REG. KEYWORDS: SAS,PROC REG, assumptions, residuals, time series. All data sets and SAS code used in this paper are downloadable fromhttp://nderby.org/docs/RUG09-PROCREG.zip proc step, anova, proc reg, estimate, predictor variable, response variable, normal distribution, regression analysis 14
21 Getting from SAS 9.1.3 to SAS 9.2: Migration Tools or Promotion Tools Diane Hatcher,
Sandy McNeill
If you are running a metadata server in your SAS 9.1.3 environment, you must upgrade your metadata when you move to SAS 9.2. There are two possible approaches to take. The first approach is a migration, which will essentially copy your SAS 9.1.3 environment over to SAS 9.2 as part of your SAS 9.2 installation process. The second approach is to make a fresh start by installing SAS 9.2 first, then promoting specific content from SAS 9.1.3 afterwards. This paper will describe the tools, processes, and considerations for each approach. The goal is to help you make an educated assessment to determine which approach will work best for you sas management console, sample, data cleaning, spk file 12
22 Graphs in Flash Using the Graph Template Language Himesh Patel,
Dan Heath,
David W. Kelley
The Graph Template Language (GTL) offers many opportunities for application developers to package simple or complex custom-designed graphs into stand-alone template libraries. In SAS 9.2, users can generate static output only through Java rendering. Let's take a peek into future rendering through the use of Adobe Flash. You will be able to use your current GTL code to generate interactive graphs using Flash technology. Once data is visually analyzed, you will be able to publish the graphs in presentations or reports graph template language, output delivery system 7
23 High Performance Analytics with In-Database Processing Stephen Brobst,
Keith Collins,
Paul Kent,
Mike Watzke
A new era of high performance analytics has emerged. In-database processing for deep analytics enables much faster turnaround for developing new analytic models and dramatically reduces the cost associated with data replication into "shadow" file systems. This talk examines these trends and quantifies the impacts. We also provide best practices for execution of a phased deployment strategy of these capabilities in-database processing, data warehouse, proc sql, parallel processing, proc step, data governance, structured data, data mining, proc freq 8
24 How to use Proc Tabulate Tasha Chapman The purpose of this paper is to acquaint the reader with the basics of PROC TABULATE syntax. By the end of this paper, you should know how to create a basic table, use formats in your table, change headers and data labels, add row and column totals, and implement basic statistics. The following examples were created using SAS version 9.1.3. The output was created using ODS PDF in the SASweb style. Getting started - the basics of PROC TABULATE Before delving into the complexities1 of PROC TABULATE, let's break this procedure down to the bare bones. The simplest PROC TABULATE includes a Class statement and a Table statement. The Class statement tells SAS which variables you are going to be using in the table to categorize your observations (such as Male/Female, Yes/No, Tall/Medium/Short, etc.). Any variable that will be used for categorization in your table must be in the Class statement proc tabulate, proc step, class variable, missing value, format statement 12
25 Inline Formatting with ODS Markup Eric A. Gebhart Explore the power of inline formatting in ODS. And, learn about the super powers of inline formatting with ODS markup and ODS measured; see how easy it is to make your reports look better than ever before. With the new and improved syntax, ODS Inline formatting is better and more powerful than ever before. Learn how to use it and extend it to do even more than you dreamed possible. TWAS BRILLIG AND THE SLITHY TOVES, DID GYRE AND GIMBLE IN THE WABE Inline formatting has been around for a few years now, but as of 9.2 it has a new syntax and is more powerful than ever. However, it can look a bit daunting and much like the feelings you may have about Lewis Carol's Jabberwock and the Jub Jub bird and frumious Bandersnatch. You might be just as well off running off the other way. But inline formatting isn't nearly so bad as the Jabberwock, and the Jabberwock didn't fair so well anyway excel, data step 13
26 List Processing Basics: Creating and Using Lists of Macro Variables Ronald J. Fehd,
Arthur L. Carpenter
List Processing or dynamic programming techniques free up your programming time by eliminating hard coded parameter values. List values can be obtained directly from information you already have, and there is more than one way to do it! Commonly the list is stored as series of macro variables or as a macro variable with a series of values or even as values in a data set. This paper compares and contrasts the basic methods of treating variable values as parameters and placing them into repetitive code. macro put, macro variable, proc sql, proc step, macro call, call execute, macro loop, macro definition, %if-%then-%else, output delivery system, do loop, proc report, dictionary tables, data step, create table, proc sort, macro function 20
27 More Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS Vincent DelGobbo Transferring SAS data and analytical results between SAS and Microsoft EXCEL can be difficult, especially when SAS is not installed on a Windows platform. This paper explains how to use the XML support in Base SAS 9 software to create multi-sheet Microsoft EXCEL workbooks (for EXCEL versions 2002 and later). You will learn step-by-step techniques for quickly and easily creating attractive multi-sheet EXCEL workbooks that contain your SAS output, and also tips and tricks for working with the ExcelXP ODS tagset. Most importantly, 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! The use of SAS server technology is also discussed. Although the title is similar to previous papers by this author, this paper contains new and revised material not previously presented excel, xls, date variable, sas output, proc template, sas base, sysdate9, output delivery system, title statement, by group processing, proc print, ods xml, format statement, proc step, sample 20
28 Multiple Set Statements in a Data Step: A Powerful Technique for Combining and Aggregating Complex Data Renu Gehring The use of multiple SET statements in a DATA STEP is little known and often misunderstood. This is because two or more SET statements in a DATA STEP can lead to loss of data and incorrect results. However, when used with additional code elements, multiple SET statements prove to be powerful in combining and aggregating complex data effectively. This paper explains how multiple SET statements work and then describes several applications, including one involving allocation of healthcare revenues set statement, data step, merge statement, point= option 11
29 ODS Graphics Designer An Interactive Tool for Creating Batchable Graphs Sanjay N. Matange The SAS/GRAPH ODS Graphics Designer is a GUI based intera ctive tool for users who want to create custom graph quickly without any programming. This video presentation will show you can combine different types of plots, insets and legends to create the graph you need. Use this flexible tool to incrementally build single-cell or multi-cell graphs adding rows and columns as you go. Bu ild data driven classification paneled graphs as easily as simple scatter plots. Start from scratch, or build on top of graphs from a custom izable gallery, adding your own custom graphs to the graph gallery for future use, or to share with others histogram, class variable, density plot, scatter plot, box plot, bar chart, proc sgdesign 24
30 ODS Packages: Putting Some Zip in Your ODS Output Eric A. Gebhart ODS packages and package templates add powerful new abilities to ODS. Automatically create zip files and SAS packages which contain all the output generated from your SAS program. ODS packages make it easy to e-mail your ODS output to others and can help keep your file system clear of file clutter. With integration technologies, ODS packages can also publish to WEBDAV, Email, Queues, and Subscriptions as well as Archives. ODS packages are also completely integrated with TAGSETS allowing for fully automatic generation of packages and the creation of some of the newer file formats like Open Document Format and Microsoft Office 2007. Learn how easy it is to use ODS packages and find out how they will impact the future of ODS output delivery system, ods html, proc step, ods packages 10
31 ODS Statistical Graphics: How You SHOULD Be Developing Your SAS Apps David L. Cassell SAS has always been proclaimed by its competitors as trailing other applications in areas such as graphics. In particular, graphical analysis of data has always been a problem area, and manipulation or adjustment of graphs has always been more limited than some other statistical analysis and graphics packages. That is changing with ODS Statistical Graphics in SAS 9.1.3 and SAS 9.2, not to mention the other new graphical features introduced in SAS 9.2. As a result, any application development process has new tools to facilitate the development of analyses, plots, and charts. This will be illustrated with a basic cost modeling example. We will look at building a standard statistical plot with an information box at the side. We will show how to use ODS Statistical Graphics and ODS statements to build such charts for multiple facilities ods html, proc step, file statement, sas output 7
32 Parameter-Driven Data Validation and Transformation Or The Marriage of Microsoft Excel and SAS Macro Variables to Solve ETL Problems Hugh Shinn,
Wanda Hopkins
This paper discusses processing data from multiple sources through the use of linked Microsoft EXCEL parameter files or logical data maps (LDMs) that specify the name, type, length, and validation rules for each target variable in a SAS data set or other table structure (e.g. Oracle, DB2, Access, etc.) and the associated source variable information (e.g. source variable name, and type). The LDM also includes the transformation rules that are used to convert the source variable into the target variable. Each LDM is based on a master logical data map to which there is a link for the validation rules. Thus, it's possible to change the validation rules in the master LDM and have those modifications appear in the subordinate LDMs. In our case, we examined weather data from North America and Europe to determine their variations. Using SAS Enterprise Guide, we imported the LDMs and the input data files macro variable, data cleaning, response variable, data validation rules, data step, call execute, macro definition, excel, sas enterprise guide, proc step, raw data 17
33 Remembering the Past: Using SAS Keyboard Macros to Enhance Documentation Peter J. Lund Presentation comment, macro facility 15
34 SAS Proc STATESPACE and the forecasting of Bureau of Labor Statistics JOLT and Diffusion Index Martin B. Jetton To anticipate trends in retention Kronos' Hiring Solution divisions utilizes Bureau of Labor Statistics published job statistics of hires, separations and job openings available on the internet at http://www.bls.gov/jlt/home.htm or for raw data that we utilize at the ftp site; ftp://ftp.bls.gov/pub/time.series/jt/ . We also utilize the BLS statistic of job diffusion for Total Private Non-Farm payrolls available at http://www.bls.gov/webapps/legacy/cesbtab7.htm. Job diffusion is a measure of job creation compared to job destruction. Since there are several time series that are related we forecast the BLS time series for hiring, separation and job openings using a state space model. The state space model is appropriate for jointly modeling and forecasting several related time series that have dynamic interactions. By taking into account the autocorrelations among the whole set of variables, the state space model may give better forecasts than methods that model each series separately proc step, time series analysis, correlation, proc cancorr, covariance, autoregressive model, transition matrix 13
35 SAS Tips, Tricks and Techniques Kirk Paul Lafler The base -SAS System offers users the power of a comprehensive DATA STEP programming language, an assortment of powerful PROCs, a macro language that extends the capabilities of the SAS System, and user -friendly interfaces including the SAS Display Manager. This presentation highlights numerous SAS tips, tricks and techniques using a collection of proven code examples related to effectively using the SAS Displa y Manager and its many features; process DATA STEP statements to handle subroutines and code libraries; deliver output in a variety of formats; construct reusable code; troubleshoot and debug code; and an assortment of other topics proc univariate, proc step, options statement, proc sql, dataset, macro facility, macro variable, macro parameter, %macro parameters, sas log, dictionary tables, ods pdf, ods rtf, sas output, if-then-else, ods html, macro definition 16
36 The 7 Habits of Highly Effective SAS-ers David L. Cassell SAS programmers develop habits over time. Some of those habits lead toward efficient, effective coding. Other habits lead toward annoying headaches and a constant feeling that SAS can't do anything without a lot of struggle. In this paper, we will look at seven general habits which lead toward effective SAS coding, as well as toward efficient SAS programs. We will discuss: ways in which understanding your problem can help improve your code; how to find and use the right tool; how to improve efficiency by looking for ways to reduce the number of steps; how to structure data sets so that SAS programs can use your data more effectively; how to avoid the more expensive operations in programs; and how to learn more about the aforementioned subjects proc step, proc sql, proc mixed, where statement, macro variable, sample, missing value, proc tabulate, macro facility, macro definition, sas programmer, user-defined format, ods xml, by group processing, proc reg, proc report, sas programming, date variable, implicit loop, sas 9, conditional do loop, if-then-else, proc genmod, proc means, dataset, dictionary tables 17
37 The MEANS/SUMMARY Procedure: Getting Started and Doing More Arthur L. Carpenter The MEANS/SUMMARY procedure is a workhorse for most data analysts. It is used to create tables of summary statistics as well as complex summary data sets. The user has a great many options which can be used to customize what the procedure is to produce. Unfortunately most analysts rely on only a few of the simpler basic ways of setting up the PROC STEP, never realizing that a number of less commonly used options and statements exist that can greatly simplify the procedure code, the analysis steps, and the resulting output. This tutorial begins with the basic statements of the MEANS/SUMMARY procedure and follows up with introductions to a number of important and useful options and statements that can provide the analyst with much needed tools. With this practical knowledge, you can greatly enhance the usability of the procedure and then you too will be doing more with proc step, output, proc means, class variable, standard deviation, numeric variable 19
38 Tiptoe through the Templates Cynthia L. Zender Are you confused about the difference between style templates, table templates, tagset templates, and graph templates? Do you wonder how they're all used with ODS? This paper provides an overview of all the different template types and how they're used with the Output Delivery System. From style and table templates, that first appeared with SAS 7 to the newest graph templates that appeared with SAS 9.2, this paper will provide an overview and several concrete examples for each template type. Along the way, we'll also discuss the template garden (SASHELP.TMPLMST) where all the templates live, how to transplant your templates to a different garden, how to come up with your own new variety of templates (PROC TEMPLATE), and how to find your way to the new template garden (ODS PATH). New features of PROC TEMPLATE syntax (such as the IMPORT statement) will be highlighted proc step, proc freq, proc template, proc means, ods html, proc print, proc report, sas log, ascii, ods pdf, sas output, txt, output delivery system, sas enterprise guide 27
39 Transforming SAS code into a SAS Macro using PERL Sumner Williams SAS code is strengthened by transforming the code into a macro. This paper is intended to demonstrate using the SAS Macro language to schedule macros to run at specific times during the day, week, month, quarter, or year. Scheduling SAS Macros to run during off-peak hours greatly increases the hours that SAS is used by programmers. By running a SAS program during normal work hours, a SAS license is being used and can not run anything else AND you are using up computer cycles that could be spent in other ways. For periodic reports, this can be an inefficient use of computer power. An efficient programmer would schedule each of those tasks to run during off hours, but once the programmer has more than 10 scheduled tasks, the administration becomes tedius. This paper will show how to decrease the administrative tedium of scheduling SAS Macros. Since this paper is about increasing efficiency, the paper will also demonstrate using a PERL program which develops and sets up the scheduling macro macro variable, macro definition 5
40 True or False: Evaluating Logical Expressions Ronald J. Fehd The SAS language provides methods to evaulate logical expressions which then allow conditional execution of parts of programs. In cases where logical expressions contain combinations of intersection (and), negation (not), and union (or) users and later readers doing maintenance may legitimately and thoughtfully question whether the expression is correct. Topics covered include theory of logic and logical evaluation in DATA STEP, macros, and procedures (where clause). 2
41 Using SAS with Oracle: Writing efficient and accurate SQL Tasha Chapman,
Lori Carleton
When using SAS to extract data from a live Oracle database, it is important to write accurate and efficient code that will not hamper the performance of other users. The best way to do this is to have Oracle perform the initial data query before bringing the selected records to SAS. To accomplish this, the SAS user must write SQL code that Oracle will understand and compute properly. SAS has included enhancements in Version 9.2, such as the so-called "Un-Put Technologies" that make this easier. This paper will teach SAS users, including those without access to Version 9.2, how to use PROC SQL efficiently and effectively with Oracle and other non-SAS databases. proc sql, where statement, sas function, sas log, dataset, date variable, datepart, datetime variable, numeric variable, oracle, proc step, missing value 6
42 Wait Wait, Don't Tell Me… You're Using the Wrong Proc! David L. Cassell Statisticians and data analysts frequently have data sets which are difficult to analyze, with characteristics that break the underlying assumptions of the simpler analytical tools. But SAS has tools to handle more complex problems. And, now that SAS has survey analysis procedures, there's no longer a need to pretend that survey samples should be analyzed using non-survey design tools. Now that large databases are commonly sampled for marketing, data mining, and scientific research, the need to use survey analysis procedures is increasing. In this paper, we'll look at several common situations and illustrate how the data are usually analyzed. Then we will show how the data ought to be analyzed using the SAS survey analysis procedures, and what the consequences of choosing the wrong procedures may be proc step, sample, proc calis, sample weight, proc surveyreg, regression analysis, confidence interval, proc glm, chi-square test, population, proc surveyfreq, proc surveylogistic, proc mixed, proc genmod, proc reg, logistic regression, proc surveymeans, degrees of freedom, logistic distribution, anova, estimate, random sampling, survey weight, proc means, cluster sampling, data science 11
43 When Good Looks Aren't Enough Lisa Eckler Have you ever looked over a SAS dataset or report you've prepared and concluded that it "looks good" or worse still, "good enough"? One of the great advantages SAS programming - the ease with which you can manipulate data - is also a potential hazard. It's far too easy to create something that's close, but not exactly correct. Beyond instinct or some sort of sniff test, how do you know that your results are correct? How can you prove it to others? As SAS programmers or users, we should be striving for clear and accurate data, not just "good enough" data. A SAS log showing no syntax or data errors or warnings and some reasonable numbers of observations is only a small step. This paper offers a common-sense approach to simple data validation, expanding on some of the most frequently used validation techniques. Some may consider these recommendations obvious. Experience has proven that they are obvious only if you follow them proc step, proc contents, proc compare, proc freq, data cleaning, quality assurance, sample 11

Back to Conf go 2008

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.