x cd /pub/data/acspums/Tools; %let pgm=acs2008; filename pgm "&pgm..sas"; *---Access pc sas datasets for the 2008 pums for Mo & US. As downloaded from AFF site, 11-2-09, jgb. The national datasets are split into 2 parts this year. ushrecs08 contains data for states Alabama thru Mississippi (01 to 28), and ushrecs08b contains data for Missouri thru Wyoming. 11-11-10: Modifying and rerunning to access the re-released and updated 2008 1yr data. We put the downloaded sets in a separate subdirectory and rename the sets. Then we copy and compress them and (new) create a state code index. ---*; libname acspums '/pub/data/acspums'; libname dwnlds '/pub/data/acspums/updatedownloads2008'; %let year=2008; %let yr=%substr(&year,3,2); /* ========================begin comment==================================== proc datasets library=dwnlds nolist; *--rename the datasets as downloaded from the Bureau (as SAS datasets!)--*; change psam_pusa=usprecs&yr.; change psam_husa=ushrecs&yr.; change psam_pusb=usprecs&yr.b; change psam_husb=ushrecs&yr.b; quit; ==========================end comment====================================== */ options compress=binary; data acspums.usprecs&yr(index=(st)); set dwnlds.usprecs&yr; run; data acspums.ushrecs&yr(index=(st)); set dwnlds.ushrecs&yr; run; data acspums.usprecs&yr.b(index=(st)); set dwnlds.usprecs&yr.b; run; data acspums.ushrecs&yr.b(index=(st)); set dwnlds.ushrecs&yr.b; run; data acspums.mohrecs&yr.; set acspums.ushrecs&yr.b; where st='29'; run; data acspums.moprecs&yr.; set acspums.usprecs&yr.b; where st='29'; run; proc contents data=acspums.mohrecs&yr.; proc contents data=acspums.moprecs&yr.;