I use regular expressions very rarely; in fact, for me it is mainly a grammar which I use as a base for my scanner generator which in turn produces scanner functions that I use in various tools, be it an XML parser or a database load/unload tool or a PL/1 source code analyzer (all those tools are written in ANSI C and work on all platforms, including Windows, OS/2, Unix, and z/Arch).
To do analysis of text files (for example trace files from test runs of our applications etc.), I normally write REXX functions that filter those trace files and get the relevant informations out of it using REXX PARSE and write nice reports. Works best for me, this is the fastest way to do it. And, guess what, the REXX procedures run on WINDOWS machines !!! because its OO REXX, and I download the trace files from the z/OS mainframe, just because it is much faster this way ... so I'm not afraid to use other platforms, although I like z/Arch most. Inside the editor which I use most of the times, I have a search function that allows me to do combined searches, that is, look for patterns and combine the patterns with AND, OR and NOT, and this is sufficient for most daily work ... if not, I write an editor macro (in REXX, BTW, although, again, the editor is NOT running on the mainframe). That's my point: no matter what tools you use: the key is that you master your tools, and that you are fast and efficient in using them. That is what you have to achieve, no matter what your platform is ... That said: for me regular expressions on z/OS are not very important, besided from the ones that I use in my own scanner generator (but I didn't port the scanner generator to z/OS yet - but it should not be a problem. because it is written in C). Especially, regular expressions on z/OS IMHO don't help in "modernizing" the platform - I've seen a lot of "modernizing" in the last years on the z/Arch platform. Instruction set, PL/1 language, DB2 ... of course, some areas still look old (file system, JCL). Another important point for me: using the C language, the z/Arch platform is just another platform supporting C. Not more or less modern than others; simply no difference. Kind regards Bernd Am 26.03.2014 13:24, schrieb Tony Thigpen:
Just to be clear, I really do understand, and respect, your feelings. It's a tool you would like to continue using because you are familiar with it. My opinion is just that, my opinion. And, in my shops I can enforce my opinion. :-) I was not criticizing the port, just tying to explain why it might not be of interest to many mainframe programmers. And why nobody bothered to download it. By saying why I was not interested in it. Now, as to COBOL, we normally deal with non-text based numbers. Everything in the file is stored packed or binary, not as text. Once it is passed the "input program", the only need is to convert it back to text for reports. And we have simple PIC clauses to hand that conversion. As to the "input program", these have traditionally worked with input fields that do not have all the dashes, commas, and such. We started with keypunches (where the special characters were removed by the keypunch operator). We then moved to BMS screens (for CICS) where CICS had a built-in de-edit function. (Of course many shops wrote their own.) But, even then, we normally expected the return value to be just digits. Even as we move from CICS to Web, it's still under CICS with the existing tools already in place. We have been working this way for 30+ years. Regular expressions is relatively young. Do we need regular expressions in COBOL? I don't think so. Can you, and others, continue to try to evangelize about regular expressions? Yes you can. Maybe, some day, I will change my mind. I just doubt it. :-) Maybe you should start a thread: Why COBOL needs Regular Expressions. Tony Thigpen
