Category Archives: C

Validating an email address format in CICS with <regex>

In an earlier post, I used regexec() to validate an email address format and found that regexec() does not support non-capture  groups.  Well, I didn’t really need them, but let’s see if we can get this support by using the Standard C++ Library <regex> template function which does support non-capture groups which is part of… Read More »

Validating an email address format in CICS

Faced with the requirement to edit for a valid email address format from a CICS application, one developer was using the java regular expression support which necessitated starting up a JVM Server in multiple CICS regions at about 90MB of storage per region.  I think the developer must have gotten the regular expression to use… Read More »

Need a Translate Table? – Unicode Services Edition

In an earlier post I discussed generating translate tables using CDRA and promised that I might cover doing the same using Unicode Services.  Well, here is the update. In many respects, using the Unicode Services character conversion routine CUNLCNV is quite a bit simpler than the CDRA interface. cunitbl.c The header is in SYS1.SCUNHF so… Read More »

RxRandom Revisited — Metal C

Continuing the Writing a Rexx Function in C and the follow-on Updated RxRandom External Rexx Function (in C) discussion, can I convert RxRandom to Metal C? I originally worked on writing Rexx external function in C using the System Programmer C facility; this was before Metal C existed. There should be some performance benefit to… Read More »

Using Metal C to Learn Assembler Techniques

By comparing the output from the XL C/C++ Compiler that is generated for a sample piece of C code and varying the ARCHITECTURE and TUNE compiler options, we can both learn some new assembler opcodes for newer hardware and also learn some optimization techniques. Currently (September 2013), the ARCHITECTURE value can vary from 0 to… Read More »

Updated RxRandom External Rexx Function (in C)

The Rexx external function RXRANDOM I wrote about before is not very compatible with the IBM provided (and standard Rexx) RANDOM internal function. The one I wrote initially took no arguments, and so did not demonstrate how to handle arguments, whereas the built-in function takes min, max and seed arguments. I can handle the min… Read More »

Need a Translate Table?

Back before z/OS had Unicode Services available to do character transactions before code pages, there was something called CDRA. As of z/OS 1.13 it is still there as a part of DFHSMSdfp but it is only briefly mentioned.  There is more documentation here. IBM has been a leader in keeping track of internationalization issues, as you… Read More »

Use C Runtime Functions in Assembler

Assembler coding has it’s role to fill.  There are a lot of system services that are only available to assembler programs and when performance is key there is often nothing better.  That being said, when you are coding in assembler you want to focus on the problem at hand and not spend a lot of… Read More »