Interesting stuff.  Of course I've never actually used regular expressions 
until today, so I don't know if I'll find any good actual use for PCRE (not to 
mention, as others have said, perhaps not even being allowed to use it in 
production...), but I am going to look at it.

You are welcome to use my example as long as you fix the call to regerror as 
follows:
call 'regerror' using regex msgbuf
                      value length of msgbuf
(I don't know if msgbuf is a null terminated string; if it is there should 
probably be code to handle that, but...)

What would really(!!) be nice is if COBOL supported them directly.  Something 
like:

if my-string is equal to function regex("^a[[:alnum:]]")
   [...]

Just dreaming!  :-)


One other comment...  I personally kind of like using null-terminated strings 
as input procedures, i.e.

call 'subroutine' using content z'This is a null-terminated string'
rather than
call 'subroutine' using content 'This is a null-terminated string' value 32

I'm going to see if I can convince the COBOL compiler development group to 
support the "ANY LENGTH" option of the COBOL 201X (proposed) standard which 
would allow for varying length strings (like VAR and VARZ in PL/I).  Or at 
least the "ANY LENGTH" clause that is supported in COBOL 2002 (which is more 
limited than in COBOL 201X, but still useful in a case like this).  


Frank





>________________________________
> From: Ze'ev Atlas <zatl...@yahoo.com>
>To: IBM-MAIN@LISTSERV.UA.EDU 
>Sent: Wednesday, July 3, 2013 4:58 PM
>Subject: Re: Announcing PCRE 8.33 for native z/OS
> 
>
>Frank
>You are absolutely correct that it could be done in COBOL and PL/I.  The 
>problem is that the culture does not lend itself to that.
>In any case, PCRE is mature and working library with most all (even esoteric) 
>options.  So there is a value int it after all:)
>Since I noticed that not all people have access to C compiler, the new distro 
>has all libraries including binaries in XMIT (PDS or PDSE) format.
>
>I have a personal request, could I get your explicit permission to distribute 
>your code with mine (same license and mentioning your name) o I can show 
>people how it could be done in the simple level
>Thanks
>ZA
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to