Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

Defining and Calling a Macro

A macro definition stores text. This might include macro language statements or expressions as well as complete or partial SAS program statements or program steps. The macro definition begins with a %MACRO statement and ends with a %MEND statement.

Defining a Macro

%MACRO and %MEND Statements Syntax

In order to create a macro program, you must first define it. You begin a macro definition with a %MACRO statement, and you end the definition with a %MEND statement.
Syntax, %MACRO statement and %MEND statement:
%MACRO macro-name;
text
%MEND <macro-name>;
macro-name
names the macro. The value of macro-name can be any valid SAS name that is not a reserved word in the SAS macro facility.
text
can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692