Tips for the lazy typist (and other strategies for smart coding)

Melissa R. Pfeiffer1 and Kristi Metzger2
1Children’s Hospital of Philadelphia, 2Children's Hospital of Philadelphia


Time and experience are your best tools for developing your SAS coding prowess; experience includes both working on a variety of tasks and working with different programmers. Through our combined 40 years working with SAS, we have worked on a wide assortment of projects with different data management needs and collaborators. Through these experiences we have learned to employ techniques that reduce the likelihood of introducing errors into our coding, help identify errors when they do appear, and generally make our programming lives easier. These tips include strategies for dealing with a growing number of user-defined formats, employing keyboard macros and %include statements for commonly used code, establishing standardized naming conventions, using arrays and do loops to cut down on coding, and cleaning up our “WORK” space. We all become better programmers when we share tips and strategies; our hope is that the suggestions we share expand your programming repertoire.