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
(See also: Divide into a papers and wiki articles subsections add links to more papers)
(gardening)
 
(10 intermediate revisions by 2 users not shown)
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.''
+
{{work in progress}}
'''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.
  
 
==Syntax==
 
==Syntax==
Line 7: Line 7:
 
==See also==
 
==See also==
 
===Papers===
 
===Papers===
*[[Before You Get Started: A Macro Language Preview in Three Parts]]
+
* [[Before You Get Started: A Macro Language Preview in Three Parts]]
*[[SAS Macro Dynamics: from Simple Basics to Powerful Invocations]]
+
* [[Job Security: Using the SAS® Macro Language to Full Advantage]]
 +
* [[Macro Design Bugs How to Create Avoid and Destroy|Paper 252-30: Macro Bugs - How to Create, Avoid and Destroy Them]]
 +
* [[Nine Steps to Get Started using SAS® Macros]]
 +
* [[SAS Macro Dynamics: from Simple Basics to Powerful Invocations]]
 +
* [[SAS® Macro Programming Tips and Techniques]]
 +
* [[A Tutorial on the SAS® Macro Language]]
 
**[[:Category:Macro Language Papers|more macro language papers]]
 
**[[:Category:Macro Language Papers|more macro language papers]]
  
Line 17: Line 22:
 
*[[:Category:Macro Language]]
 
*[[:Category:Macro Language]]
 
*[[:Category:Macro functions]] and [[:Category:Macro Functions]]
 
*[[:Category:Macro functions]] and [[:Category:Macro Functions]]
 +
*[[Macro Collections]]
 +
*[[Macro Language Wish List]]
 +
*[[Can you avoid && ..%%?]]
 +
*[[Macro Design Issues]]
 +
*[[Macro Design Issues Checklist]]
 +
*[[Macro Design Issues Second Look]]
 +
*[[Macro Design Bugs How to Create Avoid and Destroy]]
 +
*[[Call Execute in the Data Step]]
 +
*[[Behavior difference on SAS Macro (SAS v8.2 VS SAS v9.2)]]
  
 
==References==
 
==References==
Line 22: Line 36:
 
*[http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#titlepage.htm SAS® 9.3 Macro Language: Reference]
 
*[http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#titlepage.htm SAS® 9.3 Macro Language: Reference]
 
*[http://support.sas.com/documentation/cdl/en/mcrolref/68140/HTML/default/viewer.htm#titlepage.htm SAS® 9.4 Macro Language: Reference]
 
*[http://support.sas.com/documentation/cdl/en/mcrolref/68140/HTML/default/viewer.htm#titlepage.htm SAS® 9.4 Macro Language: Reference]
 +
 +
[[Category:Macro Language|!]]

Latest revision as of 09:24, 28 September 2017

This is a work in progress. You can 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

Papers

Wiki articles

References