A Better Perspective of SASHELP Views

Size: px
Start display at page:

Download "A Better Perspective of SASHELP Views"

Transcription

1 Paper PO11 A Better Perspective of SASHELP Views John R. Gerlach, Independent Consultant; Hamilton, NJ Abstract SASHELP views provide a means to access all kinds of information about a SAS session. In fact, since their inclusion into SAS Version 6, these views, which utilize Dictionary tables, have become a very important aspect of any serious SAS application. And, not surprisingly, Version 9.0 greatly expands the collection of these meta-data, putting SAS on par with relational database environments. Unfortunately, this powerful font of dynamic information is not well understood nor often used, and even less appreciated. Perhaps if the views were conveyed in a relational context, rather than as discrete entities, the user might understand them better. Specifically, to address the question: How are SASHELP views related to each other and, even, to Dictionary tables? Not just as queries and data objects, but as relational entities. However, this approach requires the use of meta-data about meta-data. This paper explains SAS code that shows how to develop relational schemas about these views with the intent to attain a much better perspective of SASHELP views. Introduction SASHELP views are stored queries that access Dictionary tables, which are read-only objects that store dynamic information about a SAS session. These views are part of the SAS System and are stored in the SASHELP data library. Also, these same views can be used like any native query, unlike dictionary tables that are used only with PROC SQL. Since their introduction in Version 6, SASHELP views have become an important tool for SAS analysts who develop applications. Much of the information found in these data objects would be very difficult to obtain otherwise. Thus, it behooves the SAS professional to master this aspect of the SAS System. Before the advent of SASHELP views, it was possible to obtain meta-data by extracting pertinent information, for example, from the CONTENTS procedure. This older technique could be used to obtain the names of data sets in a data (e.g., WORK) library, as well as other useful information, such as: the name, data type, and length of variables, using the following code. proc contents data=work._all_ noprint out=meta(keep=memname name); To learn about SASHELP views, let s employ similar code, this time accessing only the views stored in the SASHELP data library, as follows. proc contents data=sashelp._all_ noprint out=views memtype=view; This time the result contains the names of all the views in the SASHELP library, along with their respective column names and other pertinent variables. A partial list follows. MEMNAME NAME TYPE LENGTH < Etc. > MLVIEW mldesc MLVIEW mlname 2 41 VCATALG alias 2 8 VCATALG created 1 8 VCATALG libname 2 8 VCATALG memname 2 32 VCATALG memtype 2 8

2 : : : : : : : : : : VTABLE reqvector 2 24 VTABLE reuse 2 3 VTABLE typemem 2 8 VTITLE number 1 8 VTITLE text VTITLE type 2 1 VVIEW engine 2 8 VVIEW libname 2 8 VVIEW memname 2 32 VVIEW memtype 2 8 Thus, it s easy to obtain the names of SASHELP views, as well as lots of other information. That s a good start to understanding these data objects; however, it would be nice to know the following: What is the relationship between two or more SASHELP views? What is the relationship between two or more SASHELP views and two or more Dictionary tables? These two questions pose an interesting problem in data processing, that is, to obtain meta-data about objects that represent meta-data. The desired report is in essence a relational schema about these objects. Keep in mind that these data objects do not contain data. Rather, these objects contain information about data; nonetheless, we need to process the data as if they were data sets. The desired report shows the collection of variables listed along with the other columns indicating the views, such that an asterisk indicates that the variable exists in the respective view, and a dash indicates otherwise. Below is an abstract of what the report would look like, which serves as a relational schema. NAME VIEW1 VIEW2 VIEW3 <Etc.> Var1 - * * Var2 * * - Var3 * * - : : : : Varn * - * For example, the following report shows the relationship between the SASHELP views: VTABLE, VSTABLE, and VSTABVW. Besides listing all the variable names found in the several views, it becomes readily apparent how these views are related. In fact, except for the variables LIBNAME and MEMNAME, these particular views have little in common. Despite their limited similar traits, certainly, one s understanding of these views is enhanced. NAME vtable vstable vstabvw bufsize * compress * crdate * datarep * delobs * encrypt * indxtype * libname * * * memlabel * memname * * * memtype * * modate * nobs *

3 : : : : : : : : npage * nvar * obslen * pcompress * protect * reqvector * reuse * typemem * As expressed earlier, the creation of the report above is not as easy as one might think. The problem is that you must collect meta-data on views that represent meta-data about a SAS session. Actually, the problem is solved handily, but only because of a simple idea that facilitates the acquisition of the meta-data. The Problem & Solution How do you obtain meta-data from a SASHELP view or a Dictionary table with the intent to produce a relational schema, as shown above? Think about it. What happens when you use Dictionary tables or SASHELP views? Well, depending on the data object (e.g., VTABLE) and the WHERE clause, you might get a lot of information about your SAS session. But, ironically, you re not really interested in such information. The objective is to get the meta-data about those data objects in order to produce a report that shows the relationships between these objects, such as: VTABLE, VTABLE, and VSTABVW. To illustrate this point, consider the following SQL step. from dictionary.tables; Depending on the installation of SAS (and version), you will get a data set that contains a lot of information about the session; but not the meta-data, specifically, the names of the columns, such as: LIBNAME, MEMNAME, etc., found in the TABLES Dictionary table. The column names are needed to determine the relationships between the several data objects. But, how do you get them? Since Dictionary tables are accessible only via the SQL procedure, let s consider using the INOBS=0 option, as follows. Consequently, you get a data set that contains zero observations and the appropriate variables. But, it generates a warning message indicating that the statement terminated early. proc sql inobs=0; from dictionary.tables; An alternative solution is to use the OBS option of the OPTIONS statement prior to the SQL step, as follows. from dictionary.tables; Once the meta data is obtained, the next step is to use the CONTENTS (the old method) or the SQL procedure, to generate a data set that contains the meta data. Keep in mind that the data set META_DATA contains zero observations. Also, keep in mind that the OBS options must be reset to MAX. Consider the following code employing the old technique.

