Chapter 2
SAS Programs and Macro
Processing
SAS Programs and Macro Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
How SAS Processes Statements without Macro Activity . . . . . . . . . . . . . . . . . . . . . 16
How SAS Processes Statements with Macro Activity . . . . . . . . . . . . . . . . . . . . . . . . 18
SAS Programs and Macro Processing
This section describes the typical pattern that SAS follows to process a program. These
concepts are helpful for understanding how the macro processor works with other parts
of SAS. However, they are not required for most macro programming. They are
provided so that you can understand what is going on behind the scenes.
Note: The concepts in this section present a logical representation, not a detailed
physical representation, of how SAS software works.
When you submit a program, it goes to an area of memory called the input stack. This is
true for all program and command sources: the SAS windowing environment, the SCL
SUBMIT block, the SCL COMPILE command, or from batch or noninteractive sessions.
The input stack shown in the following figure contains a simple SAS program that
displays sales data. The first line in the program is the top of the input stack.
15
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset