x cd /pub/data/sf32000x/Tools; %let pgm=sumlevs; filename pgm "&pgm..sas"; *---Generate the SumLevs.html files in both sf32000 and sf32000x datasets, showing what summary levels are available and the frequency of occurrence.---; options ls=132; libname sf3 '/pub/data/sf32000' access=readonly; libname sf3x '/pub/data/sf32000x' access=readonly; proc format; value $hsums '070','080','085','090','158','391','392','441','451','461'='h' other='i'; value yesno 1='Yes' 0='No'; run; data sumlevs; set sf3.mogeos(keep=sumlev pop100 pct); code=sumlev; length HorI $1; HorI=put(sumlev,$hsums.); format sumlev $sumlev80. pct yesno.; run; ods html file='/pub/data/sf32000/SumLevs.html'; title 'Frequency of SumLev Codes on the Missouri SF3 Datasets'; proc freq data=sumlevs noprint; table code*sumlev*HorI*pct/list nocum nopercent out=freqout; run; proc print data=freqout label; id code; label pct='On phct files?'; label HorI='Inventory or Hierarchal'; label SumLev='SumLev Meaning' code='SumLev code'; var sumlev hori pct count ; format count comma7.; sum count; run; ods html close; data sumlevsx; set sf3x.moi(keep=sumlev) sf3x.moh(keep=sumlev in=inh); code=sumlev; length HorI $1; HorI=put(sumlev,$hsums.); format sumlev $sumlev64. ; run; ods html file='/pub/data/sf32000x/SumLevs.html'; title 'Frequency of SumLev Codes on the Missouri SF3x (moi + moh) Datasets'; proc freq data=sumlevs noprint; table code*sumlev*HorI/list nopercent out=freqout2; run; proc print data=freqout2 label ; id code; label HorI='Inventory or Hierarchal'; label SumLev='SumLev Meaning' code='SumLev code'; var sumlev hori count ; format count comma7.; sum count; run; ods html close;