I would like to search a very large SAS dataset (hospital discharge) for specific ICD-10 codes. I have the list of ICD-10 codes I would like to search for in excel. Is there a simple way to go about doing this? I previously used the following code: data SA2009 out2; set ED2009; if DX1 in ('2910', '2911', '2912', '2913', '2914', '2915', '29181', '29182', '29189') then output SA2009; else output out2; Run; The problem is that I had hundreds of codes included in the parentheses. I pasted these in, but then had to had the single quotations and adjust spacing, which took a significant amount of time. I would like to be able to reference the excel doc with all the codes or write code that would not require I manually type each diagnosis code in. Any suggestions are appreciated!
... View more