((ANAR01FL='Y' and (ANAPASCP>' ' or ANAPBSCP>' ' or ANAPCSCP>' ' or ANAPDSCP>' ')) or ANGEDSCP>' ' or HYPSRSCP>' ') and TEAE02FL='Y'
就是用if嵌套,把满足上述条件的id给output;
if TEAE02FL='Y' then do;
if ANAR01FL='Y' then do;
if ANAPASCP>' ' then output;
if ANAPBSCP>' ' then output;
if ANAPCSCP>' ' then output;
if ANAPDSCP>' ' then output;
end;
if ANGEDSCP>' ' then output;
if HYPSRSCP>' ' then output;
end;