Thanks for all the help everybody. I ended up going a different direction to get the same results.
IF INLIST(curservcat, "00015", "00016", "00017", "00018", "00019", "00043", "00044", "00047", "00048") = .F. then
USE ai_enc
SET FILTER TO 'program' = curprog .and. serv_cat = curservcat .AND...