I looked into writing a sample E15 that would call the LE (I think) Regular Expression code. But didn't get very far with it. Sorry! I was convinced it could be done but marshalling of parameters etc would be fiddly - and it's a long way from my (increasingly ineptly named) :-) day job.
Anyone? Cheers, Martin Martin Packer, zChampion, Principal Systems Investigator, Worldwide Banking Center of Excellence, IBM +44-7802-245-584 email: martin_pac...@uk.ibm.com Twitter / Facebook IDs: MartinPacker Blog: https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker From: Kirk Wolf <k...@dovetail.com> To: IBM-MAIN@bama.ua.edu, Date: 05/30/2012 09:58 PM Subject: Re: Can DFSORT do pattern matching? Sent by: IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu> On Wed, May 30, 2012 at 8:04 AM, Shmuel Metz (Seymour J.) < shmuel+ibm-m...@patriot.net> wrote: > In > <cak6gkd3evkgu6kxu-m3f5+lpt6qlvyut2uhrokxid9l-fog...@mail.gmail.com>, > on 05/30/2012 > at 07:37 AM, (N agesh S) <nageshbl...@gmail.com> said: > > >What would be cool is a regex pattern engine that DFSORT can invoke. > >So, once the tiny detail of invoking the Java class > > Why use a Java class. Surely something like PCRE would be more > efficient. > > I like this idea - maybe EFS02 (or E15/35?) exits that uses PCRE? Here is an interesting article written by an IBMer on using PCRE to implement UDFs in DB2 (but not on z/OS :-( http://www.ibm.com/developerworks/data/library/techarticle/0301stolze/0301stolze.html I wonder if anyone has ported PCRE to z/OS, and whether it could be done with Metal C, or if a C RTL is required. Would I suppose that a DFSORT exit written in full C would require CEEPIPI, etc, I can't tell if the COBEXIT=COB2 LE support would suffice for a C exit. Has anyone written DFSORT exits in C? Also, one could always use the POSIX-compatible regcomp()/regexec()/regerror()/regfree() functions in the C RTL. These are the basis of z/OS Unix grep/fgrep/egrep; but not as nice as PCRE IMO. Kirk Wolf Dovetailed Technologies http://dovetail.com FWIW: Since PCRE is a BSD license (i.e. not copy-left), perhaps IBM should consider adding built-in conditionals based on it ? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN