Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Use SAS Macros Judiciously

The SAS macro language is a very powerful tool. With SAS macros you can write dynamic SAS applications that are in essence SAS programs that write other SAS programs. Unfortunately, with such great power comes the potential for great abuse. [Pg.16]

The SAS macro language can be abused when it is used to such an extent that a SAS program becomes unreadable. A SAS macro can become unreadable when it is too dense with macro invocations, is poorly documented, or involves too many nested macro calls. For instance, examine the following SAS code. [Pg.16]

Program 1.8 Example of SAS Macro Code That You Should Not Write [Pg.16]

Perhaps this is valid SAS code, but there is no code documentation to tell the user what any of those macro variables or macro calls actually do. Upon further investigation, we may find that the %MAKECOD macro calls six other SAS macros in a nested fashion. Also, is a %RUN really necessary, or has the programmer developed one too many macros  [Pg.16]

Although the SAS code is valid and gets the job done, the following SAS code is better because it can handle unlimited subjectid while at the same time being less cumbersome to read. [Pg.17]


See other pages where Use SAS Macros Judiciously is mentioned: [Pg.1]    [Pg.16]   


SEARCH



Judiciously

SAED

SASS

© 2024 chempedia.info