Type : SASHELP
Utilise la table d'exemple standard SASHELP.CARS.
| 1 | * Create the vertical macro variable list.; |
| 2 | PROC SQL noprint; |
| 3 | select distinct origin into :ORIGIN1- |
| 4 | from sashelp.cars; |
| 5 | %let NUM_ORIGINS = &sqlobs; |
| 6 | QUIT; |
| 1 | /* Replace both hard-coded values of ASIA below using the a reference |
| 2 | to a vertical macro variable list. */ |
| 3 | |
| 4 | %DO i = 1 %to &NUM_ORIGINS; |
| 5 | DATA cars_asia; * CHANGE THIS LINE ; |
| 6 | SET sashelp.cars; |
| 7 | where origin = "Asia"; * CHANGE THIS LINE ; |
| 8 | RUN; |
| 9 | %END; |