x cd /pub/data/acspums/Tools; %let pgm=application_povratio_kids; filename pgm "&pgm..sas" ; *---the request from Emily Smith, CMC: I am wondering if you can tell me how many Missouri children there are below 300% of the FPL [Federal Poverty Level] How many children we have in each of the following categories: 150% - 185% 186% - 225% 226% - 300%. 12-06. jgb, tck ----; libname acspums '/pub/data/acspums'; data _null_; set acspums.moprecs05(keep=serialno pwgtp povpip agep) end=last; where agep < 18 and povpip ne .; *--we only want children (aged 0-17) for whom poverty status is determined-; Universe + pwgtp; if povpip le 100 then TotalPoorKids + pwgtp; if povpip le 300 then KidsUnder300 + pwgtp; *---If not in the user-specified poverty ratio range then skip the arithmetic and go to the end of the step--; if not( 150 <= povpip <=300) then goto cklast; if povpip <= 185 then kids150_185 + pwgtp; else if povpip <= 225 then kids186_225 + pwgtp; else kids226_300 + pwgtp; format _numeric_ comma9.; cklast: if last then put TotalPoorKids= KidsUnder300= kids150_185= kids186_225= kids226_300= Universe=; run;