Macro Programming is very useful for automating the programming code. It is used when repetion of work is there, in simply manner it avoids the hard coding program. It is a case sensitive so carefully assigned the macro variables, but proper knowledge of SAS is required to write Macro code.
SAS Macro are useful when we want to execute the same set of sas statements again and again. This is the ideal case using macro rather than typing or coping(pasting) sas statements.
Macro is recognized by macro triggers known as Percentage (%) and ampersand (&).There are two components of macro programming
2. Macro variables—- Macro variables are two types named as local and global macro variables
Local macro variables are local in scope by name itself indicating, it is written inside the programming code where as global macro variables are written in anywhere in program means global in scope. To creating macro variable using the following syntax