Inadequate finishes


Andrew Ratcliffe posted a fine article titled "Inadequate Mends" in which he extols the benefits of including the name of a macro on the %MEND statement. That is, if you create a macro function named foo, he recommends that you include the name in two places:

%macro foo(x);
   /** define the macro function **/
%mend foo;

Did you know that the same option exists for SAS/IML modules? That is, if you want to be explicitly clear that you are ending a particular module definition, you can include the name of the module on the FINISH statement:

proc iml;
start foo(x);
   /** define the SAS/IML module **/
finish foo;

About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.

Leave A Reply

Back to Top