Using aggregates

Aggregates (arrays, strings, or structures) are mapped differently by C++ and PL/I and are not automatically mapped. Be sure to completely declare every byte in the aggregate so there are no open fields. Doing so helps ensure that the layouts of aggregates passed between the two languages map to one another correctly. The C++ and PL/I AGGREGATE compiler time options provide a layout of aggregates to help you perform the mapping.

In C++, a structure is a class declared with the struct keyword; its members and base classes are public by default. A C++ class is the same as a C++ structure if the only data is public. If a C++ class that uses features unavailable to PL/I (such as virtual functions, virtual base classes, private data, protected data, static data members, or inheritance) is passed to PL/I, the results are undefined.

For more information about PL/I structure mapping, see the IBM Enterprise PL/I for z/OS library.