x cd /pub/data/georef/Tools; %let pgm=cbsa_changes_2009_2013; filename pgm "&pgm..sas"; *--Look at new and deleted CBSAs between the last and most current defns (as of 2013).--; libname georef '/pub/data/georef'; data georef.&pgm (label="Not important"); merge georef.cbsas09(in=in09) georef.cbsas13(in=in13); by cbsa; if in09 and in13 then delete; if in09 then status='Deleted'; else status='New'; drop csa csaname states nstates; run; proc sort; by status cbsa; run; proc print data= georef.&pgm; by status; title "&pgm : See what CBSAs Came and Went with Feb 2013 Updates"; run;