I have developed a SAS code which has a macro with two arguments. The macro looks like this
%macro compare(country,attributes)
The problem is I have 10 countries , for example India, U.S.A, Australia, Pakistan etc and 15 attributes such as language, area, currency, life_expec, MaleFemaleRatio etc.
So I have to call macro for 150 times.
%compare(India,language);
%compare(India,area);
%compare(India,currency);
* ;
/* Similarly I have do the same for other attributes also */
* ;
%compare(U.S.A,language)
%compare(U.S.A,area)
/* Similarly I have do the same for other countries also */
*;
*;
*;
Is there any way to take take these attributes and country names as array and loop through them to get same result? New to sas. Thanks in advance for helping me
I would suggest 1. Put your country and attributes into a SAS table 'country_attr', with variable 'country' and 'attributes'. 2. Call execute: