x cd /pub/data/acspums/Tools; %let pgm=acs20125yr; filename pgm "&pgm..sas"; *---Access 5yr ACS PUMS sas datasets for the 2008-2012 period for Mo only. As downloaded from ftp2.census.gov/acs2011_5yr/pums . 06-15-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_pmo115yr.zip and unix_hmo115yr.zip files which were downloaded from Bureau web site. ---*; libname acspums '/pub/data/acspums'; libname dwnlds '/pub/data/acspums/downloads'; %let year=2012; %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 dwnlds.psam_h&state; run; data acspums.&stab.precs&yr.5yr(label="&upstab P recs data for 5-year period ending 20&yr" ); set dwnlds.psam_p&state; run; proc tabulate data=acspums.&stab.precs&yr.5yr; *-----puma does not exist on these files for 2012. Now we have to dale with puma00 and puma10.--; 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);