In the code below, I'm trying to get yr='2018'. Instead it is blank. What am I doing wrong? Using SAS 9.4. data out; retain prx_yr; if _n_=1 then do; prx_yr=prxparse('/20\d\d/'); end; text='dir 2018 - Subject'; p=prxmatch(prx_yr,text); if prxmatch(prx_yr,text) then yr=prxposn(prx_yr,1,text); output; run;
... View more