4 proc contents data=meta_data out=meta_data noprint; And, the more modern code using SQL. Another Schema select name from dictionary.columns where libname eq WORK and memname eq META_DATA ; To increase our understanding of how Dictionary tables and SASHELP views are related, the following code utilizes TABLES and MEMBERS Dictionary tables, along with the VTABLE and VSTABLE views. Notice that the OPTIONS statement is used before and after the SQL step. Why? Because we re interested only in the meta-data; we don t want the code to rummage through the SAS session looking for instances of the meta-data. Rather, we wish to discern only the relationships between the sources of meta-data (e.g., MEMBERS and VSTABLE). In other words, at this point, we want data sets that contain zero observations and n-variables. create table tables as from dictionary.tables; create table members as from dictionary.members; create table vtable as from sashelp.vtable; create table vstable as from sashelp.vstable; However, after obtaining the meta data, the CONTENTS procedure, for example, can be used to process the four output empty data sets, thereby creating new data sets that contain an observation for each variable; thus the OBS option needs to be reset to MAX. Consequently, the new data sets can be merged via a Data step in order to produce the target data set, that is, the relational schema. Consider the following utility macro that generates the data sets that contain the column names, using the SQL procedure rather than use the CONTENTS procedure. The single input argument of the macro is the full name of a Dictionary table or a SASHELP view, and the output table is the name of that table or view. The macro contains two SQL statements: one that creates an empty data set from the query using the Dictionary table or SASHELP view, and the other statement creates the non-empty data set that contains one observation per variable found in the empty data set. %macro metadata(item); proc sql noprint; create table %scan(&item.,2) as from &item.;

5 create table %scan(&item.,2) as select name from dictionary.columns where libname eq 'WORK' and memname eq "%upcase(%scan(&item.,2))"; %mend metadata; %metadata(dictionary.members) %metadata(sashelp.vtable) After executing the %metadata macro twice, observe the SASLOG below. Notice that the data set MEMBERS and VTABLE contains zero observations, initially. Then, it contains six and twenty-one observations, respectively, denoting the number of variables in each data set. NOTE: Table WORK.MEMBERS created, with 0 rows and 6 columns. NOTE: Table WORK.MEMBERS created, with 6 rows and 1 columns. NOTE: PROCEDURE SQL used: real time cpu time NOTE: Table WORK.VTABLE created, with 0 rows and 21 columns. NOTE: Table WORK.VTABLE created, with 21 rows and 1 columns. NOTE: PROCEDURE SQL used: real time cpu time Notice that the second query inside the %metadata macro always uses the COLUMNS Dictionary table, which is the method used to obtain the meta-data on the empty data set, specifically the column names. Rather than use the COLUMNS Dictionary table, the CONTENTS procedure could have been used to achieve the same objective, as follows. proc contents data=vtable out=vtable(keep=name) noprint; proc contents data=vstable out=vstable(keep=name) noprint; Assume that the %metadata macro was executed on the Dictionary tables called TABLES and MEMBERS, and on the SASHELP views VTABLE and VSTABLE. The result would be four like-named data set each containing their respective variable (column) names. Let s merge these data set using the IN= data set option. The merge process gives us the union of all variables in the several data sets and the IN= data set option creates numeric flag variables that signify whether the variable exists in the respective data set. The result is a data set that contains the relational schema, as shown below. data rep; merge tables(in=d1) members(in=d2) vtable(in=d3) vstable(in=d4); by name; if d1 then tables = '*'; if d2 then members = '*'; if d3 then vtable = '*'; if d4 then vstable = '*';

6 COLUMN TABLES MEMBERS VTABLE VSTABLE bufsize * * compress * * crdate * * datarep * * delobs * * encrypt * * engine * index * indxtype * * libname * * * * memlabel * * memname * * * * memtype * * * modate * * nobs * * npage * * nvar * * obslen * * path * pcompress * * protect * * reqvector * * reuse * * typemem * * From the schema above, we notice that the Dictionary table TABLES and the SASHELP view VTABLE contain the same information. Notice also that the VSTABLE view contains only two columns: the library reference (LIBNAME) and the member name (MEMNAME). Generating a Full Relational Schema How do all the SASHELP views relate to each other? That is, how do you create a schema of all SASHELP views? Well, first we need to identify them and determine how many there are. Using the TABLES Dictionary table, the following SQL step easily identifies all SASHELP views and stores them in macro variables. This same information can be obtained by using the VIEWS Dictionary table, too. proc sql noprint; select left(put(count(memname),2.)) into :nviews from dictionary.tables where libname eq SASHELP and memtype eq VIEW ; select memname into :view1 :view&nviews. from dictionary.tables where libname eq SASHELP and memtype eq VIEW ; Once the macro variables (&nviews, &view1, ) exist, then the following macro, %viewmap, processes each view, and afterwards, merges the collection of data sets containing the meta-data producing a single data set that represents the schema. Try it. It works. %macro viewmap; %do i = 1 %to &nviews.; create table &&view&i.. as from sashelp.&&view&i..;

