STAT 440 Lecture 10: Macro Programs

45 views4 pages

Document Summary

Macro is a group of sas statements that is referred by a name and to use it in program anywhere, using that name. It starts with a %macro statement and ends with %mend statement. The local variables are declared with below syntax. The below program declares a group of sat statements under a macro named "show_result"; This macro is being called by other sas statements. Sas has many macro statements which are in-built in the sas programming language. They are used by other sas programs without explicitly declaring them. common examples are - terminating a program when some condition is met or capturing the runtime value of a variable in the program log. This macro statement writes text or macro variable information to the sas log. In the below example the value of the variable "today" is written to the program log. Execution of this macro causes normal termination of the currently executing macro when certain condition evaluates to be true.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related textbook solutions

Related Documents