Longpela Expertise logo
Longpela Expertise Consulting
Longpela Expertise
Home | Press Room | Contact Us | Site Map

LongEx Mainframe Quarterly - Aug 2021


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.



LongEx Quarterly is a quarterly eZine produced by Longpela Expertise. It provides System z Mainframe and z/OS related articles for management and technical experts. It is published every November, February, May and August.

The opinions in this article are solely those of the author, and do not necessarily represent the opinions of any other person or organisation. All trademarks, trade names, service marks and logos referenced in these articles belong to their respective companies.

Inside This Month

Previous Edition

Read Previous Articles

Enter your email address and automatically receive LongEx Quarterly free by email

CPT Global Logo
Longpela Expertise are proud partners of CPT Global.

© Copyright 2008-2021 Longpela Expertise  |  ABN 55 072 652 147
Legal Disclaimer | Privacy Policy Australia
Website Design: Hecate Jay