x cd /pub/data/popests/Tools; %let pgm=popchange_logarithms; filename pgm "&pgm..sas"; /*--For a map of county pop changes post-2000 we access the basic mocom08 data set and create a variable showing change logs. jgb, 6/09. --*/; %libname(popests,opts=); %let latestyr=08; %let latestyear=20&latestyr; data popests.popchange_logs; set popests.mocom08(keep=fipco county popc0: ); array change(*) popc0001 -- popc0708; array logchange(*) logpopc0001 logpopc0102 logpopc0203 logpopc0304 logpopc0405 logpopc0506 logpopc0607 logpopc0708; do i=1 to dim(change); if change{i}=0 then logchange{i}=0; else logchange{i}= log10(abs(change{i}))*sign(change{i}); end; if _n_ le 2 then put / _all_; format logp: 9.6; drop i; run;