Surviving the SAS Macro Jungle by Using Your Own Programming Toolkit - Kevin Russell, SAS
At just about any given time, there is a reality show on TV that shows someone trying to survive in a harsh environment by using just their wits. Although your environment might not be quite that harsh, maybe you feel you do not have all the tools you need to survive in the macro programming jungle. This presentation’s purpose is to provide you with more programming tools, to make life in the jungle a whole lot easier.
The ten items discussed here will expand your macro toolkit and enable you to thrive like never before. For example, the new DOSUBL function is the flint that will ignite your code and enable you to dynamically invoke your macro using DATA step logic. Another tool is the stored compiled macro facility, which can provide protection from the elements by enabling you to keep your code safe from prying eyes.
Also included is a discussion of the macro debugging system options, MLOGIC, SYMBOLGEN, and MPRINT. These options act as a compass to point you in the right direction. They can help guide you past a log riddled with errors to an error-free log that puts you back on the right path. CALL SYMPUTX, the new and improved version of CALL SYMPUT, can help you save steps. CALL SYMPUTX automatically converts a numeric value to character string and even automatically removes the resulting trailing blanks, saving you steps and getting you out of the jungle faster. These tools, along with macro comments, enhancements to %PUT, the MFILE system option, read-only macro variables, the IN operator, and SASHELP.VMACRO, help equip all macro programmers with the tools that they need to survive the macro jungle.
The ten items discussed here will expand your macro toolkit and enable you to thrive like never before. For example, the new DOSUBL function is the flint that will ignite your code and enable you to dynamically invoke your macro using DATA step logic. Another tool is the stored compiled macro facility, which can provide protection from the elements by enabling you to keep your code safe from prying eyes.
Also included is a discussion of the macro debugging system options, MLOGIC, SYMBOLGEN, and MPRINT. These options act as a compass to point you in the right direction. They can help guide you past a log riddled with errors to an error-free log that puts you back on the right path. CALL SYMPUTX, the new and improved version of CALL SYMPUT, can help you save steps. CALL SYMPUTX automatically converts a numeric value to character string and even automatically removes the resulting trailing blanks, saving you steps and getting you out of the jungle faster. These tools, along with macro comments, enhancements to %PUT, the MFILE system option, read-only macro variables, the IN operator, and SASHELP.VMACRO, help equip all macro programmers with the tools that they need to survive the macro jungle.
About the Presenter
Kevin Russell is a Technical Support Analyst in the Foundation SAS group in Technical Support. He has been a SAS user since 1994. His main area of expertise is the macro language, but provides general support for the DATA step and Base procedures. He has written multiple papers and presented them at various SAS conferences and user events.
|