7 proc contents data=&&view&i.. out=&&view&i.(keep=name) noprint; %end; data rep; merge %do i = 1 %to &nviews.; &&view&i..(in=d&i.) %end; ; by name; %do i = 1 %to &nviews.; if d&i. then &&view&i.. = '*'; else &&view&i.. = '-'; %end; %mend viewmap; Conclusion This exercise affords a great opportunity to develop a better understanding of SASHELP views and Dictionary tables by understanding how these meta-data are related to each other. Author Information John R. Gerlach Independent Consultant Hamilton, NJ SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks or SAS Institute Inc. in the USA and other countries. indicates USA registration.

A Cross-reference for SAS Data Libraries

A Cross-reference for SAS Data Libraries A Cross-reference for SAS Data Libraries John R. Gerlach, Maxim Group, Plymouth Meeting, PA Cindy Garra, IMS HEALTH; Plymouth Meeting, PA Abstract SAS data libraries often resemble a relational model when

More information

Why Is This Subject Important? You Could Look It Up: An Introduction to SASHELP Dictionary Views. What Information is Listed in Dictionary Tables?

Why Is This Subject Important? You Could Look It Up: An Introduction to SASHELP Dictionary Views. What Information is Listed in Dictionary Tables? You Could Look It Up: An Introduction to SASHELP Dictionary Views Michael L. Davis Bassett Consulting Services, Inc. September 13, 2000 Why Is This Subject Important? many experienced SAS users have never

More information

The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data

The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data Paper PO31 The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data MaryAnne DePesquo Hope, Health Services Advisory Group, Phoenix, Arizona Fen Fen Li, Health Services Advisory Group,

More information

%whatchanged: A Tool for the Well-Behaved Macro

%whatchanged: A Tool for the Well-Behaved Macro Paper BB-01 %whatchanged: A Tool for the Well-Behaved Macro Frank DiIorio, CodeCrafters, Inc., Philadelphia PA The power and usefulness of macros is undeniable. Also above dispute is the ability of a poorly

More information

Exploring DICTIONARY Tables and SASHELP Views

Exploring DICTIONARY Tables and SASHELP Views Exploring DICTIONARY Tables and SASHELP Views Kirk Paul Lafler, Software Intelligence Corporation Abstract SAS users can quickly and conveniently obtain useful information about their SAS session with

More information

Validation Summary using SYSINFO

Validation Summary using SYSINFO Validation Summary using SYSINFO Srinivas Vanam Mahipal Vanam Shravani Vanam Percept Pharma Services, Bridgewater, NJ ABSTRACT This paper presents a macro that produces a Validation Summary using SYSINFO

More information

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables Paper 3458-2015 Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables ABSTRACT Louise Hadden, Abt Associates Inc., Cambridge, MA SAS provides a wealth of resources for users to

More information

David Ghan SAS Education

David Ghan SAS Education David Ghan SAS Education 416 307-4515 David.ghan@sas.com Using SQL in SAS Victoria Area SAS User Group February 12, 2004 1. What is SQL? 2. Coding an SQL Query 3. Advanced Examples a. Creating macro variables

More information

You Could Look It Up: An Introduction to SASHELP Dictionary Views

You Could Look It Up: An Introduction to SASHELP Dictionary Views You Could Look It Up: An Introduction to SASHELP Dictionary Views Michael Davis, Bassett Consulting Services, North Haven, Connecticut ABSTRACT Ever wonder what titles were already set in a batch SAS session?

More information

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research ABSTRACT In the course of producing a report for a clinical trial numerous drafts

More information

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

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

More information

Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee

Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee ABSTRACT PharmaSUG2012 Paper CC14 Quick Data Definitions Using SQL, REPORT and PRINT Procedures Bradford J. Danner, PharmaNet/i3, Tennessee Prior to undertaking analysis of clinical trial data, in addition

More information

SCL Lists. Introduction CHAPTER 5

SCL Lists. Introduction CHAPTER 5 47 CHAPTER 5 SCL Lists Introduction 47 Creating Data Dynamically 48 Identifying SCL Lists 48 Creating New Lists 48 Example: Creating an SCL List 49 Initializing the Values in a List 51 Manipulating SCL

More information

How to Create Data-Driven Lists

How to Create Data-Driven Lists Paper 9540-2016 How to Create Data-Driven Lists Kate Burnett-Isaacs, Statistics Canada ABSTRACT As SAS programmers we often want our code or program logic to be driven by the data at hand, rather than

More information

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010 Tips & Tricks With lots of help from other SUG and SUGI presenters 1 SAS HUG Meeting, November 18, 2010 2 3 Sorting Threads Multi-threading available if your computer has more than one processor (CPU)

More information

SQL Metadata Applications: I Hate Typing

SQL Metadata Applications: I Hate Typing SQL Metadata Applications: I Hate Typing Hannah Fresques, MDRC, New York, NY ABSTRACT This paper covers basics of metadata in SQL and provides useful applications, including: finding variables on one or

More information

WHAT ARE SASHELP VIEWS?

WHAT ARE SASHELP VIEWS? Paper PN13 There and Back Again: Navigating between a SASHELP View and the Real World Anita Rocha, Center for Studies in Demography and Ecology University of Washington, Seattle, WA ABSTRACT A real strength

More information

Dictionary.coumns is your friend while appending or moving data

