Re: Announcing PCRE 8.33 for native z/OS
A third way is for the wrapper to be a REXX-aware procedure. Would you please elaborate more on that possibility Thanks ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I'm showing my ignorance here - but maybe it's a better class of ignorance :-) ... Why \2 and not \1? I recognise this as a backreference but don't know what happened to the first one. 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: Elardus Engelbrecht elardus.engelbre...@sita.co.za To: IBM-MAIN@listserv.ua.edu, Date: 07/08/2013 11:24 AM Subject:Re: Announcing PCRE 8.33 for native z/OS Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu John McKown wrote: I finally got how to parse the string and allow it to start and end with either a ' or a . The start and end character must be the same. ($x)=$line=~m/((:(['])[^\2]*\2)+)/; Thanks! You have cured my curiousity. ;-D Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Martin Packer wrote: I'm showing my ignorance here - but maybe it's a better class of ignorance :-) ... Hehe. Good one! ;-D Why \2 and not \1? I recognise this as a backreference but don't know what happened to the first one. Which of the two \2 are you refering? Just curious of course if you don't mind, please. Groete / Greetings Elardus Engelbrecht Joke of the day: Blondie girl is on the hunting field and sees a nice kudu bull. She aims and shoot! Bang, dead is that poor kudu. She, beautiful girl of course, went to the carcas and sees a nice guy standing there. She shouts What are you doing with my kudu? It is my horse you shot, you b*tch! Its MY kudu! My horse Kudu! Ok, ok, ok, take your bloody kudu, but may I please remove my saddle? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
The refer back number are assigned in the order of the opening parenthesis which starts the definition of the group. ((:(['])[^\2]*\2)+) | | | | | \---/ | | 2| \--/ 1 \1 would refer to that entire expression, and \2 to the inner group. Note that the unmarked (: and ) are not assigned a referback number because (: creates a non-capturing group. So \2 captures the leading or '. \1 captures the entire string. The (:...) groups stuff together so that I can put a + after it. This is what allows \1 to extend past the first leading ( or ') in the case of an embedded, doubled (or ') inside the string. On Mon, Jul 8, 2013 at 6:25 AM, Martin Packer martin_pac...@uk.ibm.com wrote: I'm showing my ignorance here - but maybe it's a better class of ignorance :-) ... Why \2 and not \1? I recognise this as a backreference but don't know what happened to the first one. 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: Elardus Engelbrecht elardus.engelbre...@sita.co.za To: IBM-MAIN@listserv.ua.edu, Date: 07/08/2013 11:24 AM Subject:Re: Announcing PCRE 8.33 for native z/OS Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu John McKown wrote: I finally got how to parse the string and allow it to start and end with either a ' or a . The start and end character must be the same. ($x)=$line=~m/((:(['])[^\2]*\2)+)/; Thanks! You have cured my curiousity. ;-D Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.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...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
It was both but John's answered the question. 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: Elardus Engelbrecht elardus.engelbre...@sita.co.za To: IBM-MAIN@listserv.ua.edu, Date: 07/08/2013 12:43 PM Subject:Re: Announcing PCRE 8.33 for native z/OS Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu Martin Packer wrote: I'm showing my ignorance here - but maybe it's a better class of ignorance :-) ... Hehe. Good one! ;-D Why \2 and not \1? I recognise this as a backreference but don't know what happened to the first one. Which of the two \2 are you refering? Just curious of course if you don't mind, please. Groete / Greetings Elardus Engelbrecht Joke of the day: Blondie girl is on the hunting field and sees a nice kudu bull. She aims and shoot! Bang, dead is that poor kudu. She, beautiful girl of course, went to the carcas and sees a nice guy standing there. She shouts What are you doing with my kudu? It is my horse you shot, you b*tch! Its MY kudu! My horse Kudu! Ok, ok, ok, take your bloody kudu, but may I please remove my saddle? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I am not sure of being in a position to commit to doing this. For me, doing so would make it a matter of honor to work on it regardless. A weird aspect of my personality, I guess. In any case, I don't know of any way to actually integrate PCRE into REXX. It would be neat to be able to do something like: PARSE VAR SOMEDATA PCRE'...' MATCH1 MATCH2 But that is not possible. So I'm wondering what syntax should be used? I can think of two possibilities. One is easier to implement than the second. But the second is more REXX-like. The easier to implement would be something like: CALL *(REXXPCRE) 'PCRE VARTOPARSE MATCH1 MATCH2 ' Where REXXPCRE is passed a list of names. The first contains the string which is the PCRE expression. The second is the data to parse. The rest are names of variables to be created or updated by REXXPCRE with the data matched by the n-th capture group. If there are more variables than capture groups matched, I guess I could set the extra to '' (null). Thats' basically what PERL does. Another thought, or as an alternate to the above would be to use a stem as in: CALL *(REXXPCRE) 'PCRE VARTOPARSE MATCH. Where MATCH.0 would equal the number of matches returned in MATCH.1, MATCH.2 and so on. If no matches, then MATCH.0==0. I am wondering about the return code as well. For the first, I would guess that I could return a positive number which would be the number of matches and a negative number if an error occurred. === The more difficult, but REXXier way would be to do like SDSF does, or z/OS UNIX and set up an ADDRESS PCRE environment. But I would then need to figure out the syntax of the PCRE environment commands. rc=pcrecall(ON) /* Establish PCRE command environment */ ADDRESS PCRE (X)=M/.../ /* DO A MATCH AGAINST THE IMPLIED VARIABLE _ */ /* return match in X*/ (A,B)=VAR=~M/.../ /* scan VAR, return first two matches in A and B */ C=M/.../' /* DO MATCH AGAINST _ */ /* RETURN COUNT OF MATCHES IN C */ /* _ is default to be compatable with PERL */ (X)=S/pcre-to-match/replacement/ /* do substitution regexp on value in _, returning value in X Basically, being a Perl user, tried to adapt the Perl syntax as a REXX command environment. Even if I assume that I am capable of writing the above, it is likely going to take a while. If I cheat and do this at work in some spare time, all I can use is HLASM. No, I'm not going to write it in COBOL! grin/. I might be able to use C on a different system, but that would be nights and weekends from home only. I normally take weekends off dead to the world. And my dog gets royally upset if I stay at my computer very long. On Sun, Jul 7, 2013 at 11:42 AM, Ze'ev Atlas zatl...@yahoo.com wrote: do I have the talent and do I have the commitment. I am sure you do have the first Please contact me of the group if you decide that you have the second. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
CALL *(REXXPCRE) 'PCRE VARTOPARSE MATCH.' I would go with that one any time, but you will need a persistent LE environment (i.e. use PIPI) if you do not want to compile the PCRE expression every time you call it, etc. etc. I researched the thing for a while before I gave up because my knowledge is lacking in that area. BTW, for maintainability, C is prteferred ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Compiling matters if you do it lots of time. Just a few - as in some situational apps - and it won't matter much. 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: Ze'ev Atlas zatl...@yahoo.com To: IBM-MAIN@listserv.ua.edu, Date: 07/08/2013 05:22 PM Subject:Re: Announcing PCRE 8.33 for native z/OS Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu CALL *(REXXPCRE) 'PCRE VARTOPARSE MATCH.' I would go with that one any time, but you will need a persistent LE environment (i.e. use PIPI) if you do not want to compile the PCRE expression every time you call it, etc. etc. I researched the thing for a while before I gave up because my knowledge is lacking in that area. BTW, for maintainability, C is prteferred ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In of7d634a67.876492a9-on80257ba2.0039bb20-80257ba2.003eb...@uk.ibm.com, on 07/08/2013 at 12:25 PM, Martin Packer martin_pac...@uk.ibm.com said: Why \2 and not \1? I recognise this as a backreference but don't know what happened to the first one. Per syntax for unnamed capture n is $n and \n. There are also named captures; I don't know which syntax PCRE uses for them, but Perl uses (?foobar), (?'foobar), \g{foo} and $+{foo} capture the match bar as foo and to refer back to the match. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In caajsdjgzb_vpkhqngvr3_j7vu9yvof3bjqhojhk25sfjypd...@mail.gmail.com, on 07/08/2013 at 11:00 AM, John McKown john.archie.mck...@gmail.com said: But that is not possible. So I'm wondering what syntax should be used? I can think of two possibilities. There's a third easy possibility, but Ze'ev seems to want a permanent LE environment as well, which makes things much more difficult for all three. The easier to implement would be something like: CALL *(REXXPCRE) 'PCRE VARTOPARSE MATCH1 MATCH2 ' That by itself doesn't allow for named captures, although a variation of it would. The more difficult, but REXXier way would be to do like SDSF does, or z/OS UNIX and set up an ADDRESS PCRE environment. But I would then need to figure out the syntax of the PCRE environment commands. More precisely, you would need to design a syntax that is easy to use and easy to parse. But you need to do that for all three approaches. A third way is for the wrapper to be a REXX-aware procedure. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 5040929914304175.wa.zatlas1yahoo@listserv.ua.edu, on 07/05/2013 at 05:17 PM, Ze'ev Atlas zatl...@yahoo.com said: I have to disagree. Most applications do use LE in the native z/OS context. Not those written in REXX. Further, PCRE is not an application; it is a package used by applications. There are options for compiling C code without the requirement for LE. I do not have the resources to deal with PIPI, and frankly, I don't want to. Nor would that be appropriate for a REXX-callable routine. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Not those written in REXX. Further, PCRE is not an application; it is a package used by applications. There are options for compiling C code without the requirement for LE. Most business appplications that I've encountered are written in COBOL and PL/I. Rexx comes distance third in shops that do not have easytrieve. However that main issue is maintenance, I do not have the expertise to deal with Rexx or the options for compiling C without LE and I do not want to maintain two versions. On the positive side, if you or anybody else would like to volunteer and cover the Rexx side of the equation or any other aspect that I either did not cover at all or asked for volunteers, I will be more than happy to expand the project team from one and a half persons to as many contributors that would seriously volunteer. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I have been thinking about volunteering to see if I could extend your work into the REXX world. I am unsure of two things: do I have the talent and do I have the commitment. The latter is the big problem. I get tired so easily now that I end up doing little beyond what is needed. Work environment is such that this is actually encouraged because there is little positive feedback, but many to lay blame if anything goes wrong. On Jul 7, 2013 9:38 AM, Ze'ev Atlas zatl...@yahoo.com wrote: Not those written in REXX. Further, PCRE is not an application; it is a package used by applications. There are options for compiling C code without the requirement for LE. Most business appplications that I've encountered are written in COBOL and PL/I. Rexx comes distance third in shops that do not have easytrieve. However that main issue is maintenance, I do not have the expertise to deal with Rexx or the options for compiling C without LE and I do not want to maintain two versions. On the positive side, if you or anybody else would like to volunteer and cover the Rexx side of the equation or any other aspect that I either did not cover at all or asked for volunteers, I will be more than happy to expand the project team from one and a half persons to as many contributors that would seriously volunteer. 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
Re: Announcing PCRE 8.33 for native z/OS
do I have the talent and do I have the commitment. I am sure you do have the first Please contact me of the group if you decide that you have the second. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I find ignorance of the phrase 'nonce word' almost, but not quite, as amusing as others apparently found my use of it. It is not a highfalutin phrase, and someone who announces his ignorance of it also announces his unfamiliarity with the cryptography literature. Ignorance and, still more, rejoicing in it are, finally, as defining as knowledge. John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
My experience was that writing function packages was hard unless you can hook in early with a REXX environment definition. That requires system administration for installation which may be a game changer. The easier option is a subcommand environment which you can establish with an address LINK INITPGM call that calls your INITPGM program to initialize the REXX command processing environment. That's a nice interface and similar to TSO and ISPF. The rub is that you need to write code to parse the commands, get/set variables and do all the other book-keeping stuff. It's quite a bit of work. And if you want to call LE code you need assembler bridging stubs to pass control from REXX to your LE program. If there's no money in it you may want to rethink your project. On 5/07/2013 10:52 AM, Ze'ev Atlas wrote: Which Perl? I am using v5.14.2 7. I contemplated interfacing with Rexx, but I cannot come with specific well defined API that would agree with that language. The obvious way is to return, e.g., capture buffers, %+ and %- in REXX variables. I will look into that when I get to it. Thank you. I've written REXX-callable functions for CMS and TSO; I don't have a system to test on. If and when you could, your help would be welcome written in, you guessed, Perl Will they work in 5.8.7? That's currently the last Perl for z/OS. Sorry for that situation. I heard that some people are working on bringing a later version and I think IBM should have done better, bt that's not in my hands. I use Windows 7 machine with ActiveState Perl. 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
Re: Announcing PCRE 8.33 for native z/OS
It's quite a bit of work. And if you want to call LE code you need assembler bridging stubs to pass control from REXX to your LE program. If there's no money in it you may want to rethink your project. Thank you for the thorough comments. Yes, I've realized it early on by reading through the IBM documentation and even familiarize myself with things like PIPI and other aspects of Rexx interfaces. That's why the Rexx interface part of my project has been pushed to the lowest priority, unless somebody who really knows what he/she is doing volunteers for the fun and 'fame' of being part of an open source project. The Posix and GREP issues are mow resolved and I am planning to publish the next revision soon. This is my current road-map: Roadmap (by order of priority) * PL/I abends on S0C4 and I do not have the expertise to check why (volunteers needed.) * Running through all the existing test suite and creating an EBCDIC specific test suite and reference results (volunteers needed.) * Produce a more complete and better written documentation (I am doing my best.) * Porting of related packages (such as PCRS and/or PCRE-subst). * Compiling and testing under most important EBCDIC codepages (in numerical order (I do not have access to such installations - volunteers needed:) 1. IBM1047 - most common in the United States 2. IBM1026 - Turkish 3. IBM1140 – old code page 037 4. IBM1148 - CP500 5. IBM285 – UK 6. IBM424 - Hebrew 7. IBM875 - Greek * Adapt the C++ wrapper (if possible because of EBCDIC vs. UTF-8 issues) * Possible porting to USS anyway is a distant option. * Rexx interface -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
What you really have to consider is is there any interest in regular expressions on the mainframe anyway. I have my doubts outside of the z/OS UNIX community. Regular expressions are extremely powerful but most mainframers probably can't be bothered to learn them. It's a case of old dogs and new tricks. RE grammers are tricky to learn and a COBOL UNSTRING maybe easier to understand than weird gobbledygook RE voodoo even if it saves them a hundreds of lines of code. REXX is probably a better target audience than compiled languages. On 5/07/2013 9:05 PM, Ze'ev Atlas wrote: It's quite a bit of work. And if you want to call LE code you need assembler bridging stubs to pass control from REXX to your LE program. If there's no money in it you may want to rethink your project. Thank you for the thorough comments. Yes, I've realized it early on by reading through the IBM documentation and even familiarize myself with things like PIPI and other aspects of Rexx interfaces. That's why the Rexx interface part of my project has been pushed to the lowest priority, unless somebody who really knows what he/she is doing volunteers for the fun and 'fame' of being part of an open source project. The Posix and GREP issues are mow resolved and I am planning to publish the next revision soon. This is my current road-map: Roadmap (by order of priority) * PL/I abends on S0C4 and I do not have the expertise to check why (volunteers needed.) * Running through all the existing test suite and creating an EBCDIC specific test suite and reference results (volunteers needed.) * Produce a more complete and better written documentation (I am doing my best.) * Porting of related packages (such as PCRS and/or PCRE-subst). * Compiling and testing under most important EBCDIC codepages (in numerical order (I do not have access to such installations - volunteers needed:) 1. IBM1047 - most common in the United States 2. IBM1026 - Turkish 3. IBM1140 – old code page 037 4. IBM1148 - CP500 5. IBM285 – UK 6. IBM424 - Hebrew 7. IBM875 - Greek * Adapt the C++ wrapper (if possible because of EBCDIC vs. UTF-8 issues) * Possible porting to USS anyway is a distant option. * Rexx interface -- 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
Re: Announcing PCRE 8.33 for native z/OS
I think you are right. I am one of those old dogs, who tries to avoid things with slashes whenever possible. I also wonder where and when regular expressions would be of great help to me. From what I saw others do with them, I think that they are quite useful in an unstructured chaotic environment, where you really need the get a picture by trying to find meaningful patterns. I think z/OS is that much structured that you seldom need mass force tools to get a pattern. And when I do, it often concerns processing months of SMF data with SAS, and I don't see Rexx with regular expressions do this. But I might be wrong of course. Kees. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of David Crayford Sent: Friday, July 05, 2013 15:24 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS What you really have to consider is is there any interest in regular expressions on the mainframe anyway. I have my doubts outside of the z/OS UNIX community. Regular expressions are extremely powerful but most mainframers probably can't be bothered to learn them. It's a case of old dogs and new tricks. RE grammers are tricky to learn and a COBOL UNSTRING maybe easier to understand than weird gobbledygook RE voodoo even if it saves them a hundreds of lines of code. REXX is probably a better target audience than compiled languages. On 5/07/2013 9:05 PM, Ze'ev Atlas wrote: It's quite a bit of work. And if you want to call LE code you need assembler bridging stubs to pass control from REXX to your LE program. If there's no money in it you may want to rethink your project. Thank you for the thorough comments. Yes, I've realized it early on by reading through the IBM documentation and even familiarize myself with things like PIPI and other aspects of Rexx interfaces. That's why the Rexx interface part of my project has been pushed to the lowest priority, unless somebody who really knows what he/she is doing volunteers for the fun and 'fame' of being part of an open source project. The Posix and GREP issues are mow resolved and I am planning to publish the next revision soon. This is my current road-map: Roadmap (by order of priority) * PL/I abends on S0C4 and I do not have the expertise to check why (volunteers needed.) * Running through all the existing test suite and creating an EBCDIC specific test suite and reference results (volunteers needed.) * Produce a more complete and better written documentation (I am doing my best.) * Porting of related packages (such as PCRS and/or PCRE-subst). * Compiling and testing under most important EBCDIC codepages (in numerical order (I do not have access to such installations - volunteers needed:) 1. IBM1047 - most common in the United States 2. IBM1026 - Turkish 3. IBM1140 – old code page 037 4. IBM1148 - CP500 5. IBM285 – UK 6. IBM424 - Hebrew 7. IBM875 - Greek * Adapt the C++ wrapper (if possible because of EBCDIC vs. UTF-8 issues) * Possible porting to USS anyway is a distant option. * Rexx interface -- 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 For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch Airlines) is registered in Amstelveen, The Netherlands, with registered number 33014286 -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
You're only as old a dog as the new trick you won't learn. :-) I, too, wouldn't try doing that much with regexps against SMF. What I would consider (and have blogged about) is regexps against individual SMF fields - jobname, etc. I see regexps as more useful for less structured data - such as finding things in listings. 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: Vernooij, CP - SPLXM kees.verno...@klm.com To: IBM-MAIN@listserv.ua.edu, Date: 07/05/2013 02:42 PM Subject:Re: Announcing PCRE 8.33 for native z/OS Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu I think you are right. I am one of those old dogs, who tries to avoid things with slashes whenever possible. I also wonder where and when regular expressions would be of great help to me. From what I saw others do with them, I think that they are quite useful in an unstructured chaotic environment, where you really need the get a picture by trying to find meaningful patterns. I think z/OS is that much structured that you seldom need mass force tools to get a pattern. And when I do, it often concerns processing months of SMF data with SAS, and I don't see Rexx with regular expressions do this. But I might be wrong of course. Kees. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of David Crayford Sent: Friday, July 05, 2013 15:24 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS What you really have to consider is is there any interest in regular expressions on the mainframe anyway. I have my doubts outside of the z/OS UNIX community. Regular expressions are extremely powerful but most mainframers probably can't be bothered to learn them. It's a case of old dogs and new tricks. RE grammers are tricky to learn and a COBOL UNSTRING maybe easier to understand than weird gobbledygook RE voodoo even if it saves them a hundreds of lines of code. REXX is probably a better target audience than compiled languages. On 5/07/2013 9:05 PM, Ze'ev Atlas wrote: It's quite a bit of work. And if you want to call LE code you need assembler bridging stubs to pass control from REXX to your LE program. If there's no money in it you may want to rethink your project. Thank you for the thorough comments. Yes, I've realized it early on by reading through the IBM documentation and even familiarize myself with things like PIPI and other aspects of Rexx interfaces. That's why the Rexx interface part of my project has been pushed to the lowest priority, unless somebody who really knows what he/she is doing volunteers for the fun and 'fame' of being part of an open source project. The Posix and GREP issues are mow resolved and I am planning to publish the next revision soon. This is my current road-map: Roadmap (by order of priority) * PL/I abends on S0C4 and I do not have the expertise to check why (volunteers needed.) * Running through all the existing test suite and creating an EBCDIC specific test suite and reference results (volunteers needed.) * Produce a more complete and better written documentation (I am doing my best.) * Porting of related packages (such as PCRS and/or PCRE-subst). * Compiling and testing under most important EBCDIC codepages (in numerical order (I do not have access to such installations - volunteers needed:) 1. IBM1047 - most common in the United States 2. IBM1026 - Turkish 3. IBM1140 – old code page 037 4. IBM1148 - CP500 5. IBM285 – UK 6. IBM424 - Hebrew 7. IBM875 - Greek * Adapt the C++ wrapper (if possible because of EBCDIC vs. UTF-8 issues) * Possible porting to USS anyway is a distant option. * Rexx interface -- 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 For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e
Re: Announcing PCRE 8.33 for native z/OS
On 5/07/2013 9:53 PM, John Gilmore wrote: The intellectual difficulty of learning to use regular expressions is being greatly exaggerated here. The principles involved could be written out, for the convenience of notionally reactionary mainframers, in some few eighty-column card images. I find your grammer more difficult to understand than any regex ;) John Gilmore, Ashland, MA 01721 - USA -- 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
Re: Announcing PCRE 8.33 for native z/OS
On Fri, 5 Jul 2013 15:42:44 +0200, Vernooij, CP - SPLXM kees.verno...@klm.com wrote: I am one of those old dogs, who tries to avoid things with slashes whenever possible. Bad bad bad dog! Are you avoiding z/OS, that thing with a nice slash? ;-D ...and I don't see Rexx with regular expressions do this. Neither me, but there are other tools with regular expressions, but I, for now, don't know them or have a need for them for now. It could be really nice if DFSORT + ICETOOL have regular expression parsing routines. This will ease my task much. ;-) But then, I'm dreaming again on a cold windy Friday... ;-D Groet / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
My mind was warped very early in college by a love affair with APL. Once you can use it, almost anything else seems normal. Most regular expressions are not that difficult, just a matter of learning a new syntax. But I will say that using assertions can be a bit difficult, at least to me. Regular Expressions at a bit like SQL queries to me. The simple ones are easy to understand and learn. But the complicated ones can bend your mind around until you're biting yourself in the rump. One that always makes me sweat is matching the contents inside ' marks, where a single ' is encoded as two ' marks next to each other within the outer ' marks. The same matching contents within parentheses where subparameters within parentheses are permitted. E.g. 'This isn''t quite right!' or (a,b,(c,d),e). Especially difficult is generating a good error message if the person messes up. I think this is a fairly decent tutorial site for them: http://www.regular-expressions.info/ On Fri, Jul 5, 2013 at 8:53 AM, John Gilmore jwgli...@gmail.com wrote: The intellectual difficulty of learning to use regular expressions is being greatly exaggerated here. The principles involved could be written out, for the convenience of notionally reactionary mainframers, in some few eighty-column card images. John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
David Crayford wrote: | I find your grammer more difficult to understand than any regex ;) and I find this entirely understandable and wholly predictable. Presumptive dialectal spelling jocularities aside, I am at least as unsympathetic to his views as he is to mine; and attempting to communicate across this barrier would be a mug's game for either of us.The purpose of my earlier post was only to suggest to others that REs are much easier to learn about than, say, Turing-machine notation, Church's lambda calculus, or Post's normal forms. John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
What you really have to consider is is there any interest in regular expressions on the mainframe anyway. I have my doubts ... Yes, my project is about cultural change more then actual porting of the specific library. than weird gobbledygook RE voodoo I like your description REXX is probably a better target audience than compiled languages. Yeah, I know, but I cannot do itmyself ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Touché. On 05/07/2013, at 10:33 PM, John Gilmore jwgli...@gmail.com wrote: David Crayford wrote: | I find your grammer more difficult to understand than any regex ;) and I find this entirely understandable and wholly predictable. Presumptive dialectal spelling jocularities aside, I am at least as unsympathetic to his views as he is to mine; and attempting to communicate across this barrier would be a mug's game for either of us.The purpose of my earlier post was only to suggest to others that REs are much easier to learn about than, say, Turing-machine notation, Church's lambda calculus, or Post's normal forms. John Gilmore, Ashland, MA 01721 - USA -- 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
Re: Announcing PCRE 8.33 for native z/OS
John McKown wrote: One that always makes me sweat is matching the contents inside ' marks, where a single ' is encoded as two ' marks next to each other within the outer ' marks. The same matching contents within parentheses where subparameters within parentheses are permitted. E.g. 'This isn''t quite right!' or (a,b,(c,d),e). Hmmm, now I got a memory check from your nasty remark! Bang! Reboot! ;-D Curiousity question: years ago I asked that question to a professor, but got no answer. Question: Can you replace those two quotes (outer and inner) with something not related to each other and then retry the parse? Something like this: 'This isn~}t quite right!' just temporarily change for parse. Alternatively there are two types of quotes: ' (single character with single mark) (single character with double marks) Can you alternate between them and do your reg parse? Like this: This isn''t quite right! (Note: One character left of The. Two characters between N an T. One character next to exclamation character.) Just curious if you don't mind please. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In CAE1XxDFDsvJ=883ktad9sboepptfdfujgds0udbxm91pdgz...@mail.gmail.com, on 07/05/2013 at 09:53 AM, John Gilmore jwgli...@gmail.com said: The intellectual difficulty of learning to use regular expressions is being greatly exaggerated here. The principles involved could be written out, for the convenience of notionally reactionary mainframers, in some few eighty-column card images. FSVO 'principles involved'; there are a lor of special options, e.g., greedy versus lazy, and the concept of backtracking is already enough to blow your size limit. OTOH, it is something that a professional programmer should know about in this day and age. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 51d6b5d8.7010...@gmail.com, on 07/05/2013 at 08:02 PM, David Crayford dcrayf...@gmail.com said: My experience was that writing function packages was hard Why? The interface is clean and well documented. Put IRXFUSER in a steplib. For PCRE I'm not sure that you need a function package as opposed to a single function. The rub is that you need to write code to parse the commands, For TSO, IKJPARSE is quite adequate. For other environments, that could be messy. get/set variables Piece of cake. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I use SRCHFOR a lot. However, to do complex searches it's terribly complicated (options panel). A simple regex can do so much more. The PCRE libray contains a PCREGREP grep utility. I tested it and in the next revision, hopefully next week, it will be fully out there. This means searching for a pattern on list of files. I will try it on PDS's. If there is enough public demand, I'll make sure to teach it to work on PDS libraries although this may be a major departure of the original C code-base... or we could write a real z/OS version that would know natively how to travel on a PDS. Remember, I am not paid... and this could be a major effort, but it could be taken commercially and just be based on this library or another. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Remember Shai Hess's project. --- zatl...@yahoo.com wrote: From: Ze'ev Atlas zatl...@yahoo.com To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Date: Fri, 5 Jul 2013 10:07:39 -0500 I use SRCHFOR a lot. However, to do complex searches it's terribly complicated (options panel). A simple regex can do so much more. The PCRE libray contains a PCREGREP grep utility. I tested it and in the next revision, hopefully next week, it will be fully out there. This means searching for a pattern on list of files. I will try it on PDS's. If there is enough public demand, I'll make sure to teach it to work on PDS libraries although this may be a major departure of the original C code-base... or we could write a real z/OS version that would know natively how to travel on a PDS. Remember, I am not paid... and this could be a major effort, but it could be taken commercially and just be based on this library or another. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN _ Netscape. Just the Net You Need. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
* PL/I abends on S0C4 and I do not have the expertise to check why (volunteers needed.) Are the diagnostic data available online? I will put it there over the weekend... the download page of zaconsultants.net ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
On 05/07/2013, at 10:37 PM, Shmuel Metz (Seymour J.) shmuel+...@patriot.net wrote: In 51d6b5d8.7010...@gmail.com, on 07/05/2013 at 08:02 PM, David Crayford dcrayf...@gmail.com said: My experience was that writing function packages was hard Why? The interface is clean and well documented. Put IRXFUSER in a steplib. With a persistent LE environment? For PCRE I'm not sure that you need a function package as opposed to a single function. The rub is that you need to write code to parse the commands, For TSO, IKJPARSE is quite adequate. For other environments, that could be messy. get/set variables Piece of cake. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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
Re: Announcing PCRE 8.33 for native z/OS
One that always makes me sweat is matching the contents inside ' marks, where a single ' is encoded as two ' marks next to each other within the outer ' marks. The same matching contents within parentheses where subparameters within parentheses are permitted. E.g. 'This isn''t quite right!' or (a,b,(c,d),e). I actually like the notion of escape sequences: 'This isn\'t quite right!' However, you may find this book rewarding (it specifically deals with that issue among others) Mastering Regular Expressions [Paperback] Jeffrey E.F. Friedl (Author) O'Reilly (Publisher) ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 2e91309a-e988-4950-9abe-d55e9125d...@gmail.com, on 07/05/2013 at 11:14 PM, David Crayford dcrayf...@gmail.com said: With a persistent LE environment? No. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 6124817942898068.wa.zatlas1yahoo@listserv.ua.edu, on 07/05/2013 at 10:19 AM, Ze'ev Atlas zatl...@yahoo.com said: I actually like the notion of escape sequences: I hate them. I much prefer how, e.g., Icon, Wylbur, handle the problem. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
On 05/07/2013, at 11:32 PM, Shmuel Metz (Seymour J.) shmuel+...@patriot.net wrote: In 2e91309a-e988-4950-9abe-d55e9125d...@gmail.com, on 07/05/2013 at 11:14 PM, David Crayford dcrayf...@gmail.com said: With a persistent LE environment? No. About as useful as a chocolate teapot then. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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
Re: Announcing PCRE 8.33 for native z/OS
To match a quoted string as in my example, using Perl. ($x)=$line=~m/((?:'[^']*')+)/; What makes this work is the + at the end of the ) of the (?: ). That makes the regexp look back at the start. If there is a second ' mark, it continues to scan. What I don't have the the recursive use of ( ) since I need to know the depth of nesting. On Fri, Jul 5, 2013 at 9:44 AM, Elardus Engelbrecht elardus.engelbre...@sita.co.za wrote: John McKown wrote: One that always makes me sweat is matching the contents inside ' marks, where a single ' is encoded as two ' marks next to each other within the outer ' marks. The same matching contents within parentheses where subparameters within parentheses are permitted. E.g. 'This isn''t quite right!' or (a,b,(c,d),e). Hmmm, now I got a memory check from your nasty remark! Bang! Reboot! ;-D Curiousity question: years ago I asked that question to a professor, but got no answer. Question: Can you replace those two quotes (outer and inner) with something not related to each other and then retry the parse? Something like this: 'This isn~}t quite right!' just temporarily change for parse. Alternatively there are two types of quotes: ' (single character with single mark) (single character with double marks) Can you alternate between them and do your reg parse? Like this: This isn''t quite right! (Note: One character left of The. Two characters between N an T. One character next to exclamation character.) Just curious if you don't mind please. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Ze'ev, This JCL works for me: //TSOUSERZ JOB (ACCT,ROOM),'PROGRAMMER', // CLASS=A,MSGCLASS=X,NOTIFY=SYSUID //* //JCLLIB JCLLIB ORDER=SYS1.IGY.SIGYPROC //* // //* COMPILE, LINK AND EXECUTE COBOL PROGRAM WITH ENTERPRISE COBOL // //COMPILE EXEC IGYWCLG, // PARM.LKED='MAP,LET,LIST', // LIBPRFX=SYS1.CEE, // LNGPRFX=SYS1.IGY, // PGMLIB=TSOUSER.TEST.REGXLOAD, // GOPGM=TSTREGEX //COBOL.SYSIN DD DISP=SHR,DSN=TSOUSER.TEST.REGXSRCE(TSTREGEX) //LKED.SYSLMOD DD DSN=PGMLIB(GOPGM),SPACE=,UNIT=,DISP=SHR //LKED.SYSINDD DUMMY //GO.SYSOUT DD SYSOUT=* //* As expected, SYSOUT output is: match no match COBOL options NODYNAM and CODEPAGE(1140) were used for the compile step. Note that here the COBOL libraries are SYS1.IGY.XXX, LE libraries are SYS1.CEE.XXX. You will need to change LNGPRFX and LIBPRFX to match your system. Note also that IBM's IGYWCLG (and IGYWCL) PROC's have SCEELKED as LKED SYSLIB, providing static link of regx modules into the load module. I did try a dynamic call version, with DYNAM compile option with both static program names in the CALL statements and also with initialized program name variables in the CALL statements, and like Frank S. I got S0C1's or S806 abends at execution time even with SCEELKED/RUN/RUN2 in the STEPLIB for the execution step, so dynamic call of these C runtime routines is apparently not possible, one must use NODYNAM static CALL's and link them into the load module. HTH Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Farley, Peter x23353 Sent: Thursday, July 04, 2013 5:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Ze'ev, I would if I could. I used our shop-standard SCLM system to store and compile the test program, and most of that translate process is driven by a complex series of Rexx exec's, not JCL. I do have some compile-and-link-outside-the-SCLM JCL though, so when I get a chance I will retest the program with just plain JCL and share my results. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Ze'ev Atlas Sent: Thursday, July 04, 2013 4:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Frank and Peter Would you be so kind to share the JCL needed to compile it in any flavor please. I do not mind whether somebody use PCRE or opting to use the Posix compliant IBM supplied modules, both are fine for any simple (or even semi-complex) regex (if you know what to expect from Posix vs. Perl compliance.) I'd like people to familirize ith the concept and use it. ZA -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I finally got how to parse the string and allow it to start and end with either a ' or a . The start and end character must be the same. ($x)=$line=~m/((:(['])[^\2]*\2)+)/; ([']) matches the starting or ' and captures it. The [^\2]* matches all following characters except to the starting character. The \2 matches the starting character (and might be the ending character) That entire pattern repeats one or more times to caputure doubled initial ' or characters within the string. If you want to know the starting character, replace the ($x) with ($x,$delimiter) On Fri, Jul 5, 2013 at 9:44 AM, Elardus Engelbrecht elardus.engelbre...@sita.co.za wrote: John McKown wrote: One that always makes me sweat is matching the contents inside ' marks, where a single ' is encoded as two ' marks next to each other within the outer ' marks. The same matching contents within parentheses where subparameters within parentheses are permitted. E.g. 'This isn''t quite right!' or (a,b,(c,d),e). Hmmm, now I got a memory check from your nasty remark! Bang! Reboot! ;-D Curiousity question: years ago I asked that question to a professor, but got no answer. Question: Can you replace those two quotes (outer and inner) with something not related to each other and then retry the parse? Something like this: 'This isn~}t quite right!' just temporarily change for parse. Alternatively there are two types of quotes: ' (single character with single mark) (single character with double marks) Can you alternate between them and do your reg parse? Like this: This isn''t quite right! (Note: One character left of The. Two characters between N an T. One character next to exclamation character.) Just curious if you don't mind please. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 7643d8d7-4c7b-4174-8848-b7098161f...@gmail.com, on 07/05/2013 at 11:41 PM, David Crayford dcrayf...@gmail.com said: About as useful as a chocolate teapot then. Yes, a PCRE port that requires a persistent LE environment is about as useful as a chocolate teapot. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Ah! So I didn't imagine it after all! :-) Does your shop really use the IBM supplied compile procs? Interesting... From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Friday, July 5, 2013 10:21 AM Subject: Re: Announcing PCRE 8.33 for native z/OS I did try a dynamic call version, with DYNAM compile option with both static program names in the CALL statements and also with initialized program name variables in the CALL statements, and like Frank S. I got S0C1's or S806 abends at execution time even with SCEELKED/RUN/RUN2 in the STEPLIB for the execution step, so dynamic call of these C runtime routines is apparently not possible, one must use NODYNAM static CALL's and link them into the load module. HTH Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Farley, Peter x23353 Sent: Thursday, July 04, 2013 5:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Ze'ev, I would if I could. I used our shop-standard SCLM system to store and compile the test program, and most of that translate process is driven by a complex series of Rexx exec's, not JCL. I do have some compile-and-link-outside-the-SCLM JCL though, so when I get a chance I will retest the program with just plain JCL and share my results. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Ze'ev Atlas Sent: Thursday, July 04, 2013 4:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Frank and Peter Would you be so kind to share the JCL needed to compile it in any flavor please. I do not mind whether somebody use PCRE or opting to use the Posix compliant IBM supplied modules, both are fine for any simple (or even semi-complex) regex (if you know what to expect from Posix vs. Perl compliance.) I'd like people to familirize ith the concept and use it. ZA -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- 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
Re: Announcing PCRE 8.33 for native z/OS
Aw krap, now I have to look that up too. :-( On 7/5/2013 9:41 AM, David Crayford wrote: Touché. On 05/07/2013, at 10:33 PM, John Gilmore jwgli...@gmail.com wrote: David Crayford wrote: | I find your grammer more difficult to understand than any regex ;) and I find this entirely understandable and wholly predictable. Presumptive dialectal spelling jocularities aside, I am at least as unsympathetic to his views as he is to mine; and attempting to communicate across this barrier would be a mug's game for either of us.The purpose of my earlier post was only to suggest to others that REs are much easier to learn about than, say, Turing-machine notation, Church's lambda calculus, or Post's normal forms. John Gilmore, Ashland, MA 01721 - USA -- 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 -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
About as useful as a chocolate teapot then. Yes, a PCRE port that requires a persistent LE environment is about as useful as a chocolate teapot. I have to disagree. Most applications do use LE in the native z/OS context. This is similar to other operating systems where scripting languages (like Perl) interact with C. I like Rexx, I do all my mainframe and some non-mainframe scripting in Rexx. However, the z/OS implementation of Rexx and its environment is pretty arcane. PCRE, and for that matter, the Posix compliant IBM run-time supplied functions are written in C and interact with the rest of the world as standard LE applications. I do not have the resources to deal with PIPI, and frankly, I don't want to. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
No, actually we do not. I deliberately used the IBM supplied PROC to ensure the widest possible audience. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Friday, July 05, 2013 5:49 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Ah! So I didn't imagine it after all! :-) Does your shop really use the IBM supplied compile procs? Interesting... From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Friday, July 5, 2013 10:21 AM Subject: Re: Announcing PCRE 8.33 for native z/OS I did try a dynamic call version, with DYNAM compile option with both static program names in the CALL statements and also with initialized program name variables in the CALL statements, and like Frank S. I got S0C1's or S806 abends at execution time even with SCEELKED/RUN/RUN2 in the STEPLIB for the execution step, so dynamic call of these C runtime routines is apparently not possible, one must use NODYNAM static CALL's and link them into the load module. HTH Peter -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Is a grammer an unprofessional programmer? Or someone against grammar? On Sat, Jul 6, 2013 at 8:27 AM, Farley, Peter x23353 peter.far...@broadridge.com wrote: No, actually we do not. I deliberately used the IBM supplied PROC to ensure the widest possible audience. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Friday, July 05, 2013 5:49 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Ah! So I didn't imagine it after all! :-) Does your shop really use the IBM supplied compile procs? Interesting... From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Friday, July 5, 2013 10:21 AM Subject: Re: Announcing PCRE 8.33 for native z/OS I did try a dynamic call version, with DYNAM compile option with both static program names in the CALL statements and also with initialized program name variables in the CALL statements, and like Frank S. I got S0C1's or S806 abends at execution time even with SCEELKED/RUN/RUN2 in the STEPLIB for the execution step, so dynamic call of these C runtime routines is apparently not possible, one must use NODYNAM static CALL's and link them into the load module. HTH Peter -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Wayne V. Bickerdike -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
'grammer' is, I think, best viewed as a nonce word. David Crayford knows very well that the canonical spelling is 'grammar'. John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
On Fri, Jul 5, 2013 at 7:27 PM, John Gilmore jwgli...@gmail.com wrote: 'grammer' is, I think, best viewed as a nonce word. David Crayford knows very well that the canonical spelling is 'grammar'. Man have you no sense of humor at all. ?? John Gilmore, Ashland, MA 01721 - USA -- 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
Re: Announcing PCRE 8.33 for native z/OS
Sam, My post, which you took seriously, was jocular. Our problem is not that either of us lacks a sense of humor; it is that they are incommensurably different. In the upshot you find my posts offensive and I find yours tedious because wholly predictable. I have now added your email address to my kill list; and if you added mine to yours we could entirely avoid these stereotypical, unproductive exchanges. John Gilmore, Ashland, MA 01721 - USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
On 6/07/2013 10:27 AM, John Gilmore wrote: 'grammer' is, I think, best viewed as a nonce word. David Crayford knows very well that the canonical spelling is 'grammar'. That's funny! I was raised in London where we pronounce it gramma. BTW, nonce has a different connotation where I come from. John Gilmore, Ashland, MA 01721 - USA -- 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
Re: Announcing PCRE 8.33 for native z/OS
If things haven't been locked down too much, you might try ISPF command DDLIST, then subcommand LI to display linklist. Other tools such as PDSMAN also provide similar functions to display system components such as linklist. - Don Imbriale On Thu, Jul 4, 2013 at 12:09 AM, Farley, Peter x23353 peter.far...@broadridge.com wrote: Sorry, application programmers here are not allowed ANY operator functions (including /D). -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Frank and Peter Would you be so kind to share the JCL needed to compile it in any flavor please. I do not mind whether somebody use PCRE or opting to use the Posix compliant IBM supplied modules, both are fine for any simple (or even semi-complex) regex (if you know what to expect from Posix vs. Perl compliance.) I'd like people to familirize ith the concept and use it. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
[Replying again from my work account since my Google Groups reply did not make it to the list - I forgot that is a one-way gateway] Based on a brief review, this text of the pcre man pages says yes to all of those: http://www.pcre.org/pcre.txt Though not, of course, the Perl-only pattern features that interpret Perl code dynamically. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Wednesday, July 03, 2013 10:37 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS In 7859492443392344.wa.zatlas1yahoo@listserv.ua.edu, on 07/03/2013 at 05:58 PM, Ze'ev Atlas zatl...@yahoo.com said: In any case, PCRE is mature and working library with most all (even esoteric) options. Branch reset? Conditional patterns? Named backreferences? Recursive patterns? -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Ze'ev, I would if I could. I used our shop-standard SCLM system to store and compile the test program, and most of that translate process is driven by a complex series of Rexx exec's, not JCL. I do have some compile-and-link-outside-the-SCLM JCL though, so when I get a chance I will retest the program with just plain JCL and share my results. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Ze'ev Atlas Sent: Thursday, July 04, 2013 4:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Frank and Peter Would you be so kind to share the JCL needed to compile it in any flavor please. I do not mind whether somebody use PCRE or opting to use the Posix compliant IBM supplied modules, both are fine for any simple (or even semi-complex) regex (if you know what to expect from Posix vs. Perl compliance.) I'd like people to familirize ith the concept and use it. ZA -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I was talking about SCEELKED at run time, no compile time. It's (or SCEELKEX for lower-case entry points) definitely required at compile time for static calls, and that works. But when I tried dynamic calls, even with SCEERUN in the linklist, it said it couldn't find the REG* modules. From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 10:09 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Sorry, application programmers here are not allowed ANY operator functions (including /D). And I realized after I wrote my prior reply that SCEELKED was required in your case because you used NODYNAM, thus needing static bind-time merging of the modules from SCEELKED. I didn't need it because apparently DYNAM generates the correct call to the SCEERUN* library(ies) at runtime or to the in-core C runtime modules under the LE covers. Or maybe our automated compile scripts already included SCEELKED. I have to check on that, just in case I am wrong. If they do automatically include SCEEKLED I'll report back. In any case, thanks once again for the terrific POC (proof of concept) code. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 6:41 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Hmm, perhaps underscores did come with COBOL 4.2. I don't recall. Can you do /D PROG,LNKLST in SDSF? That will get you the active linklist. The only CEE libraries we have there are CEE.SCEERUN and CEE.SCEERUN2. I though that CEE.SCEELKED was a link/bind-time library only, but I could be wrong! (What possible harm could it be for an applications programmer to look at the system PARMLIBs...) Not sure why my use of CP1140 didn't work. Maybe I'll fool around with it later. Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 4:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Yes, it did execute just fine in batch from JCL with DYNAM, and our default COBOL code page is 1140 as well, and it still worked fine. However, I did not need to add SCEELKED to the STEPLIB so our systems folk probably have it in the linklist. No way for me to confirm that though, PARMLIB here is security protected against reads by ordinary people. Thanks for the note about using value for the length parameter to regerror, I'll change that in my test program. We are running Enterprise COBOL 4.1 here, and I cannot seem to get it to accept underscores. Maybe that was added via PTF or APAR and we don't have it applied? Or maybe that was only introduced in 4.2? I'll have to go look that up in the FM's later. Have a happy and safe Independence Day. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 4:55 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS 1) Did you actually get it to work (execute) with DYNAM? That is our shop standard as well, but when I try it I get a program not found error (S806), or if I add CEE.SCEELKED to the JOBLIB I get an S0C1(?!?!). Also, do you use codepage 1047 by default? I didn't expect it to work with codepage 1140 (our default) and it in fact did not work. (No errors given, but no matches either. 2) Underscores are allowed in COBOL data names as of COBOL 4, I believe. 3) Oops! Forgot to code that. You need to pass the length by value, though. I used ...value length of msgbuf, but you can use your ...value lmsgbuf' if you want. 4) I won't ask. :-) Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 1:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Frank, First let me say: Very cool, man! I was inspired by your 30 minutes to take a few of my own to see if I could duplicate your experiment in our somewhat more staid (i.e., no PDSE's for application COBOL load modules) environment, and sure enough I can. I had to make a couple of small changes to your code to accomplish my test: 1. Remove PROCESS cards and default to shop-standard PGMNAME(COMPAT) and DYNAM 2. Change underscores to hyphens in the data names 3. Add using and returning parameters to the regerror call, which I guess never caused you a problem due to no errors happening at execution time 4. Use double-quotes instead of apostrophes around the called program names due to an internal application standard requirement (don't ask, long story) So below is my revised copy of your code, which works when compiled to a load module in a PDS and produces the same output as you got
Re: Announcing PCRE 8.33 for native z/OS
In 2097080765646466.wa.zatlas1yahoo@listserv.ua.edu, on 07/03/2013 at 08:36 PM, Ze'ev Atlas zatl...@yahoo.com said: compatible with Perl Which Perl? 7. I contemplated interfacing with Rexx, but I cannot come with specific well defined API that would agree with that language. The obvious way is to return, e.g., capture buffers, %+ and %- in REXX variables. And, in the end of the day, while I could read IBM manuals, I do not have the expertise to interface with that language. If anybody wants to help, this is where help is needed. I've written REXX-callable functions for CMS and TSO; I don't have a system to test on. written in, you guessed, Perl Will they work in 5.8.7? That's currently the last Perl for z/OS. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Which Perl? I am using v5.14.2 7. I contemplated interfacing with Rexx, but I cannot come with specific well defined API that would agree with that language. The obvious way is to return, e.g., capture buffers, %+ and %- in REXX variables. I will look into that when I get to it. Thank you. I've written REXX-callable functions for CMS and TSO; I don't have a system to test on. If and when you could, your help would be welcome written in, you guessed, Perl Will they work in 5.8.7? That's currently the last Perl for z/OS. Sorry for that situation. I heard that some people are working on bringing a later version and I think IBM should have done better, bt that's not in my hands. I use Windows 7 machine with ActiveState Perl. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Hi All Of all places, I would expect a little more enthusiasm of the members of this list. Let me please explain the rationale behind publishing the PCRE library on z/OS. Regular expressions are available in most modern languages such as Perl, Java and PHP, to mention only few (BTW, PHP is using the PCRE library for regular expressions processing.) Regular expressions are used extensively and are basic part of life in programming and handling data on Linux, Unix (and by extension on z/OS with USS and MVS-OE) and Windows. This capability was virtually unavailable on native z/OS and not at all for grand old COBOL and PL/I. By porting this library, i brought this awesome capability into the native z/OS realm and into the LE languages functionality. And thus. I pulled COBOL and PL/I kicking and screaming to the 21st century. Rexx on z/OS is an untamed beast and I do not know how to approach it. We really need volunteers for that aspect. Object Rexx (on non z/OS platform) appears to be catching up with that trend and lately added a RxRegExp library. I did not yet have a chance to look at it yet, but I know that there was a Posix compliant library available for non z/OS Rexx for some time. While the package in full is available on my website in both ASCII form and EBCDIC XMIT libraries, all you really need may be the XMIT libraries, the documentation and the license document. There is one XMIT library missing (the test cases) but I hope to add it soon and it is not crucial for working with the library. I had a rough start some months ago when I first published the package (PCRE 8.31) but this was my first time publishing open source on serious scale. The current package is stable and available. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I am grateful for your work on this. Unfortunately, if other shops are like mine, the programmers can't use your PCRE library in production because it is not a vendor supported product. I did download the previous version. And _I_ can use it in my own code for __my own__ purposes. But, then, I'm a BOFH type sysprog who is rather unrestrained in what I can use. So long as I don't cause an outage. And I don't use it in production. Since PCRE is for textual data, I generally find it better to simply download the data that I want to process onto my Linux desktop and manipulate it there. I'm doing that right now with some RACF data. I will massage it to find out information. I can then use that information to make decisions about how to do something in RACF (setting up some values in a customer user data field to be more precise). I will even generate the job which will do the RACF commands that I need. But this is a one off and so I can do it as I please. But I can't do it as a regularly scheduled, production, activity. The same with using your PCRE code. I wish that I could help with the REXX interface. But I don't have a C license. So I'm generally not able to do much very easily. I really don't enjoy HLASM coding as much as I used to. Just getting old and tired, I guess. On Wed, Jul 3, 2013 at 7:35 AM, Ze'ev Atlas zatl...@yahoo.com wrote: Hi All Of all places, I would expect a little more enthusiasm of the members of this list. Let me please explain the rationale behind publishing the PCRE library on z/OS. Regular expressions are available in most modern languages such as Perl, Java and PHP, to mention only few (BTW, PHP is using the PCRE library for regular expressions processing.) Regular expressions are used extensively and are basic part of life in programming and handling data on Linux, Unix (and by extension on z/OS with USS and MVS-OE) and Windows. This capability was virtually unavailable on native z/OS and not at all for grand old COBOL and PL/I. By porting this library, i brought this awesome capability into the native z/OS realm and into the LE languages functionality. And thus. I pulled COBOL and PL/I kicking and screaming to the 21st century. Rexx on z/OS is an untamed beast and I do not know how to approach it. We really need volunteers for that aspect. Object Rexx (on non z/OS platform) appears to be catching up with that trend and lately added a RxRegExp library. I did not yet have a chance to look at it yet, but I know that there was a Posix compliant library available for non z/OS Rexx for some time. While the package in full is available on my website in both ASCII form and EBCDIC XMIT libraries, all you really need may be the XMIT libraries, the documentation and the license document. There is one XMIT library missing (the test cases) but I hope to add it soon and it is not crucial for working with the library. I had a rough start some months ago when I first published the package (PCRE 8.31) but this was my first time publishing open source on serious scale. The current package is stable and available. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
If this were an Open Source project I might be able to persuade my employer to allow me to work on it. Or at least to use it. So, is it? If not I have to wish you well and decline to play. :-( 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 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Well, he does distribute the source. The original source is licensed with a BSD license: http://pcre.org/licence.txt From looking at the source from Mr. Atlas, the BSD license is still embedded in it. And I have not seen any changes to it mentioned. On Wed, Jul 3, 2013 at 8:19 AM, Martin Packer martin_pac...@uk.ibm.com wrote: If this were an Open Source project I might be able to persuade my employer to allow me to work on it. Or at least to use it. So, is it? If not I have to wish you well and decline to play. :-( 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 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...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Not to discourage you, as I'm sure porting PCRE to z/OS is a fine idea, but it would not be true to say that regex processing is not available for COBOL (or PL/I) on z/OS. I was looking through the IBM XL C/C++ for z/OS Run-Time Library Reference the other day (god knows why, since I don't even have access to XL C/C++) and noticed that there were some regular expression features. So I just took about 30 minutes and came up with this COBOL program (based on C code found here: http://stackoverflow.com/questions/1085083/regular-expressions-in-c-examples): process nodynam pgmname(mixed) process codepage(1047) identification division. program-id. 'regex1'. data division. working-storage section. 01 regex. 05 re_nsub comp-5 pic s9(8). 05 re_comp pointer. 05 re_cflags comp-5 pic s9(8). 05 re_erroff comp-5 pic s9(8). 05 re_len comp-5 pic s9(8). 05 re_ucoll comp-5 pic s9(4) occurs 2. 05 re_lsub pointer occurs 10. 05 re_esub pointer occurs 10. 05 re_map display pic x(256). 05 re_shift comp-5 pic s9(4). 05 re_dbcs comp-5 pic s9(4). 77 reti comp-5 pic s9(8). 77 msgbuf display pic x(100). procedure division. call 'regcomp' using regex content z^a[[:alnum:]] value 0 returning reti if reti is not equal to zero display 'Count not compile regex' stop run end-if call 'regexec' using regex content z'abc' value 0 0 0 returning reti perform check-reti call 'regexec' using regex content z'qxp' value 0 0 0 returning reti perform check-reti call 'regfree' using regex goback. check-reti. evaluate reti when zero display 'match' when 1 display 'no match' when other call 'regerror' display 'Regex match failed: ' msgbuf stop run end-evaluate . end program 'regex1'. It compiles and runs fine, with the following results: match no match Pretty cool, I must say! FWIW, I didn't need to have the regex data item be the group data item as above. I could have just made it a DISPLAY PIC X(364), since I'm not referring to any of the fields within the group in my COBOL program. Frank From: Ze'ev Atlas zatl...@yahoo.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 6:35 AM Subject: Re: Announcing PCRE 8.33 for native z/OS Hi All Of all places, I would expect a little more enthusiasm of the members of this list. Let me please explain the rationale behind publishing the PCRE library on z/OS. Regular expressions are available in most modern languages such as Perl, Java and PHP, to mention only few (BTW, PHP is using the PCRE library for regular expressions processing.) Regular expressions are used extensively and are basic part of life in programming and handling data on Linux, Unix (and by extension on z/OS with USS and MVS-OE) and Windows. This capability was virtually unavailable on native z/OS and not at all for grand old COBOL and PL/I. By porting this library, i brought this awesome capability into the native z/OS realm and into the LE languages functionality. And thus. I pulled COBOL and PL/I kicking and screaming to the 21st century. Rexx on z/OS is an untamed beast and I do not know how to approach it. We really need volunteers for that aspect. Object Rexx (on non z/OS platform) appears to be catching up with that trend and lately added a RxRegExp library. I did not yet have a chance to look at it yet, but I know that there was a Posix compliant library available for non z/OS Rexx for some time. While the package in full is available on my website in both ASCII form and EBCDIC XMIT libraries, all you really need may be the XMIT libraries, the documentation and the license document. There is one XMIT library missing (the test cases) but I hope to add it soon and it is not crucial for working with the library. I had a rough start some months ago when I first published the package (PCRE 8.31) but this was my first time publishing open source on serious scale. The current package is stable and available. ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email
Re: Announcing PCRE 8.33 for native z/OS
The regexp in IBM's C is POSIX complaint. PCRE can be much more powerful. The IBM sed UNIX command only allows POSIX regexps. Frustrates the bleep out of me. So I don't use sed much any more. I use Perl itself. On Wed, Jul 3, 2013 at 1:17 PM, Frank Swarbrick frank.swarbr...@yahoo.com wrote: Not to discourage you, as I'm sure porting PCRE to z/OS is a fine idea, but it would not be true to say that regex processing is not available for COBOL (or PL/I) on z/OS. I was looking through the IBM XL C/C++ for z/OS Run-Time Library Reference the other day (god knows why, since I don't even have access to XL C/C++) and noticed that there were some regular expression features. So I just took about 30 minutes and came up with this COBOL program (based on C code found here: http://stackoverflow.com/questions/1085083/regular-expressions-in-c-examples): snip -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Frank, First let me say: Very cool, man! I was inspired by your 30 minutes to take a few of my own to see if I could duplicate your experiment in our somewhat more staid (i.e., no PDSE's for application COBOL load modules) environment, and sure enough I can. I had to make a couple of small changes to your code to accomplish my test: 1. Remove PROCESS cards and default to shop-standard PGMNAME(COMPAT) and DYNAM 2. Change underscores to hyphens in the data names 3. Add using and returning parameters to the regerror call, which I guess never caused you a problem due to no errors happening at execution time 4. Use double-quotes instead of apostrophes around the called program names due to an internal application standard requirement (don't ask, long story) So below is my revised copy of your code, which works when compiled to a load module in a PDS and produces the same output as you got. Thank you for taking the time to show us how to do this! Peter Revised code: identification division. program-id. TSTREGEX. data division. working-storage section. 01 regex. 05 re-nsub comp-5pic s9(8). 05 re-comp pointer. 05 re-cflags comp-5pic s9(8). 05 re-erroff comp-5pic s9(8). 05 re-len comp-5pic s9(8). 05 re-ucollcomp-5pic s9(4) occurs 2. 05 re-lsub pointer occurs 10. 05 re-esub pointer occurs 10. 05 re-map display pic x(256). 05 re-shiftcomp-5pic s9(4). 05 re-dbcs comp-5pic s9(4). 77 reticomp-5pic s9(8). 77 msgbuf display pic x(100). 77 lmsgbuf comp pic s9(8). procedure division. call regcomp using regex content z^a[[:alnum:]] value 0 returning reti if reti is not equal to zero display 'Could not compile regex' stop run end-if call regexec using regex content z'abc' value 0 0 0 returning reti perform check-reti call regexec using regex content z'qxp' value 0 0 0 returning reti perform check-reti call regfree using regex goback. check-reti. evaluate reti when zero display 'match' when 1 display 'no match' when other move length of msgbuf to lmsgbuf call regerror using regex msgbuf lmsgbuf returning reti display 'Regex match failed: ' msgbuf stop run end-evaluate . end program TSTREGEX. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 2:17 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Not to discourage you, as I'm sure porting PCRE to z/OS is a fine idea, but it would not be true to say that regex processing is not available for COBOL (or PL/I) on z/OS. I was looking through the IBM XL C/C++ for z/OS Run-Time Library
Re: Announcing PCRE 8.33 for native z/OS
1) Did you actually get it to work (execute) with DYNAM? That is our shop standard as well, but when I try it I get a program not found error (S806), or if I add CEE.SCEELKED to the JOBLIB I get an S0C1(?!?!). Also, do you use codepage 1047 by default? I didn't expect it to work with codepage 1140 (our default) and it in fact did not work. (No errors given, but no matches either. 2) Underscores are allowed in COBOL data names as of COBOL 4, I believe. 3) Oops! Forgot to code that. You need to pass the length by value, though. I used ...value length of msgbuf, but you can use your ...value lmsgbuf' if you want. 4) I won't ask. :-) Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 1:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Frank, First let me say: Very cool, man! I was inspired by your 30 minutes to take a few of my own to see if I could duplicate your experiment in our somewhat more staid (i.e., no PDSE's for application COBOL load modules) environment, and sure enough I can. I had to make a couple of small changes to your code to accomplish my test: 1. Remove PROCESS cards and default to shop-standard PGMNAME(COMPAT) and DYNAM 2. Change underscores to hyphens in the data names 3. Add using and returning parameters to the regerror call, which I guess never caused you a problem due to no errors happening at execution time 4. Use double-quotes instead of apostrophes around the called program names due to an internal application standard requirement (don't ask, long story) So below is my revised copy of your code, which works when compiled to a load module in a PDS and produces the same output as you got. Thank you for taking the time to show us how to do this! Peter Revised code: identification division. program-id. TSTREGEX. data division. working-storage section. 01 regex. 05 re-nsub comp-5 pic s9(8). 05 re-comp pointer. 05 re-cflags comp-5 pic s9(8). 05 re-erroff comp-5 pic s9(8). 05 re-len comp-5 pic s9(8). 05 re-ucoll comp-5 pic s9(4) occurs 2. 05 re-lsub pointer occurs 10. 05 re-esub pointer occurs 10. 05 re-map display pic x(256). 05 re-shift comp-5 pic s9(4). 05 re-dbcs comp-5 pic s9(4). 77 reti comp-5 pic s9(8). 77 msgbuf display pic x(100). 77 lmsgbuf comp pic s9(8). procedure division. call regcomp using regex content z^a[[:alnum:]] value 0 returning reti if reti is not equal to zero display 'Could not compile regex' stop run end-if call regexec using regex content z'abc' value 0 0 0 returning reti perform check-reti call regexec using regex content z'qxp' value 0 0 0 returning reti perform check-reti call regfree using regex goback. check-reti. evaluate reti when zero display 'match' when 1 display 'no match' when other move length of msgbuf to lmsgbuf call regerror using regex msgbuf
Re: Announcing PCRE 8.33 for native z/OS
It is an open source port of an open source project. Can't be more open source than that BSD license source is distributed za -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Hmm, perhaps underscores did come with COBOL 4.2. I don't recall. Can you do /D PROG,LNKLST in SDSF? That will get you the active linklist. The only CEE libraries we have there are CEE.SCEERUN and CEE.SCEERUN2. I though that CEE.SCEELKED was a link/bind-time library only, but I could be wrong! (What possible harm could it be for an applications programmer to look at the system PARMLIBs...) Not sure why my use of CP1140 didn't work. Maybe I'll fool around with it later. Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 4:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Yes, it did execute just fine in batch from JCL with DYNAM, and our default COBOL code page is 1140 as well, and it still worked fine. However, I did not need to add SCEELKED to the STEPLIB so our systems folk probably have it in the linklist. No way for me to confirm that though, PARMLIB here is security protected against reads by ordinary people. Thanks for the note about using value for the length parameter to regerror, I'll change that in my test program. We are running Enterprise COBOL 4.1 here, and I cannot seem to get it to accept underscores. Maybe that was added via PTF or APAR and we don't have it applied? Or maybe that was only introduced in 4.2? I'll have to go look that up in the FM's later. Have a happy and safe Independence Day. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 4:55 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS 1) Did you actually get it to work (execute) with DYNAM? That is our shop standard as well, but when I try it I get a program not found error (S806), or if I add CEE.SCEELKED to the JOBLIB I get an S0C1(?!?!). Also, do you use codepage 1047 by default? I didn't expect it to work with codepage 1140 (our default) and it in fact did not work. (No errors given, but no matches either. 2) Underscores are allowed in COBOL data names as of COBOL 4, I believe. 3) Oops! Forgot to code that. You need to pass the length by value, though. I used ...value length of msgbuf, but you can use your ...value lmsgbuf' if you want. 4) I won't ask. :-) Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 1:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Frank, First let me say: Very cool, man! I was inspired by your 30 minutes to take a few of my own to see if I could duplicate your experiment in our somewhat more staid (i.e., no PDSE's for application COBOL load modules) environment, and sure enough I can. I had to make a couple of small changes to your code to accomplish my test: 1. Remove PROCESS cards and default to shop-standard PGMNAME(COMPAT) and DYNAM 2. Change underscores to hyphens in the data names 3. Add using and returning parameters to the regerror call, which I guess never caused you a problem due to no errors happening at execution time 4. Use double-quotes instead of apostrophes around the called program names due to an internal application standard requirement (don't ask, long story) So below is my revised copy of your code, which works when compiled to a load module in a PDS and produces the same output as you got. Thank you for taking the time to show us how to do this! Peter Revised code: identification division. program-id. TSTREGEX. data division. working-storage section. 01 regex. 05 re-nsub comp-5 pic s9(8). 05 re-comp pointer. 05 re-cflags comp-5 pic s9(8). 05 re-erroff comp-5 pic s9(8). 05 re-len comp-5 pic s9(8). 05 re-ucoll comp-5 pic s9(4) occurs 2. 05 re-lsub pointer occurs 10. 05 re-esub pointer occurs 10. 05 re-map display pic x(256). 05 re-shift comp-5 pic s9(4). 05 re-dbcs comp-5 pic s9(4). 77 reti comp-5 pic s9(8). 77 msgbuf display pic x(100). 77 lmsgbuf comp pic s9(8). procedure division. call regcomp using regex
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
Re: Announcing PCRE 8.33 for native z/OS
Peter, I will have to seeif I need to adopt some of your changes... Frank and Peter, cool!! ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
Thank you all for responding and I've learnt a lot from you. Some notes: 1. As far as I can tell, my development is done on 1047, so the library is compiled for that code-page. I do not have any access to any other code-page, so I will need somebody to actually load and compile it according to my documentation and provide me with an XMIT formatted set of libraries for any other code-page. 2. I realized that C is not that popular in the mainframe culture and many shops just do not own a license. That's why I provided the XMIT formatted libraries including binaries (compiled and binded load modules.) 3. The C functions provided by IBM run-time are indeed Posix compliant. PCRE provides much richer and less limited set of functionality and is compatible with Perl (the standard setter) and PHP (which uses PCRE.) 4. In addition to the PCRE itself, I provided some simple functionality that I authored (under same BSD license) to deal with length terminated and null terminated strings. Even if one uses the provided binaries, I encourage you to read my documentation that covers that stuff. 5. I am currently working with Philip Hazel (the original author of PCRE) to fix some EBCDIC related bug in the Posix compliant module. Other then that all core functionality is working. I will publish a revision immediately after we solve the issue. 6. I also provided an API module to deal with the differences between Unix/Linux/Windows names (virtually unlimited length, mixed case and underscores) and z/OS names (8 characters, upper case, etc.) And also another API that alows old PL/I, that uses 7 character names, to call my 8 character names.) 7. I contemplated interfacing with Rexx, but I cannot come with specific well defined API that would agree with that language. And, in the end of the day, while I could read IBM manuals, I do not have the expertise to interface with that language. If anybody wants to help, this is where help is needed. BTW, the actual porting (except of my added modules and a couple that require manual intervention by the original package instructions for porters,) is done automatically, from scanning the original library through resolving binding issues; all those are done by using automated scripts, written in, you guessed, Perl ZA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
In 5892125769715316.wa.zatlas1yahoo@listserv.ua.edu, on 07/03/2013 at 07:35 AM, Ze'ev Atlas zatl...@yahoo.com said: Of all places, I would expect a little more enthusiasm of the members of this list. The lack of replies may indicate that nobody had problems with it rather than a lack of enthusiasm. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Announcing PCRE 8.33 for native z/OS
I knocked up a REXX regex package using ECMAScript grammer, which is almost identical to PCRE with a few subtle differences. I wish the C++ TR1 regex library supported perl syntax like boost::regex. I can't ship the source as it contains code which may be considered IP at a later date but I don't mind shipping binaries if anybody is interested http://users.tpg.com.au/crayford/rexxre.txt. On 3/07/2013 8:35 PM, Ze'ev Atlas wrote: Hi All Of all places, I would expect a little more enthusiasm of the members of this list. Let me please explain the rationale behind publishing the PCRE library on z/OS. Regular expressions are available in most modern languages such as Perl, Java and PHP, to mention only few (BTW, PHP is using the PCRE library for regular expressions processing.) Regular expressions are used extensively and are basic part of life in programming and handling data on Linux, Unix (and by extension on z/OS with USS and MVS-OE) and Windows. This capability was virtually unavailable on native z/OS and not at all for grand old COBOL and PL/I. By porting this library, i brought this awesome capability into the native z/OS realm and into the LE languages functionality. And thus. I pulled COBOL and PL/I kicking and screaming to the 21st century. Rexx on z/OS is an untamed beast and I do not know how to approach it. We really need volunteers for that aspect. Object Rexx (on non z/OS platform) appears to be catching up with that trend and lately added a RxRegExp library. I did not yet have a chance to look at it yet, but I know that there was a Posix compliant library available for non z/OS Rexx for some time. While the package in full is available on my website in both ASCII form and EBCDIC XMIT libraries, all you really need may be the XMIT libraries, the documentation and the license document. There is one XMIT library missing (the test cases) but I hope to add it soon and it is not crucial for working with the library. I had a rough start some months ago when I first published the package (PCRE 8.31) but this was my first time publishing open source on serious scale. The current package is stable and available. 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
Re: Announcing PCRE 8.33 for native z/OS
Sorry, application programmers here are not allowed ANY operator functions (including /D). And I realized after I wrote my prior reply that SCEELKED was required in your case because you used NODYNAM, thus needing static bind-time merging of the modules from SCEELKED. I didn't need it because apparently DYNAM generates the correct call to the SCEERUN* library(ies) at runtime or to the in-core C runtime modules under the LE covers. Or maybe our automated compile scripts already included SCEELKED. I have to check on that, just in case I am wrong. If they do automatically include SCEEKLED I'll report back. In any case, thanks once again for the terrific POC (proof of concept) code. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 6:41 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS Hmm, perhaps underscores did come with COBOL 4.2. I don't recall. Can you do /D PROG,LNKLST in SDSF? That will get you the active linklist. The only CEE libraries we have there are CEE.SCEERUN and CEE.SCEERUN2. I though that CEE.SCEELKED was a link/bind-time library only, but I could be wrong! (What possible harm could it be for an applications programmer to look at the system PARMLIBs...) Not sure why my use of CP1140 didn't work. Maybe I'll fool around with it later. Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 4:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Yes, it did execute just fine in batch from JCL with DYNAM, and our default COBOL code page is 1140 as well, and it still worked fine. However, I did not need to add SCEELKED to the STEPLIB so our systems folk probably have it in the linklist. No way for me to confirm that though, PARMLIB here is security protected against reads by ordinary people. Thanks for the note about using value for the length parameter to regerror, I'll change that in my test program. We are running Enterprise COBOL 4.1 here, and I cannot seem to get it to accept underscores. Maybe that was added via PTF or APAR and we don't have it applied? Or maybe that was only introduced in 4.2? I'll have to go look that up in the FM's later. Have a happy and safe Independence Day. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, July 03, 2013 4:55 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Announcing PCRE 8.33 for native z/OS 1) Did you actually get it to work (execute) with DYNAM? That is our shop standard as well, but when I try it I get a program not found error (S806), or if I add CEE.SCEELKED to the JOBLIB I get an S0C1(?!?!). Also, do you use codepage 1047 by default? I didn't expect it to work with codepage 1140 (our default) and it in fact did not work. (No errors given, but no matches either. 2) Underscores are allowed in COBOL data names as of COBOL 4, I believe. 3) Oops! Forgot to code that. You need to pass the length by value, though. I used ...value length of msgbuf, but you can use your ...value lmsgbuf' if you want. 4) I won't ask. :-) Frank From: Farley, Peter x23353 peter.far...@broadridge.com To: IBM-MAIN@LISTSERV.UA.EDU Sent: Wednesday, July 3, 2013 1:20 PM Subject: Re: Announcing PCRE 8.33 for native z/OS Frank, First let me say: Very cool, man! I was inspired by your 30 minutes to take a few of my own to see if I could duplicate your experiment in our somewhat more staid (i.e., no PDSE's for application COBOL load modules) environment, and sure enough I can. I had to make a couple of small changes to your code to accomplish my test: 1. Remove PROCESS cards and default to shop-standard PGMNAME(COMPAT) and DYNAM 2. Change underscores to hyphens in the data names 3. Add using and returning parameters to the regerror call, which I guess never caused you a problem due to no errors happening at execution time 4. Use double-quotes instead of apostrophes around the called program names due to an internal application standard requirement (don't ask, long story) So below is my revised copy of your code, which works when compiled to a load module in a PDS and produces the same output as you got. Thank you for taking the time to show us how to do this! Peter Revised code: identification division. program-id. TSTREGEX. data division. working-storage section. 01 regex. 05 re-nsub comp-5 pic s9(8). 05 re-comp pointer
Re: Announcing PCRE 8.33 for native z/OS
In 7859492443392344.wa.zatlas1yahoo@listserv.ua.edu, on 07/03/2013 at 05:58 PM, Ze'ev Atlas zatl...@yahoo.com said: In any case, PCRE is mature and working library with most all (even esoteric) options. Branch reset? Conditional patterns? Named backreferences? Recursive patterns? -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN