x cd /pub/data/acspums/Tools; %let pgm=acs20095yr; filename pgm "&pgm..sas"; *---Access 5yr ACS PUMS sas datasets for the 2005-2009 period. As downloaded from AFF site, http://factfinder.census.gov/home/en/acs_pums_2009_5yr.html 12-9-11, jgb Just doing the Missouri & Illinois files for now. *Note: the two psam_[hp]{29|17} datasets referenced here will be deleted after this runs. They can be put back by using unzip on the .zip files with 095yr.zip endings in the downloads subdirectory. ---*; libname acspums '/pub/data/acspums'; *libname dwnlds '/pub/data/acspums/updatedownloads2009'; %let year=2009; %let yr=%substr(&year,3,2); options compress=char; %macro doit(state,stab); %let upstab=%upcase(&stab); data acspums.&stab.hrecs&yr.5yr(label="&upstab H recs data for 5-year period ending 20&yr" ); set acspums.psam_h&state; run; data acspums.&stab.precs&yr.5yr(label="&upstab P recs data for 5-year period ending 20&yr" ); set acspums.psam_p&state; run; proc tabulate data=acspums.&stab.precs&yr.5yr; class puma; by st; format st $state.; var pwgtp; table (all puma), pwgtp*sum*f=comma13.; title "Summing Weight Variables on acspums.&stab.precs&yr.5yr"; run; %mend doit; %doit(29,mo); %doit(17,il);