Data Management: Using Macros to Build a Dynamic Application

From sasCommunity
Jump to: navigation, search

Abstract

You have written a series of interesting and often complex SAS® programs that perform a variety of data entry operations, data checks, exception reporting, statistical analyses, and summary reporting. Since the next study is somewhat similar to the last one, you are planning to build another set of programs based on (cannibalized from) the ones that you just used.

We have been there before, but STOP. Wouldn't you rather build and validate the programs just once?

The solution lies in building and using data dictionaries that act as control files. These control files are in turn used to create a series of SAS macro variables that are available as arrays to each of the various programs. All project, data set, and variable specific information is stored in the macro variables and hence never in the programs themselves. Once implemented all the programs in your application become data independent.

Let them change the data. Let them redefine the project. Your code is ready.

Online Materials

View the pdf for File:AD21.pdf

You can also see the PDF of the PowerPoint Presentation.

Contact Info

Please check out my user page. You can also email me.