x cd /pub/data/cbp/Tools; %let pgm=cnvtcbpYY; filename pgm "&pgm..sas"; /*--Convert the downloaded CBP and ZBP data (from ftp://ftp2.census.gov/econ20XX) to usual sets using cbpcnv2/zbpcnv2 macros. (OR http://www.census.gov/econ/cbp/download/ - includes links to the record layouts). jgb, 6-16-14. Converting ustotals, states, counties and msas. jgb 4-25-15 ... 4-25-16 ran county data. 5-21-16 running ZBP 4-25-17 Running with 2015 data. ---*/ ***libname user '/SAS_temp/userb'; libname cbp '/pub/data/cbp'; %let year=2015; *<============; %let yr2=%substr(&year,3,2); %let cbsayr=&yr2; *<===the macro accesses georef.cbsacos&cbsayr --; %**cbpcnv2(files=counties,yr=&yr2,debug=1,unzip=1,termstr=); *--rerun the 2012 conversion--; **options mprint; *<====while debugging only--; *--downloaded files and doing county, state, us and msa file converts for 2015 data 4-25-17---*; options compress=binary; *---the conversion macro is in /pub/sas/macros/cbpcnv2.sas and does most of the work---; %cbpcnv2(files=msas,yr=&yr2,debug=1,unzip=1,termstr=crlf); /*<=========================Comment out===================================== %cbpcnv2(files=us states,yr=&yr2,debug=1,unzip=1,termstr=crlf); %cbpcnv2(files=counties,yr=&yr2,debug=1,unzip=1,termstr=crlf); *=====================================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, June, 2014 . ---*; options compress=no; options mprint; %zbpcnv2(yr=&yr2); %let lastyr=&yr2; 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 commented out================================ */