The macro language provides an additional set of tools to assist in:
- communicating between SAS steps,
- constructing executable and reusable code,
- designing custom languages,
- developing user-friendly routines,
- conditionally execute DATA or PROC steps.
It is worth mentioning that during macro compilation only macro statements are compiled, so be aware that
non-macro
text and
macro references are not evaluated during the compilation phase – but during macro execution .
When one macro is invoked, the SAS code is generated. This time is called
macro execution time.
It is intertwined with the compiling (or parsing) of the generated SAS code. Finally there is the SAS execution time when the compiled code is executed. Thus the are four important times or stages through which the lines of a SAS program with
macros move.
1. Macro compile time
2. Macro execution time
3. SAS compile time
4. SAS execution time
Typically these times are all intertwined and going on, at the same time for different lines (or parts of lines).
%LET NAME=USERFILE.MASTER;
请问各位:这个%let语句是不是也分compile 和 execute两个阶段处理?