I apply the anyalpha function as a filter in row 35, however, it fails to stop all the cases where there is an alphabetic character. However, when I attempt to flag them after creating a new variable it does pick them up (see row 51). What gives? 28 data POS17; 29 length CCN $6; 30 set SAS.POS_DEC17(keep=&POSVARS); 31 /*AP filters, see item A.1.a.*/ 32 if PRVDR_CTGRY_CD = '01' 33 and PRVDR_CTGRY_SBTYP_CD = '01' 34 and length(PRVDR_NUM) = 6 35 and anyalpha(PRVDR_NUM) = 0 36 and ELGBLTY_SW EQ "Y" 37 and ORGNL_PRTCPTN_DT le "2017.0101" 38 and TRMNTN_EXPRTN_DT = '' or TRMNTN_EXPRTN_DT gt "2017.0101" 39 ; 40 if STATE_CD in ('AS', 'FN', 'GU', 'MP', 'MX', 'PR', 'VI', 'MD') 41 or PRVDR_NUM in ('050204' '100006' '310008' '330059' 42 '050238' '100073' '310012' '330119' 43 '050351' '100080' '310019' '330167' 44 '050481' '100131' '310054' '330198' 45 '050485' '100228' '310074' '330205' 46 '050603' '100253' '330024' '330214' 47 '050678' '100275' '330045' '360027' 48 '070022' '310005' '330046' '450056') 49 then delete; 50 ccn=trim(Prvdr_num); 51 if _n_ lt 10000 and anyalpha(CCN) gt 0 then put _n_= PRVDR_NUM=; 52 run; _N_=4259 PRVDR_NUM=03C0001312 _N_=4370 PRVDR_NUM=03X0009825 _N_=6220 PRVDR_NUM=04A327
... View more