PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: bankruptcy

SAS Macros: Beyond The Basics

1 Paper SAS3511-2019 SAS Macros: Beyond the Basics Ron Coleman, SAS Institute Inc., Cary, NC ABSTRACT Basic macros rely on symbolic substitution to place values in particular locations in SAS code they simply create code. Beyond that, the sky is the limit! We cover the following advanced techniques: create and populate macro variables; read a list of file names from a folder and use the list for processing code; utility macros that calculate new values without the need for a DATA step; and advanced macro functions. We also include a discussion about macro quoting. Some pointers for passing values when you are using SAS/CONNECT and SAS Grid are also discussed. INTRODUCTION macro programmers generally accept that macros create SAS code. The simplest use is to assign a value to a macro variable and then have the value resolve to create code: %let table = ; proc print data= run; Another form of this basic use is to wrap the PROC PRINT step within a macro definition and either use the initial %LET statement to define the value or use a macro argument: % macro myprint(table); proc print data= run; %mend; %myprint( ) Beyond these basic, and most commonly used examples there lies a world of macro conditional processing (%IF.)

argument(s))<, format >) The first argument is the DATA step function to use with any required arguments. The second, optional, argument is a format to apply to the output value that is returned. Here is an example using the TODAY function:

Loading..

Tags:

  Basics, Macro, Beyond, Sas macro, Arguments, Beyond the basics

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of SAS Macros: Beyond The Basics

Related search queries