DATA Step, Macro, Functions and more

How do you use regular expressions with PROC FEDSQL?

Reply
Frequent Contributor
Posts: 101

How do you use regular expressions with PROC FEDSQL?

The SAS function PRXMATCH does  not work.  How can I get regular expression functionality with PROC FEDSQL?

PROC Star
Posts: 266

Re: How do you use regular expressions with PROC FEDSQL?

Posted in reply to tomcmacdonald

It seems you can use functions from DS2 packages in FEDSQL. So something like this may be a workaround:

/*  DS2 code */
proc ds2;
   package prxfunc;
      method match(char prx, char source) returns integer;
         return prxmatch(prx,source);
      end;
   endpackage;
 run;
quit;

/* fedsql code */
proc fedsql;
   select * from mytable
      where prxfunc.match('/Joe/',firstname);
quit;
Ask a Question
Discussion stats
  • 1 reply
  • 80 views
  • 0 likes
  • 2 in conversation