/* GERMANY2.SAS * EUR21286 * corrects Umlauts with MAPS.GERMANY2 * for SAS under MS-Windows (ANSI Coding scheme) * * Thomas Dachsel, 6.7.1994 & 4.8.1994 & 5.9.1994 */ libname maps 'j:/maps'; /* <=== Enter appropriate MAP directory path */ /* does the ss -> sz substitution missing in the original GERMANY2 data set */ */ %macro subst_ss(string); j=index(idname2,"&string"); if j>0 then do; idname2=substr(idname2,1,i-1) ||'df'x ||substr(idname2,i+2,length(idname2)-(i+1)); end; %mend; data ger2ansi; set maps.germany2; /* a diaresis */ i=index(idname2,byte(123)); if i>0 then substr(idname2,i,1)='e4'x; /* o diaresis */ i=index(idname2,byte(229)); if i>0 then substr(idname2,i,1)='f6'x; /* u diaresis */ i=index(idname2,byte(125)); if i>0 then substr(idname2,i,1)='fc'x; i=index(state2,byte(125)); if i>0 then substr(state2,i,1)='fc'x; /* A diaresis does not occur */ /* O diaresis */ i=index(idname2,byte(92)); if i>0 then substr(idname2,i,1)='d6'x; /* U diaresis */ i=index(idname2,byte(33)); if i>0 then substr(idname2,i,1)='dc'x; /* Minor correction */ if idname='KS Neustadt an der Weinstrass' then idname='KS Neustadt an der Weinstrasse'; i=index(idname2,'ss'); if i>0 then do; /* do apppropriate ss -> sz substitution according to Germany map */ %subst_ss(rass); /* ...strasse */ %subst_ss(tass); /* Stassfurt */ %subst_ss(assb); /* Hassberge */ %subst_ss(ossl); /* Rosslau */ %subst_ss(ross); /* Grossenhain, Gross-Gerau */ %subst_ss(iess); /* Giessen */ %subst_ss(eiss); /* Meiss*, Weissenburg */ %subst_ss(ssne); /* Poessneck */ /* this is a test for printing the ss/sz ambiguous cases */ *put idname $34. idname2 $34.; end; run;