BookmarkSubscribeRSS Feed

SAS Tutorial: Beyond the Basics with SAS Macro

Started ‎05-14-2025 by
Modified ‎05-14-2025 by
Views 1,289

Do you use programs containing ampersands and percent signs? If so, you are using SAS macros.

 

The macro facility allows you to perform text substitution using macro variables and macro programs. Macros make life easier for the programmer by automating and customizing the generation of SAS code.

 

In this SAS tutorial, John will demonstrate a basic understanding of the macro facility by starting with a review of the %LET statement, CALL SYMPUTX routine, INTO clause, macro conditional and iterative processing statements and macro program syntax. He will also discuss double periods, multiple ampersands, macro quoting and the macro IN operator. He’ll wrap up with examples of I/O functions, dictionary tables, the DOSUBL function and branching within a macro program.

 

 

Note: First shared online during the virtual SAS Global Forum 2020 conference, this tutorial is extremely popular among those who need to learn or refresh their SAS macro skills!

Version history
Last update:
‎05-14-2025 08:58 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags