Without changing the syntax you should think of using a macro variable anytime you type something over again like this: %let list = ("4330","43301","43310","43311","43320","43321","43330","43331","43380","43381","43390","43391","4340","43401", "43410","43411","43490","43491","4350","4351","4352","4353","4358","4359"); proc sql; create table ABC as select t1.age, t1.gender, t1.diagnosis1, t1.diagnosis2, t1.diagnosis3, t1.diagnosis4 from work.testfile t1 where t1.diagnosis1 in &list or t1.diagnosis2 in &list or t1.diagnosis3 in &list or t1.diagnosis_oth4_cd in &list; I would probably use a proc tranpose but I'm sure there are a lot of ways.
... View more