PCRE for z/OS
PCRE2 plans
About C and Patches
Important Points

PCRE for z/OS is a port of the open source PCRE package to the 'MainFrame'.  The port is complete and self contained, including instalstion JCL and documentation.  However the main documentation of PCRE is to be found on www.pcre.org.  The main download site is this the good ol' cbttape.org file 939.  This one is packeged in the old z/OS style with XMIT files in EBCDIC 

z/OS is an operating system for mainframe computers, produced by IBM.  The character set used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and applications can be supported through UNIX System Services, and in such an environment PCRE could probably be built in the same way as in other systems.  Note that you still need to follow the steps to build the correct character table, so using my port as the source code with Unix scripts would probably be a good idea. I did not try that and you are on your own.

However, in native z/OS (without UNIX System Services), special port is required.  This page contains the latest downloadable versions of the port, ready to be installed.

Please visit the 'PCRE for z/OS' page for more information.

The files below contain the source code and you may build everything from there after consulting with the documentation.  Besides the source code and all JCL, etc. needed for building the package, the distribution also contains all libraries including the LOADLIB (binaries) in XMIT format.  If you load those libraries, make sure to unzip and upload in binary and then issue the appropriate RECEIVE commands.

Mainframe upload issue: The logical not sign in extended ASCII (,ISO8859-1) is x'AC'.  If your upload (FTP or INF$FILE) is set to support ASCII, the leftmost bit would be chopped and it would become X'2C' which would be translated to comma.  The solution is to use ISO 8859-1 instead of ASCII.  If you do FTP add the command:

quote site sbdataconn=(IBM-1047,ISO8859-1)

[For IBM-1047 if that's your environment.]  In addition, the ADDMEM utility has the capability to get parameters through the TRANSLAT DD with pairs of Rexx hex codes.  The utility would translate any occurance of the left hand code to the right hand code.

[For technical reasons, all downloads are from the http.cbttape.org site - if you need it in ASCII format, please contact me on zatlas1@yahoo.com]

As a complementary to the PCRE library, I've adapted the standard IBM regex.h header file to COBOL, to allow usage of the standard IBM C Run-Time library functions from within COBOL.  The new version (V1) attempts to cater to GNU COBOL as well, but there appears to be a bug in that implementation call sequence.