x cd /pub/data/popests/easidata; %let pgm=debug_bgs; filename pgm "&pgm..sas"; *---1-shot run to try to pinpoint the problem we are having with the splitbgs output, where the estimates on the split bg datasets are not matching what is on the original complete-bg set---; title "&pgm"; options mstored sasmstore=library; libname easidata '/pub/data/popests/easidata'; libname user '/SAS_temp/user'; data albgs150; set easidata.usbgs04_09(where=(state="01") password=%easipwd keep=state county tract bg popest04 popproj09); run; proc sort data=easidata.al090bgs04_09 (password=%easipwd) out=albgs090; by county tract bg; run; %agg(setin=albgs090,aggout=aggout,aggby=county tract bg, aggvars=popest04) data merged; merge albgs150(in=in150) aggout(in=in090 rename=(popest04=aggest04)); by county tract bg; if not (in150 and in090) then do; put _all_; abort abend; end; if abs(popest04 - aggest04) gt .2 ; run; proc print data=merged; title2 'Bgs With Aggregate Estimate Not matching orginal'; by county; id tract bg; var popest04 aggest04 ; sum popest04 aggest04; run; %include sascode(notify);