x cd /pub/data/acspums/Tools; %let pgm=acs20113yr; filename pgm "&pgm..sas"; *---Access 3yr ACS PUMS sas datasets for the 2009-2011 period for Mo only. As downloaded from AFF site, 02-05-13, jgb ***Just doing the Missouri files for now. *** ****the two psam_[hp]29 datasets referenced here will be deleted after this runs. They can be put back by using unzip on the unix_pmo.zip and uniz_hmo.zip files which were downloaded from http://www2.census.gov/acs2011_3yr/pums/ ---*; libname acspums '/pub/data/acspums'; libname dwnlds '/pub/data/acspums/downloads'; %let year=20118; %let yr=%substr(&year,3,2); options compress=char; %macro doit(state,stab); %let upstab=%upcase(&stab); data acspums.&stab.hrecs&yr.3yr(label="&upstab H recs data for 3-year period ending 20&yr" ); set dwnlds.psam_h&state; run; data acspums.&stab.precs&yr.3yr(label="&upstab P recs data for 3-year period ending 20&yr" ); set dwnlds.psam_p&state; run; proc tabulate data=acspums.&stab.precs&yr.3yr; 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.3yr"; run; %mend doit; %doit(29,mo); %**doit(17,il);