x cd /pub/sas/formats/Tools; %let pgm=genfplace; filename pgm "&pgm..sas"; *--regenerate the $fplace format and Sfplace.sas module using revised (6-01) genfmat macro--; filename text '/pub/sas/formats/Sfplace.sas'; %libname(sf1prof); %macro filter; where sumlev='160' ; _ix=index(areaname,','); if _ix then areaname=substr(areaname,1,_ix-1); *--remove ", Missouri" (for example)--; %mend filter; options nomprint; %genfmat(fmatname=fplace, arg=state placefp, label=areaname, procstmt=0, slctedit=filter, keepvars=totpop sumlev, setin=sf1prof.us) *--test it--; data _null_; placefp='2900244'; put placefp= $fplace.; placefp='2900712'; put placefp= $fplace.; run;