As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Macro language"

From sasCommunity
Jump to: navigation, search
(Start article about macro language)
 
m (rename Category:Macro Language to list article under !)
Line 1: Line 1:
[[Category:Macro Language]][[Category:Work in Progress]]:''This is a work in progress. You are welcome to contribute to this article.''  
+
[[Category:Macro Language|!]][[Category:Work in Progress]]:''This is a work in progress. You are welcome to contribute to this article.''  
 
'''Macro language''' is a facility for generating SAS code programmatically. The macro language [[Macro variables|variables]], [[Macro functions|functions]] and [[Macro statements|statements]] are interpreted by the macro processor as a SAS program is being parsed at compile time. The text that is generated (resolved) by the macro language can then be interpreted as SAS code and run by the SAS compiler.
 
'''Macro language''' is a facility for generating SAS code programmatically. The macro language [[Macro variables|variables]], [[Macro functions|functions]] and [[Macro statements|statements]] are interpreted by the macro processor as a SAS program is being parsed at compile time. The text that is generated (resolved) by the macro language can then be interpreted as SAS code and run by the SAS compiler.
  

Revision as of 19:28, 3 November 2014

This is a work in progress. You are welcome to contribute to this article.

Macro language is a facility for generating SAS code programmatically. The macro language variables, functions and statements are interpreted by the macro processor as a SAS program is being parsed at compile time. The text that is generated (resolved) by the macro language can then be interpreted as SAS code and run by the SAS compiler.

Syntax

In SAS code, macro variables begin with an ampersand symbol ( & ) and end with a period (.) or before any character that cannot be used in a variable name. Meanwhile macro functions and macro statements start with a percent symbol ( % ) and end with a closing parenthesis ( ) ) for functions or a semicolon ( ; ) for statements.

See also