Hello I'm editing a SAS program I have to include new criteria. I have an instance where only some of the diagnoses will be for some diagnosis types and the rest for others and wish to set the code accordingly but get the error message above. In the report I have: %let dxlist = 'I099','I255','I420','I425','I426','I427','I428','I429','I43','I50','P290', 'F00','F01','F02','F03','F051','G30','G311'; %if &dxlist in 'I420' 'I425' 'I426' then %then %do: %let dxtypelista='1' 'W' 'X' 'Y' '3'; Then I use it in the program like: do i=1 to 25 while (diagcde{i} ne ' '); do j=1 to 25 while (diagcde{j} ne ' '); if flag_type6 ne 1 and dx_type(i) in (&dxtypelista) and diagcde(i) in: (&dxlist) then do; if diagcde(i)=diagcde(j) and dx_type(j) in (&dxtypelistb) then diagcde(i)=" "; end; The error message is indicating that "%if statement is not valid in open code" nor is the %else but what does this mean and how can I edit above to work? Thanks for any and all assistance.
... View more