Chrisw75 & dje thanks for the help
I initially tried this code
data valex.BG;
set cmn.Camt_promo_history;
keep contact_urn source_account response_code campaign_ID date_extracted ;
where substr(response_code,1,5, in ('XP87P','XP88P','XP89P','XP90P','XP92P','XP93P'...