This author has written several of these type of macros including one that creates a one observation data set containing the counts, percentages, and cumulative percentages of levels of a variable by levels of another variable. A possible drawback to using these macros to generate reports is the added CPU time needed to run them compared to SAS procedures. However, the programming time saved to write and modify report programs will likely offset any additional costs associated with the slower running of the program. The authors with to acknowledge the late Ron Schultz, whose many ideas from a report generating program written by him over a decade ago were incorporated in the above macros. SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries.
R indicates USA registration.
SASR has several procedures that generate reports, but only the PUT statement within a data step gives complete flexibility to placement of text and data values. However, data step processing and writing PUT statements is cumbersome to program. This paper describes a set of macros that produce customized reports that are easy to program and give complete flexibility to placement of text and data values. The user first defines columns and column widths across the report page. Items can be moved to single columns or to combined columns with the items automatically centered.