In the program below, it works fine when I use just one variable (Diag_cd1) but when I try 5 variables in an array (Diag_cd1-Diag_cd5) it does not work giving me an error message about parsing WHERER clause with an underline under $DIAGL. Can an array be used for what I want to do? The Proc Format has been reduced here for posting. thanks. PROC FORMAT; VALUE $DIAGL "39891", "4280 "-"4289 " = "CHF" /* Congestive heart failure */ "09320"-"09324", "3940 "-"3971 ", "3979 ", "4240 "-"42499", "7463 "-"7466 ", "V422 ", "V433 " = "VALVE" /* Valvular disease */ "41511"-"41519", "4160 "-"4169 ", "4179 " = "PULMCIRC" /* Pulmonary circ disorder;*/ "042 "-"0449 " = "AIDS" /* HIV and AIDS */ ; data monday3; set monday2; where put (diag_cd1,$DIAGL.) eq 'AIDS'; run; data monday3; set monday2; array diagg(5) $ diag_cd1-diag_cd5; DO i = 1 TO 5; where putc(diagg(i),$DIAGL.) eq 'AIDS'; end ; run ;
... View more