Creating a Macro Variable during DATA Step Execution

Overview

In many applications, you need to create macro variables during DATA step execution. You might need to create macro variables and to assign values to them based on the following:
  • data values in SAS data sets or in external files
  • programming logic
  • computed values.
For example, suppose you want to create a report that lists students who are enrolled in a specific course, according to data in the Sasuser.All data set. Suppose you want to include a footnote in your report to indicate whether any student fees are unpaid.
The following program uses SAS programming logic to determine which value is assigned to the macro variable foot. Then foot is referenced in the FOOTNOTE ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.