O'Reilly logo

SAS Programming for Enterprise Guide Users, Second Edition by Neil Constable

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Macros: Reusable Programming

  • Introduction 190

  • What Is a Macro? 190

  • Converting a Program to a Macro 190

  • Converting a Task to a Macro 194

  • Complex Prompts 195

  • Choosing Your Path 199

  • Including Macros 201

  • The Biggest Exploding Pie 202

  • Summary 206

  • Where to Look for More Information 206

  • Exercises 206

Introduction

In Chapter 3 we looked at the idea of macro variables, those that SAS sets up for you and the ones you can create yourself. Although these variables are very powerful, they are only a small part of the SAS macro facility.

In this chapter we look first at how you can make any program reusable by converting it into a SAS macro. We also discuss how you can make your macros more flexible by passing parameters to them and by using conditional processing. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required