x cd /pub/data/mable14/Tools; %let pgm=cbsat09_format; filename pgm "&pgm..sas"; *---Create a format table lookup to get cbsa type based on cbsa for 2009/2010---; *---Running 5-16-17 to make sure this format is available for geocorr14--; libname mable14 '/pub/data/mable14'; libname mable14 '/pub/data/mable14'; *<---as of 12/15 our autoexec.web.sas has: fmtsearch=(mable14 sasctlgs) --; libname georef '/pub/data/georef' access=readonly; filename text '/pub/sas/formats/Scbsat09_.sas'; *--This is the generated format code---; proc sql; create table cbsatypes as select distinct cbsa, cbsatype from georef.cbsacos09 where cbsa ne ' '; quit; %genfmat(setin=cbsatypes, savedoc=1, arg=cbsa,arglen=5, labelvar=cbsatype,labellen=5, other=' ', fmatname=cbsat09_, fmatlib=mable14); *---Test it-----; options fmtsearch=(mable14 sasctlgs work); data _null_; set mable14.cacocds1; cbsatype10=put(cbsa10,$cbsat09_.); put county= cbsa10= $cbsa. cbsatype10=; run;