Page 114 - SAS_manual
P. 114

The %MACRO statement tells SAS that this is the beginning of the macro and the %MEND statement signals the end
               of the macro.

               After you define your macro, you need to invoke it when you want to use it. Do this by adding a percent
               sign in front of the macro-name like this:

               %macro-name;


               Program: 10.4
               Write a program in macro to create a pie chart graph for each region by using sashelp.class and create a
               PDF file for this result.



























               Here sales_1 is MACRO_NAME. By using %macro you just start the MACRO program and by mentioning
               %mend, here you end the program.
               For getting the output you have to execute %sales_1 and go to the file path to see the generated PDF.

               Types of macro program on the basis of arguments:












                                                    SAS HANDBOOK | VISIT:: http://nikhilanalytics.com  114
   109   110   111   112   113   114   115   116   117   118   119