As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


A Lazy Programmer Case Study: Dynamic Macro Code To Deal With Changing Number Of Variables Over Time

From sasCommunity
Jump to: navigation, search

Abstract

The U.S. Census Bureau performs an annual data collection for the National Center for Education Statistics. As part of the file documentation, the Census Bureau produces a summary table that shows the minimum, maximum, and mean value for each continuous variable, along with the number of records that have a value greater than or equal to zero, the number of records with missing values, and the number of records with “not applicable” values.

The number of data items collected can change each year. A true lazy programmer will write code that can automatically accommodate such changes. This case study shows how we use the SASHELP.VCOLUMN view and CALL SYMPUTX to write a program that can be reused every year with minimal changes. This paper assumes that the reader has an intermediate understanding of SAS® macros and the DATA step.

Online materials

The NESUG 2007 paper
Zip file with data, SAS code, and output

Contact Info

Suzanne.Marie.Dorinski@census.gov


Suzanne's user page