Using Macro Variables To Subset Data in Procedures
Using Macro Variables To Subset Data in Procedures
2. Write a PROC PRINT step to list the same subset of rows from pg1.np_species.
16
4. Create a macro variable named ParkCode to store YOSE, and another macro variable named
SpeciesCat to store Mammal. Modify the code to reference the macro variables. Submit the program
and confirm that the same results are generated.
Note: The macro variable values are case sensitive when they are used in a WHERE statement.
%let ParkCode=YOSE;
%let SpeciesCat=Mammal;
https://vle.sas.com/pluginfile.php/800788/mod_scorm/content/268/03/epg1v203_2_p_l2.htm 1/2
8/22/2020 Steps
5. Change the values of the macro variables to ZION (Zion National Park) and Bird. Submit the program.
%let ParkCode=ZION;
%let SpeciesCat=Bird;
46
Hide Solution
https://vle.sas.com/pluginfile.php/800788/mod_scorm/content/268/03/epg1v203_2_p_l2.htm 2/2