x cd /pub/data/cbp/Tools; %let pgm=cnvtcbp1011; filename pgm "&pgm..sas"; /*--Convert the downloaded CBP data (from ftp://ftp2.census.gov/econ20XX) to usual sets using cb[cnv2 macro. jgb, 7-1-13. Converting ustotals, states, counties and msas. ---*/ ***libname user '/SAS_temp/userb'; libname cbp '/pub/data/cbp'; options mprint; *<====while debugging only--; options compress=binary; *---the conversion macro is in /pub/sas/macros/cbpcnv2.sas and does most of the work---; %cbpcnv2(files=us,yr=11,debug=1,unzip=1); options nomprint; %cbpcnv2(files=us,yr=10,unzip=1,debug=0); %cbpcnv2(files=state,yr=10,debug=0); %cbpcnv2(files=state,yr=11,debug=0); /* ========================begin comment==================================== %cbpcnv2(yr=10,files=msa,cbsacos=cbsaco09); *--the other levels were converted in prior run--*; %cbpcnv2(yr=11,cbsacos=cbsacos09); ==========================end comment====================================== */ *=====================================And now do the ZIP Code business data====================================; *--Read ZIP business patterns data (it is the same kind of data as cbp, but with less detail and for ZIP codes). There are two files each year, one with just totals incl payrolls and employees, the other just establishment counts by industry (naics). jgb, Nov 2011 . Edited to run 7-1-13 with 2010, 2011 data. ---*; options mprint; *<====while debugging only--; /* ========================begin comment==================================== options compress=no; %zbpcnv2(yr=10); %zbpcnv2(yr=11); %let lastyr=11; *<================================================; proc print data=cbp.usziptots&lastyr(obs=50); by year; id zip; title "cbp.usziptots&lastyr"; run; proc print data=cbp.uszipdetails&lastyr(obs=50); by year; id zip; title "cbp.uszipdetails&lastyr"; run; ==========================end comment====================================== */