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

Creating Data-Driven Macro Variables with PROC SQL

A SAS macro variable stores text that is substituted in your code when SAS runs the program. Macro variable execution is similar to an automatic find-and-replace. Macro variables are temporary, and they are stored in-memory, so when you exit SAS, they are deleted. However, you can create data-driven macro variables with a PROC SQL query and then use those macro variables in your SAS program, procedure, and DATA step.

Creating Data-Driven Macro Variables with the INTO Clause

The INTO Clause

You can access the macro facility in a PROC SQL step by using the INTO clause in the SELECT statement. The various forms of the INTO clause can perform a variety of functions. For example, you can create ...
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