My programming instructor always told me "It's your data, not your code". When I read DX codes from an EXCEL spreadsheet I would frequently receive errors where "E" DX codes followed by an number were interpreted by EXCEL as numbers in scientific notation. First, Please check your data source for any scientific notation. Second, Please make the format values as character numbers '1', '2','3','4'. Lastly, Please change the if statements to place quotes around the numbers. Let me know what happens then. Once the E codes are processing, we can address which rows go to which output file and how many rows you actually want written. One of the threads suggest to me that you only want one row for a DX code written to an output table as opposed to my suggestion that writes every DX match row to and output table. 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; 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;
... View more