x cd /mscdc/sas/formats/Tools; %let pgm=xmetro; filename pgm "&pgm..sas"; *---the $metro format code was created using 1994 metro area file that came with 94 pop estimates from Bureau. But it turns out there are some 1990 metros that went away and we want to include them in that format code. So we go thru the 1990 stf3c datasets with metro codes and see which ones do not return a name from $metro. We write out a temp file that can be appended to the Smetro.sas module and then we can recompile it. jgb 2-14-96---*; %libname(stf903); filename textout '/mscdc/sas/formats/defunct_metros.sas'; data _null_; set stf903.usmetros(keep=slvl msacmsa pmsa geocomp areaname p1i1); length newname $40; where slvl in ('300','301') and geocomp='00'; if slvl='300' then newname=put(msacmsa,$metro94_.); else newname=put(pmsa,$metro94_.); if newname=msacmsa or newname=pmsa; _ix=index(areaname,'MSA'); if not _ix then do; s=areaname; if psma ne ' ' then arg=pmsa; else arg=msacmsa; end; ELSE DO; A=substr(areaname,_ix-1,1); if a=' ' then substr(areaname,_ix)=' '; else if a='C' then substr(areaname,_ix-1)='(C)'; else if a='P' then substr(areaname,_ix-1)='(P)'; file textout; length s $70; retain tic '"'; if a='P' then arg=pmsa; else arg=msacmsa; END; s=tic||arg||tic||"="||tic||trim(areaname)||tic; put +3 s; run; data _null_; infile textout; input; list; run;