title: subsetting a dataset based on same conditions on a numbered list variables in SAS
body: <p>I have a dataset at hand that looks like the following:</p>
  
  <p>ID      MED1     MED2    MED3   MED4</p>
  
  <p>1       892        384      454       345</p>
  
  <p>2       802        394      434       233</p>
  
  <p>3       852        384      334       599</p>
  
  <p>I want to subset the dataset so that only patients who have been prescribed meds in code {892, 334, 599, 384} remains. I don't want to repeat the list of 4 codes in all 4 variables in the data step. Can anyone show me how to do it? Thanks. </p>