Dictionary.coumns is your friend while appending or moving data ABSTRACT SESUG Paper CC-41-2017 Dictionary.coumns is your friend while appending or moving data Kiran Venna, Dataspace Inc. Dictionary.columns is a dictionary table, which gives metadata information of

More information

Sample Questions. SAS Advanced Programming for SAS 9. Question 1. Question 2

Sample Questions. SAS Advanced Programming for SAS 9. Question 1. Question 2 Sample Questions The following sample questions are not inclusive and do not necessarily represent all of the types of questions that comprise the exams. The questions are not designed to assess an individual's

More information

Paper SE04 Dynamic SAS Programming Techniques, or How NOT to Create Job Security Steven Beakley and Suzanne McCoy

Paper SE04 Dynamic SAS Programming Techniques, or How NOT to Create Job Security Steven Beakley and Suzanne McCoy Introduction Paper SE04 Dynamic SAS Programming Techniques, or How NOT to Create Job Security Steven Beakley and Suzanne McCoy Many SAS programmers, particularly consultants, joke about creating job security

More information

Uncommon Techniques for Common Variables

Uncommon Techniques for Common Variables Paper 11863-2016 Uncommon Techniques for Common Variables Christopher J. Bost, MDRC, New York, NY ABSTRACT If a variable occurs in more than one data set being merged, the last value (from the variable

More information

SAS Certification Handout #10: Adv. Prog. Ch. 5-8

SAS Certification Handout #10: Adv. Prog. Ch. 5-8 SAS Certification Handout #10: Adv. Prog. Ch. 5-8 /************ Ch. 5 ******************* /* First, make example data -- same as Handout #9 libname cert 'C:/jrstevens/Teaching/SAS_Cert/AdvNotes'; /* In

More information

Create Metadata Documentation using ExcelXP

Create Metadata Documentation using ExcelXP Paper AD13 Create Metadata Documentation using ExcelXP Christine Teng, Merck Research Labs, Merck & Co., Inc., Rahway, NJ ABSTRACT The purpose of the metadata documentation is two-fold. First, it facilitates

More information

Know Thy Data : Techniques for Data Exploration

Know Thy Data : Techniques for Data Exploration Know Thy Data : Techniques for Data Exploration Montreal SAS Users Group Wednesday, 29 May 2018 13:50-14:30 PM Andrew T. Kuligowski, Charu Shankar AGENDA Part 1- Easy Ways to know your data Part 2 - Powerful

More information

Posters. Workarounds for SASWare Ballot Items Jack Hamilton, First Health, West Sacramento, California USA. Paper

Posters. Workarounds for SASWare Ballot Items Jack Hamilton, First Health, West Sacramento, California USA. Paper Paper 223-25 Workarounds for SASWare Ballot Items Jack Hamilton, First Health, West Sacramento, California USA ABSTRACT As part of its effort to insure that SAS Software is useful to its users, SAS Institute

More information

Facilitating Data Integration for Regulatory Submissions

Facilitating Data Integration for Regulatory Submissions SCSUG2010 Facilitating Data Integration for Regulatory Submissions John R. Gerlach, SAS / CDISC Analyst, Hamilton, NJ John C. Bowen (Retired), Merck & Co., Rahway, NJ ABSTRACT The process of integrating

More information

SAS Programming Techniques for Manipulating Metadata on the Database Level Chris Speck, PAREXEL International, Durham, NC

SAS Programming Techniques for Manipulating Metadata on the Database Level Chris Speck, PAREXEL International, Durham, NC PharmaSUG2010 - Paper TT06 SAS Programming Techniques for Manipulating Metadata on the Database Level Chris Speck, PAREXEL International, Durham, NC ABSTRACT One great leap that beginning and intermediate

More information

Tales from the Help Desk 6: Solutions to Common SAS Tasks

Tales from the Help Desk 6: Solutions to Common SAS Tasks SESUG 2015 ABSTRACT Paper BB-72 Tales from the Help Desk 6: Solutions to Common SAS Tasks Bruce Gilsen, Federal Reserve Board, Washington, DC In 30 years as a SAS consultant at the Federal Reserve Board,

More information

Simple Rules to Remember When Working with Indexes

Simple Rules to Remember When Working with Indexes Simple Rules to Remember When Working with Indexes Kirk Paul Lafler, Software Intelligence Corporation, Spring Valley, CA Abstract SAS users are always interested in learning techniques related to improving

More information

Dictionary Tables and Views: Essential Tools for Serious Applications

Dictionary Tables and Views: Essential Tools for Serious Applications Dictionary Tables and Views: Essential Tools for Serious Applications Frank DiIorio, CodeCrafters, Inc., Chapel Hill NC Jeff Abolafia, Rho, Inc., Chapel Hill NC INTRODUCTION Dictionary tables were introduced

More information

MOBILE MACROS GET UP TO SPEED SOMEWHERE NEW FAST Author: Patricia Hettinger, Data Analyst Consultant Oakbrook Terrace, IL

MOBILE MACROS GET UP TO SPEED SOMEWHERE NEW FAST Author: Patricia Hettinger, Data Analyst Consultant Oakbrook Terrace, IL MOBILE MACROS GET UP TO SPEED SOMEWHERE NEW FAST Author: Patricia Hettinger, Data Analyst Consultant Oakbrook Terrace, IL ABSTRACT: Have you ever been faced with this scenario? It s your first day on the

More information

A Hands-on Introduction to SAS Dictionary Tables

A Hands-on Introduction to SAS Dictionary Tables Paper HW10-2014 A Hands-on Introduction to SAS Dictionary Tables Peter Eberhardt, Fernwood Consulting Group Inc., Toronto Canada ABSTRACT SAS maintains a wealth of information about the active SAS session,

More information

Paper S Data Presentation 101: An Analyst s Perspective

Paper S Data Presentation 101: An Analyst s Perspective Paper S1-12-2013 Data Presentation 101: An Analyst s Perspective Deanna Chyn, University of Michigan, Ann Arbor, MI Anca Tilea, University of Michigan, Ann Arbor, MI ABSTRACT You are done with the tedious

More information

An Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step Mike Zdeb, FSL, University at Albany School of Public Health, Rensselaer, NY

An Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step Mike Zdeb, FSL, University at Albany School of Public Health, Rensselaer, NY SESUG 2016 Paper BB-170 An Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step Mike Zdeb, FSL, University at Albany School of Public Health, Rensselaer, NY ABSTRACT A first step in analyzing

More information

Greenspace: A Macro to Improve a SAS Data Set Footprint

Greenspace: A Macro to Improve a SAS Data Set Footprint Paper AD-150 Greenspace: A Macro to Improve a SAS Data Set Footprint Brian Varney, Experis Business Intelligence and Analytics Practice ABSTRACT SAS programs can be very I/O intensive. SAS data sets with

More information

Abstract. Introduction. How Are All of These Tables Related? - Relational Database Map - RDB_MAP.SAS

Abstract. Introduction. How Are All of These Tables Related? - Relational Database Map - RDB_MAP.SAS How Are All of These Tables Related? - Relational Database Map - RDB_MAPSAS Eric Losby, HealthCare COMPARE Corp, Downers Grove, IL Abstract This simple, yet highly useful SAS program generates a "relational

More information

ABSTRACT INTRODUCTION THE GENERAL FORM AND SIMPLE CODE

ABSTRACT INTRODUCTION THE GENERAL FORM AND SIMPLE CODE Paper SA06 Painless Extraction: Options and Macros with PROC PRESENV Keith Fredlund, MS (candidate) Grand Valley State University, Allendale, Michigan; Thinzar Wai, MS (candidate) Grand Valley State University,

More information

ABSTRACT. Paper CC-031

ABSTRACT. Paper CC-031 Paper CC-031 Using Functions SYSFUNC and IFC to Conditionally Execute Statements in Open Code Ronald J. Fehd, Centers for Disease Control and Prevention, Atlanta, GA, USA ABSTRACT Audience Keywords Information

More information

BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI

BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI Paper BI09-2012 BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI ABSTRACT Enterprise Guide is not just a fancy program editor! EG offers a whole new window onto

More information

An SQL Tutorial Some Random Tips

An SQL Tutorial Some Random Tips An SQL Tutorial Some Random Tips Presented by Jens Dahl Mikkelsen SAS Institute A/S Author: Paul Kent SAS Institute Inc, Cary, NC. Short Stories Towards a Better UNION Outer Joins. More than two too. Logical

More information

ERROR: The following columns were not found in the contributing table: vacation_allowed

ERROR: The following columns were not found in the contributing table: vacation_allowed Page 1 I DIDN T KNOW YOU COULD DO THAT! REVELATIONS FROM THE ADVANCED SAS CERTIFICATION EXAM Patricia Hettinger, Certified SAS Professional, Oakbrook Terrace, IL ABSTRACT Many people have extreme test

More information

SAS/Warehouse Administrator Usage and Enhancements Terry Lewis, SAS Institute Inc., Cary, NC

SAS/Warehouse Administrator Usage and Enhancements Terry Lewis, SAS Institute Inc., Cary, NC SAS/Warehouse Administrator Usage and Enhancements Terry Lewis, SAS Institute Inc., Cary, NC ABSTRACT SAS/Warehouse Administrator software makes it easier to build, maintain, and access data warehouses

More information

SAS Data Integration Studio Take Control with Conditional & Looping Transformations

SAS Data Integration Studio Take Control with Conditional & Looping Transformations Paper 1179-2017 SAS Data Integration Studio Take Control with Conditional & Looping Transformations Harry Droogendyk, Stratia Consulting Inc. ABSTRACT SAS Data Integration Studio jobs are not always linear.

More information

SAS Viya 3.1 FAQ for Processing UTF-8 Data

SAS Viya 3.1 FAQ for Processing UTF-8 Data SAS Viya 3.1 FAQ for Processing UTF-8 Data Troubleshooting Tips for Processing UTF-8 Data (Existing SAS Code) What Is the Encoding of My Data Set? PROC CONTENTS displays information about the data set

More information

SAS File Management. Improving Performance CHAPTER 37

SAS File Management. Improving Performance CHAPTER 37 519 CHAPTER 37 SAS File Management Improving Performance 519 Moving SAS Files Between Operating Environments 520 Converting SAS Files 520 Repairing Damaged Files 520 Recovering SAS Data Files 521 Recovering

More information

Autocall Macros A Quick Overview

Autocall Macros A Quick Overview Paper P005 Autocall Macros A Quick Overview Vinod Panangattiri Parambil, Roche Products Ltd, Welwyn Garden City, United Kingdom AUTOCALL MACRO Autocall macro is a facility within the SAS system in order

More information

Why choose between SAS Data Step and PROC SQL when you can have both?

Why choose between SAS Data Step and PROC SQL when you can have both? Paper QT-09 Why choose between SAS Data Step and PROC SQL when you can have both? Charu Shankar, SAS Canada ABSTRACT As a SAS coder, you've often wondered what the SQL buzz is about. Or vice versa you

More information

SAS/ACCESS Interface to R/3

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

More information

PharmaSUG Paper TT11

PharmaSUG Paper TT11 PharmaSUG 2014 - Paper TT11 What is the Definition of Global On-Demand Reporting within the Pharmaceutical Industry? Eric Kammer, Novartis Pharmaceuticals Corporation, East Hanover, NJ ABSTRACT It is not

More information

Best Practice for Creation and Maintenance of a SAS Infrastructure

Best Practice for Creation and Maintenance of a SAS Infrastructure Paper 2501-2015 Best Practice for Creation and Maintenance of a SAS Infrastructure Paul Thomas, ASUP Ltd. ABSTRACT The advantage of using metadata to control and maintain data and access to data on databases,

More information

Tracking Dataset Dependencies in Clinical Trials Reporting

Tracking Dataset Dependencies in Clinical Trials Reporting Tracking Dataset Dependencies in Clinical Trials Reporting Binoy Varghese, Cybrid Inc., Wormleysburg, PA Satyanarayana Mogallapu, IT America Inc., Edison, NJ ABSTRACT Most clinical trials study reporting

More information

SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD

SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD Paper BB-7 SAS Macro Dynamics - From Simple Basics to Powerful Invocations Rick Andrews, Office of the Actuary, CMS, Baltimore, MD ABSTRACT The SAS Macro Facility offers a mechanism for expanding and customizing

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information

Tired of CALL EXECUTE? Try DOSUBL

Tired of CALL EXECUTE? Try DOSUBL ABSTRACT SESUG Paper BB-132-2017 Tired of CALL EXECUTE? Try DOSUBL Jueru Fan, PPD, Morrisville, NC DOSUBL was first introduced as a function in SAS V9.3. It enables the immediate execution of SAS code

More information

Taming a Spreadsheet Importation Monster

Taming a Spreadsheet Importation Monster SESUG 2013 Paper BtB-10 Taming a Spreadsheet Importation Monster Nat Wooding, J. Sargeant Reynolds Community College ABSTRACT As many programmers have learned to their chagrin, it can be easy to read Excel

More information

MedDRA Dictionary: Reporting Version Updates Using SAS and Excel

MedDRA Dictionary: Reporting Version Updates Using SAS and Excel MedDRA Dictionary: Reporting Version Updates Using SAS and Excel Richard Zhou, Johnson & Johnson Pharmaceutical Research and Development, L.L.C Denis Michel, Johnson & Johnson Pharmaceutical Research and

More information

Arthur L. Carpenter California Occidental Consultants, Oceanside, California

Arthur L. Carpenter California Occidental Consultants, Oceanside, California Paper 028-30 Storing and Using a List of Values in a Macro Variable Arthur L. Carpenter California Occidental Consultants, Oceanside, California ABSTRACT When using the macro language it is not at all

More information

A Simple Time Series Macro Scott Hanson, SVP Risk Management, Bank of America, Calabasas, CA

A Simple Time Series Macro Scott Hanson, SVP Risk Management, Bank of America, Calabasas, CA A Simple Time Series Macro Scott Hanson, SVP Risk Management, Bank of America, Calabasas, CA ABSTRACT One desirable aim within the financial industry is to understand customer behavior over time. Despite

More information

Generating Homeomorphically Irreducible Trees (Solving the Blackboard Problem in the Movie Good Will Hunting )

Generating Homeomorphically Irreducible Trees (Solving the Blackboard Problem in the Movie Good Will Hunting ) PharmaSUG 2017 Paper AD11 Generating Homeomorphically Irreducible Trees (Solving the Blackboard Problem in the Movie Good Will Hunting ) John R Gerlach, Dataceutics, Inc., Pottstown, PA USA ABSTRACT In

More information

The %let is a Macro command, which sets a macro variable to the value specified.

The %let is a Macro command, which sets a macro variable to the value specified. Paper 220-26 Structuring Base SAS for Easy Maintenance Gary E. Schlegelmilch, U.S. Dept. of Commerce, Bureau of the Census, Suitland MD ABSTRACT Computer programs, by their very nature, are built to be

More information

From Manual to Automatic with Overdrive - Using SAS to Automate Report Generation Faron Kincheloe, Baylor University, Waco, TX

From Manual to Automatic with Overdrive - Using SAS to Automate Report Generation Faron Kincheloe, Baylor University, Waco, TX Paper 152-27 From Manual to Automatic with Overdrive - Using SAS to Automate Report Generation Faron Kincheloe, Baylor University, Waco, TX ABSTRACT This paper is a case study of how SAS products were

More information

Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment

Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment Introduction This document describes how to set up the SAS Scalable Performance Data Server, SPD Server, to run

More information

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc. PharmaSUG2011 - Paper DM03 Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc., TX ABSTRACT In the Clinical trials data analysis

More information

Surfing the SAS cache

Surfing the SAS cache Surfing the SAS cache to improve optimisation Michael Thompson Department of Employment / Quantam Solutions Background Did first basic SAS course in 1989 Didn t get it at all Actively avoided SAS programing

More information

Useful Tips When Deploying SAS Code in a Production Environment

Useful Tips When Deploying SAS Code in a Production Environment Paper SAS258-2014 Useful Tips When Deploying SAS Code in a Production Environment ABSTRACT Elena Shtern, SAS Institute Inc., Arlington, VA When deploying SAS code into a production environment, a programmer

More information

Using PROC FCMP to the Fullest: Getting Started and Doing More

Using PROC FCMP to the Fullest: Getting Started and Doing More Paper 2403-2018 Using PROC FCMP to the Fullest: Getting Started and Doing More Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT The FCMP procedure is used to create user defined

More information

Using a Control Dataset to Manage Production Compiled Macro Library Curtis E. Reid, Bureau of Labor Statistics, Washington, DC

Using a Control Dataset to Manage Production Compiled Macro Library Curtis E. Reid, Bureau of Labor Statistics, Washington, DC AP06 Using a Control Dataset to Manage Production Compiled Macro Library Curtis E. Reid, Bureau of Labor Statistics, Washington, DC ABSTRACT By default, SAS compiles and stores all macros into the WORK

More information

Accelerating Production of Safety TFLs in Bioequivalence and Early Phase Denis Martineau, Algorithme Pharma, Laval, Quebec, Canada

Accelerating Production of Safety TFLs in Bioequivalence and Early Phase Denis Martineau, Algorithme Pharma, Laval, Quebec, Canada PharmaSUG 2015 - Paper QT32 Accelerating Production of Safety TFLs in Bioequivalence and Early Phase Denis Martineau, Algorithme Pharma, Laval, Quebec, Canada ABSTRACT This paper discusses the main steps

More information

Using PROC FCMP to the Fullest: Getting Started and Doing More

Using PROC FCMP to the Fullest: Getting Started and Doing More Paper HT02-2013 Using PROC FCMP to the Fullest: Getting Started and Doing More Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT The FCMP procedure is used to create user defined

More information

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency.

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency. Paper 76-28 Comparative Efficiency of SQL and Base Code When Reading from Database Tables and Existing Data Sets Steven Feder, Federal Reserve Board, Washington, D.C. ABSTRACT In this paper we compare

More information

The Missing Semicolon

The Missing Semicolon The Missing Semicolon TECHNICAL ASSISTANCE FOR THE SAS SOFTWARE PROFESSIONAL Volume 3, Number 3 July, 2000 DICTIONARY TABLES - DATA ABOUT YOUR DATA A component was added in SAS Version 6.07 called dictionary

More information

Introduction / Overview

Introduction / Overview Paper # SC18 Exploring SAS Generation Data Sets Kirk Paul Lafler, Software Intelligence Corporation Abstract Users have at their disposal a unique and powerful feature for retaining historical copies of

More information

Extending the Scope of Custom Transformations

Extending the Scope of Custom Transformations Paper 3306-2015 Extending the Scope of Custom Transformations Emre G. SARICICEK, The University of North Carolina at Chapel Hill. ABSTRACT Building and maintaining a data warehouse can require complex

More information

Developing Data-Driven SAS Programs Using Proc Contents

Developing Data-Driven SAS Programs Using Proc Contents Developing Data-Driven SAS Programs Using Proc Contents Robert W. Graebner, Quintiles, Inc., Kansas City, MO ABSTRACT It is often desirable to write SAS programs that adapt to different data set structures

More information

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE Handy Tips for the Savvy Programmer SAS PROGRAMMING BEST PRACTICES Create Readable Code Basic Coding Recommendations» Efficiently choosing data for processing»

More information

Top Coding Tips. Neil Merchant Technical Specialist - SAS

Top Coding Tips. Neil Merchant Technical Specialist - SAS Top Coding Tips Neil Merchant Technical Specialist - SAS Bio Work in the ANSWERS team at SAS o Analytics as a Service and Visual Analytics Try before you buy SAS user for 12 years obase SAS and O/S integration

More information

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

It s not the Yellow Brick Road but the SAS PC FILES SERVER will take you Down the LIBNAME PATH= to Using the 64-Bit Excel Workbooks. Paper FP_82 It s not the Yellow Brick Road but the SAS PC FILES SERVER will take you Down the LIBNAME PATH= to Using the 64-Bit Excel Workbooks. ABSTRACT William E Benjamin Jr, Owl Computer Consultancy,

More information

How to Keep Multiple Formats in One Variable after Transpose Mindy Wang

How to Keep Multiple Formats in One Variable after Transpose Mindy Wang How to Keep Multiple Formats in One Variable after Transpose Mindy Wang Abstract In clinical trials and many other research fields, proc transpose are used very often. When many variables with their individual

More information

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO ABSTRACT The power of SAS programming can at times be greatly improved using PROC SQL statements for formatting and manipulating

More information

Efficient Processing of Long Lists of Variable Names

Efficient Processing of Long Lists of Variable Names Efficient Processing of Long Lists of Variable Names Paulette W. Staum, Paul Waldron Consulting, West Nyack, NY ABSTRACT Many programmers use SAS macro language to manipulate lists of variable names. They

More information

Program Validation: Logging the Log

Program Validation: Logging the Log Program Validation: Logging the Log Adel Fahmy, Symbiance Inc., Princeton, NJ ABSTRACT Program Validation includes checking both program Log and Logic. The program Log should be clear of any system Error/Warning

More information

New Vs. Old Under the Hood with Procs CONTENTS and COMPARE Patricia Hettinger, SAS Professional, Oakbrook Terrace, IL

New Vs. Old Under the Hood with Procs CONTENTS and COMPARE Patricia Hettinger, SAS Professional, Oakbrook Terrace, IL Paper SS-03 New Vs. Old Under the Hood with Procs CONTENTS and COMPARE Patricia Hettinger, SAS Professional, Oakbrook Terrace, IL ABSTRACT There s SuperCE for comparing text files on the mainframe. Diff

More information

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN Paper 045-29 A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN ABSTRACT: PROC MEANS analyzes datasets according to the variables listed in its Class

More information

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ CC13 An Automatic Process to Compare Files Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ ABSTRACT Comparing different versions of output files is often performed

More information

Paper B GENERATING A DATASET COMPRISED OF CUSTOM FORMAT DETAILS

Paper B GENERATING A DATASET COMPRISED OF CUSTOM FORMAT DETAILS Paper B07-2009 Eliminating Redundant Custom Formats (or How to Really Take Advantage of Proc SQL, Proc Catalog, and the Data Step) Philip A. Wright, University of Michigan, Ann Arbor, MI ABSTRACT Custom

More information

Top 5 Handy PROC SQL Tips You Didn t Think Were Possible

Top 5 Handy PROC SQL Tips You Didn t Think Were Possible Top 5 Handy PROC SQL Tips You Didn t Think Were Possible Montreal SAS users Group 30 May 2018 11:00-11:40 Charu Shankar SAS Institute, Toronto About your presenter SAS Senior Technical Training Specialist,

More information

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Bruce Gilsen, Federal Reserve Board, Washington, DC ABSTRACT SAS Versions 9.2 and 9.3 contain many interesting

More information

Considerations of Analysis of Healthcare Claims Data

Considerations of Analysis of Healthcare Claims Data Considerations of Analysis of Healthcare Claims Data ABSTRACT Healthcare related data is estimated to grow exponentially over the next few years, especially with the growing adaptation of electronic medical

More information

SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD

SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD ABSTRACT CODERS CORNER SAS Macro Dynamics: from Simple Basics to Powerful Invocations Rick Andrews, Office of Research, Development, and Information, Baltimore, MD The SAS Macro Facility offers a mechanism

More information

A SAS Programmer's Guide to Project- and Program-Level Quality Control Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD

A SAS Programmer's Guide to Project- and Program-Level Quality Control Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD A SAS Programmer's Guide to Project- and Program-Level Quality Control Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD ABSTRACT The focus of this paper is how to save time and money

More information

Macro Architecture in Pictures Mark Tabladillo PhD, marktab Consulting, Atlanta, GA Associate Faculty, University of Phoenix

Macro Architecture in Pictures Mark Tabladillo PhD, marktab Consulting, Atlanta, GA Associate Faculty, University of Phoenix Paper PS16_05 Macro Architecture in Pictures Mark Tabladillo PhD, marktab Consulting, Atlanta, GA Associate Faculty, University of Phoenix ABSTRACT The qualities which SAS macros share with object-oriented

More information

Using Data Set Options in PROC SQL Kenneth W. Borowiak Howard M. Proskin & Associates, Inc., Rochester, NY

Using Data Set Options in PROC SQL Kenneth W. Borowiak Howard M. Proskin & Associates, Inc., Rochester, NY Using Data Set Options in PROC SQL Kenneth W. Borowiak Howard M. Proskin & Associates, Inc., Rochester, NY ABSTRACT Data set options are an often over-looked feature when querying and manipulating SAS

More information

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System %MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System Rushi Patel, Creative Information Technology, Inc., Arlington, VA ABSTRACT It is common to find

More information

MIS Reporting in the Credit Card Industry

MIS Reporting in the Credit Card Industry MIS Reporting in the Credit Card Industry Tom Hotard, Acxiom Corporation ABSTRACT In credit card acquisition campaigns, it is important to have the ability to keep track of various types of counts. After

More information

Know What You Are Missing: How to Catalogue and Manage Missing Pieces of Historical Data

Know What You Are Missing: How to Catalogue and Manage Missing Pieces of Historical Data Know What You Are Missing: How to Catalogue and Manage Missing Pieces of Historical Data Shankar Yaddanapudi, SAS Consultant, Washington DC ABSTRACT In certain applications it is necessary to maintain

More information

Run your reports through that last loop to standardize the presentation attributes

Run your reports through that last loop to standardize the presentation attributes PharmaSUG2011 - Paper TT14 Run your reports through that last loop to standardize the presentation attributes Niraj J. Pandya, Element Technologies Inc., NJ ABSTRACT Post Processing of the report could

More information

Version 1.4 Paribus Discovery for Microsoft Dynamics CRM User Guide

Version 1.4 Paribus Discovery for Microsoft Dynamics CRM User Guide Version 1.4 Paribus Discovery for Microsoft Dynamics CRM User Guide Document Version 1.3 Release Date: September 2011 QGate Software Limited D2 Fareham Heights, Standard Way, Fareham Hampshire, PO16 8XT

More information

A SAS Macro to Create Validation Summary of Dataset Report

A SAS Macro to Create Validation Summary of Dataset Report ABSTRACT PharmaSUG 2018 Paper EP-25 A SAS Macro to Create Validation Summary of Dataset Report Zemin Zeng, Sanofi, Bridgewater, NJ This paper will introduce a short SAS macro developed at work to create

More information

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need ABSTRACT Paper PO 133 PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need Imelda C. Go, South Carolina Department of Education, Columbia,

More information

Calculating Cardinality Ratio in Two Steps

Calculating Cardinality Ratio in Two Steps MWSUG 2016 Paper TT03 Calculating Cardinality Ratio in Two Steps Ronald J. Fehd, Stakana Analytics Abstract Description: Purpose: Audience: Keywords: The cardinality of a set is the number of elements

More information