*---------/mscdc/data/stf903/Tools/fx2sl140.sas----------*; x cd /mscdc/data/stf903/Tools; options mprint; %pgm(fx2sl140) options nomprint; /* Merges tract fix observations with slvl140 tracts datasets with bad or missing tracts (ca, ga & ny). See job fxsl140.sas for creation of the update datasets applied here. Note that the ca & ga datasets were fsedited prior to this run to correct the state, county and tract variables in the single bad observation in each. This allows the fix to proceed via a merge by those fields. JWS 7/97 */ libname slvl140 '/mscdc/data/stf903/slvl140.bystate'; libname f93sl140 '/tmp/storage/f93sl140';*---fixes stored here---*; *---rename original datasets which will serve as master & backup---*; proc datasets ddname=slvl140; change catracts=catrctin gatracts=gatrctin nytracts=nytrctin; run; quit; *---apply fixes to ca tracts dataset---*; data slvl140.catracts; merge slvl140.catrctin f93sl140.ca1fix f93sl140.ca2fix f93sl140.ca3fix f93sl140.ca4fix; by state cnty tract; drop flag _keep tstring; run; data getfix; do obsnum=468,469,470,3323,3324,3325,3326,3327, 3573,3574,3575,3576,4852,4653,4854,4855,4856,4857,4858; set slvl140.catracts point=obsnum;output;end; stop; run; proc print data=getfix; var recno--p1i1 h3ai1 h25ai1; title "List Fixes and Adjacent Obs For STF903 SLVL140.catracts";run; *---apply fixes to ga tracts dataset---*; data slvl140.gatracts; merge slvl140.gatrctin f93sl140.ga1fix f93sl140.ga2fix; by state cnty tract; drop recck; run; proc print data=slvl140.gatracts(firstobs=1078 obs=1081); var recno--p1i1 h3ai1 h25ai1; title "List Fixes and Adjacent Obs For STF903 SLVL140.gatracts";run; *---apply fixes to ny tracts dataset---*; data slvl140.nytracts; merge slvl140.nytrctin f93sl140.ny1fix; by state cnty tract; drop recck; run; proc print data=slvl140.nytracts(firstobs=3592 obs=3594); var recno--p1i1 h3ai1 h25ai1;*---added after run---*; title "List Fixes and Adjacent Obs For STF903 SLVL140.nytracts";run; run;