Hi jwillis - I made the changes (code below) and get the same error. The value of some diagnosis fields is "E9949" and that makes SAS unhappy - I get "NOTE: Invalid numeric data, 'E9' , at line 989 column 8" a bunch of times. It doesn't prevent the datasets from outputting. proc format; value $ dxcodes '78060' = 1 '7784' = 2 '4659' = 3 '07999' = 4 '46611' = 5 '77989' = 6 '5990' = 7 '53081' = 8 '27651' = 9 '77189' = 10 '46619' = 11 '79982' = 12 '77931' = 13 '7746' = 14 'V290' = 15 '77182' = 16 '7755' = 17 'V070' = 18 '6910' = 19 '78791' = 20; other = 99; run; data want1 want2 want3 want4 want5 want6 want7 want8 want9 want10 want11 want12 want13 want14 want15 want16 want17 want18 want19 want20; set main; array dx $ dx_code1-dx_code41; flag=0; do i=1 to dim(dx); if put(dx(i), $dxcodes.)= 1 then output want1; if put(dx(i), $dxcodes.)= 2 then output want2; if put(dx(i), $dxcodes.)= 3 then output want3; if put(dx(i), $dxcodes.)= 4 then output want4; if put(dx(i), $dxcodes.)= 5 then output want5; if put(dx(i), $dxcodes.)= 6 then output want6; if put(dx(i), $dxcodes.)= 7 then output want7; if put(dx(i), $dxcodes.)= 8 then output want8; if put(dx(i), $dxcodes.)= 9 then output want9; if put(dx(i), $dxcodes.)= 10 then output want10; if put(dx(i), $dxcodes.)= 11 then output want11; if put(dx(i), $dxcodes.)= 12 then output want12; if put(dx(i), $dxcodes.)= 13 then output want13; if put(dx(i), $dxcodes.)= 14 then output want14; if put(dx(i), $dxcodes.)= 15 then output want15; if put(dx(i), $dxcodes.)= 16 then output want16; if put(dx(i), $dxcodes.)= 17 then output want17; if put(dx(i), $dxcodes.)= 18 then output want18; if put(dx(i), $dxcodes.)= 19 then output want19; if put(dx(i), $dxcodes.)= 20 then output want20; end; run;
... View more