x cd /pub/data/sf32000/Tools; %let pgm=cnvtsf3_usdata2; filename pgm "&pgm..sas"; *<====mo only===; /*--Followup to cnvtsf3_usdata module. Here we do some merging of the 3 data sets (ph, phct and phctr) to create usstcnty, usregdiv and usuas data sets (the originals have been downloaded to mcdc3 server and will be deleted). We also define some logrecno indices. jgb, march, 2009. (after the recovery). */ libname sf32000 "/pub/data/sf32000"; *--we read from the rawdata directory but write to sf32000 so we cannot use &inpath to define this libref now.----; libname sf3 (sf32000); *---alias name--; title "Conversion of 2000 Summary File 3 Data for us"; /* =======================Begin comment================ data sf3.usstcnty(compress=binary index=(Logrecno)); merge sf3.usstcntygeos sf3.usstcntyph sf3.usstcntyphct sf3.usstcntyphctr; by Logrecno; run; data sf3.usregdiv(compress=binary index=(Logrecno)); merge sf3.usregdivgeos sf3.usregdivph sf3.usregdivphct sf3.usregdivphctr; by Logrecno; run; data sf3.usuas(label='US data for Urbanized Areas & Urban Clusters' compress=binary index=(Logrecno)); merge sf3.usuasgeos sf3.usuasph sf3.usuasphct sf3.usuasphctr; by Logrecno; run; ======================End comment================== */ data sf3.usgeocomps(label='US data for all Geographic Component summaries' compress=binary index=(Logrecno)); merge sf3.usgeocompsgeos sf3.usgeocompsph sf3.usgeocompsphct sf3.usgeocompsphctr; by Logrecno; run; proc dataset library=sf3 nolist; modify usplacesph; index create Logrecno; modify usplacesphct; index create Logrecno; modify usplacesphctr; index create Logrecno; modify uszipsph; index create Logrecno; modify uszipsphct; index create Logrecno; modify uszipsphctr; index create Logrecno; quit; %include sascode(notify);