Because you are generating the variable address in this same step your where clause will not work, you should use having instead. I made some other minor changes that I think will help as well: DATA have; infile cards dsd; length addr1 addr2 $10.; input addr1$ addr2$ name1$ name2$ dob phone phone2; cards; po box 935,lola park,bob,smith,20051201,412,5551212 ; run; proc sql; create table want as select catx(' ',addr1,addr2) as address,name1,name2,dob,phone,phone2 from have having upcase(address) like '%PO BOX 935 LOLA PARK%';
... View more