TT14
Post-processing MPRINT Outputs to Generate Macro-Free Code

Jim F Edgington, Quintiles, Inc.
Jay Zhou, Quintiles

Clinical trial programming necessarily involves extensive use of SAS macros to facilitate the process and reduce coding time. SAS macro programming creates difficulties for debugging, maintaining, and reviewing the code due to the complex nature of the lan guage, inherent with multifaceted macro routines. Therefore, regulatory authorities prefer to review straightforward and macro-free programs. SAS provides the MPRINT and MFILE (for V7 or above, RESERVEDB1 for V6.12) options with the MPRINT fileref to cre ate an ASCII file only containing the de-macroized source code for the purpose of debugging. But this must be done on an individual file basis with results in a rudimentary format. This paper presents a SAS macro, %Qdecode, that post-processes MPRINT res ults to create easy-to-read, executable SAS programs with a standard indentation pattern. The macro can process every file in a given directory to produce a macro-free program. The resulting program contains the program documentation header retained from the original program, certain comments, and all code necessary for a specific task. This allows quick client and regulatory review while maintaining ownership rights of proprietary programs.