C and Storage Overlays
We've recently been working on a project with an application written in C.
This CICS application suffered a lot of abends and storage violations. Looking at these issues got us interested in C programs on z/OS, and how to eliminate these errors. So this issue, it's all technical as we look at exactly that: storage overlays and C on z/OS.
In our first article, we look at z/OS tools that can be used to diagnose storage overlays from C programs. In our second, we dig into Language Environment HEAPZONES, and see what they give us.
In our third technical article we look at C strings, and how they're an even bigger problem on z/OS.
Finally, at TechChannel, we take a look at how to work with JSON data using traditional mainframe languages: COBOL, PL/I, Assembler, C and REXX.
We hope you enjoy this issue.
technical: Diagnosing C Storage Overlays on z/OS
In our article The Problem With z/OS Strings and C, we showed how it is easy when working with strings in C to create storage overlays. One of the big reasons for this is that much of the z/OS data is fixed-length, while many C string functions assume that all strings end in a NULL. But this isn't the only way this can happen.
But what do we really mean when we talk about mainframe modernisation? Let's take a closer look.
technical: Using HEAPZONES to Fix C Storage Overlays on z/OS
It's not hard to create a storage overlay in a C program: even easier when that C program runs on z/OS. If you're tracking a storage overlay down, one of the z/OS tools is the Language Environment (LE) HEAPZONES parameter. In this article, we'll see how it works.
technical: The Problem With z/OS Strings and C
The C programming language doesn't handle strings very well. Sure, there's lots of string functions defined in the stdlib.h file. But strings are definitely not a real strength of C/C++. And there are many articles explaining why. However, these string issues become a little worse with z/OS. Let's see how.