Dear all. I need help. I am creating population for a big national study. and while creating the last population I encountered a challenge. As I see it my outcome does not match. I want to end up with a dataset where all contains the variable Dato_diagnose, all contain one of the following: Labsvar_resultid1="03", Labsvar_resultid2="03", Labsvar_resultid3="03", Labsvar_resultid4="03", Labsvar_resultid5="03" and does not contain any of the following: Koloskopi1_dt, Koloskopi2_dt, Koloskopi3_dt, Koloskopi4_dt, Koloskopi5_dt. my code is this: data Pop6; set All1; where not missing(Dato_diagnose) and Labsvar_resultid1="03" or Labsvar_resultid2="03" or Labsvar_resultid3="03" or Labsvar_resultid4="03" or Labsvar_resultid5="03" and missing(Koloskopi1_dt) and missing(Koloskopi2_dt) and missing(Koloskopi3_dt) and missing(Koloskopi4_dt) and missing(Koloskopi5_dt); run; SAS runs the code, but the output contains missing data on Dato_diagnosis and it contains all the Koloskopi1_dt etc. what have I done wrong? kind regards
... View more