Wed, Apr 13|
Do We Need Macros? & Do Which? Loop, Until or While? by Ronald J. Fehd
Two great talks by Ron Fehd, known throughout the SAS community as the 'Macro Maven.'
Time & Location
Apr 13, 2022, 12:00 PM – 1:00 PM EDT
Do we need Macros? An Essay on the Theory of Application Development
This paper examines the theoretical steps of applications development (ApDev) of routines and subroutines. It compares and contrasts the benefits of using the %include statement versus macros. It examines the methods of calling subroutines, e.g., sql, call execute and macro loops. The purpose of this paper is to highlight the benefits of using macros to support unit and integration testing, and searching for and finding issues during maintenance.
Do Which? Loop, Until or While? A Review Of Data Step And Macro Algorithms
This paper reviews the three looping constructs: loop-repeat, do until and do while and offers examples of their use. The purpose of this paper is to provide both pseudo-code and examples so that programmers may understand the difference in logic and make an appropriate choice for their algorithm. The two data step loop processing verbs: continue (return to loop-top), and leave (exit) are illustrated. Macro examples using %goto are shown for continue and leave. The Whitlock subsetting loop — also known as the DoWhitlock (DOW) loop — and double-DOW are illustrated.
Ronald J. Fehd has a B.S. in Computer Science, and has attended SAS User Group conferences since 1989. Since 1996 he has presented over fourty papers on macro usage, programming theory or practice, and list processing. His 25 years of paid SAS experience include seventeen years as data manager, and seven years as tech support. He retired in 2012 and is writing a book on list processing using macros, sql, and scl. His screen name is 'macro maven'; his business card lists him as: Senior Maverick.