I recall that if you use certain language constructs, the binder complains about
"this object requires PO format 3 and cannot be stored in a load module";
maybe if you initialize a static value using a function call (which is not valid in ANSI C).

I once had the need to convert such a C++ function to ANSI C, because one branch of my customer doesn't allow C++ ... the other branch does, and I had to copy a routine which creates UUIDs from the other branch. To do this in C, I had to get rid of the initialization of the (writable) static data by using a function call. In C, it is not possible to do function calls when initalizing static data; static data is initialized at enclave creation time, and the C language description allows only constants at this time, no function calls. Load modules (in the NORENT case) initialize their static data at compile time by CSECT formatting. With RENT, a compiler created initialization routine is called, but with C,
it is not possible that this routine calls "user" routines.

Of course, if you don't do this and you use only features that could also be simulated
using ANSI C, you maybe don't have this problem.

So my opinion is: not all C++ programs require PDSEs, but there are some, which require
program objects format 3, and these will, of course, require PDSEs.

Kind regards

Bernd


Am 07.04.2023 um 02:12 schrieb Charles Mills:
C++ can produce object code that can be linked into a traditional load module 
in a PDS. I do it all the time.

Charles

On Thu, 6 Apr 2023 09:18:28 +0200, Bernd Oppolzer <bernd.oppol...@t-online.de> 
wrote:

Thanks.

This (to me) seems related to the fact that PL/I still can produce
"classic" load modules,
while COBOL and C++ create program objects, which must reside in PDSEs.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to