> Here would be the reason of this exercise, to run C++ code in > zIIP, as far as I understand in "Enclave SRB" mode. > The routine switches to SRB mode and let the C++ code run , for > example a compress C++ routine. > I can switch to key 0, but I don't think it would be a good idea. >
I can save you the trouble of running that experiment. There isn't a snowball's chance in hell that it would work out when called from an SRB in any key. To run C++ code you would need to have an LE main() function that calls LE initialization to set up all of the usual LE gorp. That gets put there automagically by the compiler and binder btw. LE resolutely assumes a key 8 problem state task mode environment and naively calls system services via SVC so the first abend code you would probably get would be a S0F8. But supposing you did call it in key 8 and it did somehow manage to get you a working runtime environment you would then have a supervisor state SRB-mode program running in key 8 and using key 8 storage for stack and heap... in other words, a classic integrity hole. Now if you abandon the idea of actually running in key 8, there IS a way you can get around this using pre-initialized CEEPIPI runtimes, but (1) there's a lot of fiddling about (2) lots of things you would normally expect to "just work" (most system services) don't work at all in SRB mode, or require specific coding to indicate you know what you're doing (3) you're totally on your own for recovery, resource management, I/O etc. In other words, unless the thing you want to run is a simple CPU-bound function that doesn't really need any of the "normal" services a typical HLL program needs, there isn't any chance you can get it to work reliably or safely. Full disclosure: I don't work in z/OS internals development any more, but I did for a very long time. When I do occasionally speak up on one of these topics, I am only trying to save folks from heartache. You may all think I am just grousing about this stuff, or maybe you think I just don't know what I am talking about. If so, feel free to ignore me. CC
