Hi sas community,
does anyone know how I can array icd9 and icd10 codes? Below is my code
data obesity;
set colon.ip_colon;
array AllDiagCodes {15} $ dx1-dx15;
alcohol = 0;
do i = 1 to 15;
if AllDiagCodes{i} IN: (( "303", "980","E860", "291","3050", "7903") and ("F10", "R780", "T51", "O9931"))
then alcohol = 1;
end;
drop i;
run;
You can't use AND in the list being used by the IN operator. This is logically equivalent:
if AllDiagCodes{i} IN: ("303","980","E860","291","3050","7903","F10","R780","T51","O9931") then alcohol = 1;
You can't use AND in the list being used by the IN operator. This is logically equivalent:
if AllDiagCodes{i} IN: ("303","980","E860","291","3050","7903","F10","R780","T51","O9931") then alcohol = 1;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.