Dusia.com's PTrans SAS Macros

What is PTrans?

"PTrans is a simple SAS® Macro framework for applying traditional sequential processes (reformat, edits, imputation, etc.) to a hierarchical group of SAS data sets. Using a series of macros, you define the data set hierarchy or a subset of that hierarchy. The macros transform all data sets under the top level of the hierarchy, creating top-level views of these data sets. Inside the process data step(s) another series of macros build the hierarchy-related portions of the data statement, all array statements referencing variables from transformed data sets, and the merge and output statements that reference the hierarchy data sets. After the processing data step(s) a final macro reverts the transformed data to its original format and updates the original data set(s). This framework isolates the complexity of relating the data sets from the complexity of the actual process, it maintains the data set hierarchy, eliminates the need for any post-process processing (all output data sets are complete at the end of the processing framework), and allows access to data at peer levels of the hierarchy."


Contents


PTrans SAS Macro Code

ReleaseDateFiles
1.1.01 October 31, 2007

Sample Programs

  • simpsons.sas Explore the job history of America's favorite television family, all in your PDV at once!

Papers

Partially Transforming Hierarchical
Data Sets for Sequential Processing
Using Arrays
Richard L. Downs, Jr. and Pura A. Peréz
U.S. Census Bureau