I have multiple conditional where statements for one variables such as:
where del="AG"; *argentina;
where del="BL"; *brazil;
etc.
I want to do the following proc freq:
proc freq data=latam;
tables hem*year/missing norow nopercent;
where del="AG"; *argentina;
run;
looped through all of these values for DEL:
"AG"="ARGENTINA"
"BL"="BRAZIL"
"BO"="BOLIVIA"
"CK"="COLOMBIA"
"CL"="CHILE"
"CR"="COSTA RICA"
"CU"="CUBA"
"DR"="DOMINICAN REPUBLIC"
"EC"="ECUADOR"
"ES"="EL SALVADOR"
"GT"="GUATEMALA"
"HO"="HONDURAS"
"MX"="MEXICO"
"NQ"="NICARAGUA"
"PE"="PERU"
"PN"="PANAMA"
"PR"="PUERTO RICO"
"PY"="PARAGUAY"
"UY"="URUGUAY"
"VE"="VENEZUELA"
How can I write this so I don't have repeat the proc for each country?
Welcome to SAS. Use a
BYstatement.