I am running SAS 9.04.01M3P062415 on UNIX. I do no have predefined packages PCRXMATCH and PCRXFIND available to me. How can I have regular expressions functionality with PROC FEDSQL? The following code fails:
PROC DS2;
package regexp /overwrite=yes;
method match(varchar(1024) pattern, varchar(1024) string) returns varchar(1024);
return prxmatch(pattern, string);
end;
endpackage;
run;
QUIT;
PROC FEDSQL;
CREATE TABLE foo AS
SELECT
regexp.match('/[0-9]+/', id) AS test1,
regexp.match('/[A-Z]+/', id) AS test
FROM someDatabase.someSchema.someTable;
QUIT;
With an error message of:
ERROR: Access Violation occurred during PREPARE!
I can use the above function once in a query but not more than once? How can I get around this?
Try this Trick from @SASJedi (Mark Jordan)'s Book Mastering the SAS DS2 Procedure: Advanced Data-Wrangling Techniques, Second Edition, 5.2.2 FCMP Package Example
Hope it helps,
Ahmed
Try this Trick from @SASJedi (Mark Jordan)'s Book Mastering the SAS DS2 Procedure: Advanced Data-Wrangling Techniques, Second Edition, 5.2.2 FCMP Package Example
Hope it helps,
Ahmed
hey, friend Ahmed -
don't you think the error message could be more descriptive?
Cheers,
Chad Caulkins
Hi there,
The SAS Data Management team monitors this community, so rest assured it is aware of this request. You can also add an idea to the SASWare Ballot to more officially submit it .
Best,
Anna
Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.