Hi, I am a long time STATA user who is required to use SAS for a certain project. How can I search for a list of 20 diagnosis codes over 25 diagnosis variables (diag1-diag25) and have it flag a new variable as one? This would be similar to the STATA code: local diagcode "xxxxx" "xxxxx" "xxxxx" foreach x of varlist diag1-diag25 { replace diabetes = 1 if `x' == diagcode Thank you!
... View more