x cd /pub/data/acspums/Tools; %let pgm=acs20xx1yr; filename pgm "&pgm..sas"; **************************this setup is obsolete!!!! See acs20xx.sas instead****************************************************** *---Access Unix sas datasets for the 20&yr pums for Mo & US. As downloaded from Census Bureua FTP site, http://www2.census.gov/acs2013_1yr/pums/ (substitute year for 2013). 10-27-14, jgb. The original .zip files were downloaded to the downloads subdir of acspums and we then extracted the 4 "psam" data sets used in this setup (2 Precs and 2 Hrecs sets - the data were split in 2). They will be deleted once we are sure the conversion worked. We copy and compress them to save space. Adding vintage and period variables for the first time, Oct. 2014 for 2013 1yr data. ---*; libname acspums '/pub/data/acspums'; libname dwnlds '/pub/data/acspums/downloads'; %let year=2013; %let yr=%substr(&year,3,2); *<=======================!!!!!Change This Each Year!!!!!!!!!!!!!!!!!!!!!!!!!!!===; options compress=binary; *---We only get about 25% reduction. Better than nothing.---; data acspums.usprecs&yr(label="&year Person data Alabama thru Mississippi"); retain vintage "&year" period "1"; set dwnlds.psam_pusa; run; data acspums.ushrecs&yr(label="&year Housing Unit data Alabama thru Mississippi"); retain vintage "&year" period "1"; set dwnlds.psam_husa; run; proc freq data=acspums.ushrecs&yr; table st; run; data acspums.usprecs&yr.b(label="&year Person data Missouri thru Wyoming"); ; retain vintage "&year" period "1"; set dwnlds.psam_pusb; run; data acspums.ushrecs&yr.b(label="&year Housing Unit data Missouri thru Wyoming"); retain vintage "&year" period "1"; set dwnlds.psam_husb; run; proc freq data=acspums.ushrecs&yr.b; table st; run; data acspums.mohrecs&yr.; retain vintage "&year" period "1"; set dwnlds.psam_h29; *---delete the dwnlds data set after convert--; *where st='29'; run; data acspums.moprecs&yr.; retain vintage "&year" period "1"; set dwnlds.psam_p29; *where st='29'; run; proc contents data=acspums.mohrecs&yr.; proc contents data=acspums.moprecs&yr.;