| |
| |
Acknowledgments | |
| |
| |
Preface | |
| |
| |
About the Author | |
| |
| |
About This Book | |
| |
| |
New in the Macro Language | |
| |
| |
| |
Macro Basics | |
| |
| |
| |
Introduction | |
| |
| |
| |
Macro Facility Overview | |
| |
| |
| |
Terminology | |
| |
| |
| |
Macro Execution Phases | |
| |
| |
| |
Referencing Environments or Scopes | |
| |
| |
| |
Defining and Using Macro Variables | |
| |
| |
| |
Naming Macro Variables | |
| |
| |
| |
Defining Macro Variables | |
| |
| |
| |
Using Macro Variables | |
| |
| |
| |
Displaying Macro Variables | |
| |
| |
| |
Resolving Macro Variables | |
| |
| |
| |
Automatic Macro Variables | |
| |
| |
| |
Defining and Using Macro Variables in a PROC SQL Step | |
| |
| |
| |
Removing Macro Variables | |
| |
| |
| |
Defining and Using Macros | |
| |
| |
| |
Defining a Macro | |
| |
| |
| |
Invoking a Macro | |
| |
| |
| |
System Options Used with the Macro Facility | |
| |
| |
| |
Display Manager Command-Line Macros | |
| |
| |
| |
Statement- and Command-Style Macros | |
| |
| |
| |
Controlling System Initialization | |
| |
| |
| |
Macro Parameters | |
| |
| |
| |
Introducing Macro Parameters | |
| |
| |
| |
Positional Parameters | |
| |
| |
| |
Keyword Parameters | |
| |
| |
| |
Choosing between Keyword and Positional Parameters | |
| |
| |
| |
Using Macros | |
| |
| |
| |
Program Control through Macros | |
| |
| |
| |
Macros That Invoke Macros | |
| |
| |
| |
Using Conditional Macro Statements | |
| |
| |
| |
Iterative Execution Using Macro Statements | |
| |
| |
| |
Macro Program Statements | |
| |
| |
| |
Interfacing with Data | |
| |
| |
| |
Using the SYMPUT Routine | |
| |
| |
| |
Using a SAS Data Set As a Control File | |
| |
| |
| |
Macro Variable Forms Used in Dynamic Programs | |
| |
| |
| |
Moving Text from Macro to DATA Step Variables | |
| |
| |
| |
Doing More with the SQL Step | |
| |
| |
| |
Execution of Macro Code Using CALL EXECUTE | |
| |
| |
| |
Using Macro Functions | |
| |
| |
| |
Quoting Functions | |
| |
| |
| |
Text Functions | |
| |
| |
| |
Evaluation Functions | |
| |
| |
| |
Using DATA Step Functions and Routines | |
| |
| |
| |
Building Your Own Macro Functions | |
| |
| |
| |
Other Useful Macro Functions | |
| |
| |
| |
Using Macro References with the SAS Component Language (SCL) | |
| |
| |
| |
The Problems Is... | |
| |
| |
| |
Using Macro Variables | |
| |
| |
| |
Calling Macros from within SCL Programs | |
| |
| |
| |
Advanced Macro Topics, Utilities, and Examples | |
| |
| |
| |
Writing Dynamic Code | |
| |
| |
| |
Elements of Dynamic Programs | |
| |
| |
| |
Writing Applications without Hard-coded Data Dependencies | |
| |
| |
| |
Using &&VAR&I Constructs as Macro Arrays | |
| |
| |
| |
Building SAS Statements Dynamically | |
| |
| |
| |
Using SASHELP Views | |
| |
| |
| |
Controlling Your Environment | |
| |
| |
| |
Operating System Operations | |
| |
| |
| |
Controlling Your Output | |
| |
| |
| |
Adapting Your SAS Environment | |
| |
| |
| |
Coordinating with the Output Delivery System (ODS) | |
| |
| |
| |
Working with SAS Data Sets | |
| |
| |
| |
Creating Flat Files | |
| |
| |
| |
Subsetting a SAS Data Set | |
| |
| |
| |
Checking the Existence of SAS Data Sets | |
| |
| |
| |
Working with Data Set Variables | |
| |
| |
| |
Counting Observations in a Data Set | |
| |
| |
| |
Building and Using Macro Libraries | |
| |
| |
| |
Library Overview | |
| |
| |
| |
Macro Library Essentials | |
| |
| |
| |
SAS Autocall Macros | |
| |
| |
| |
Miscellaneous Macro Topics | |
| |
| |
| |
Other Specialized Tasks | |
| |
| |
| |
Doubly Subscripted Macro Arrays | |
| |
| |
| |
Programming Smarter | |
| |
| |
| |
Working with Macro Parameter Buffers | |
| |
| |
| |
Understanding Recursion in the Macro Language | |
| |
| |
| |
Determining Macro Variable Scopes | |
| |
| |
| |
Exercise Solutions | |
| |
| |
| |
Utilities Locator | |
| |
| |
| |
Example Locator | |
| |
| |
| |
Macro Locator | |
| |
| |
| |
Example Data Sets | |
| |
| |
Glossary | |
| |
| |
Bibliography | |
| |
| |
Index | |