3 ms·
> Almost no one cares about C on mainframes beyond porting some POSIX stuff, or running Aix/Linux on an hypervisor. I think, with Metal C, that's less true tha
by skissane 6y ago
> Almost no one cares about C on mainframes beyond porting some POSIX stuff, or running Aix/Linux on an hypervisor.
I think, with Metal C, that's less true than it used to be.
My understanding is that, for brand new z/OS components (e.g. Zowe, z/OSMF), IBM prefers Metal C to PL/X. It is also seeing increasing use by mainframe ISVs as a replacement for assembly and PL/X.
- pjmlp 6y agoIBM uses mostly C++ alongside PL/S, Metal C is a niche solution, most users are supposed to target the language environments.
- skissane 6y agoFor low level stuff, you can’t use the language environment. Assembler, PL/X and Metal C work fine without the language environment, C++ requires it.
- pjmlp 6y agoAnd unless one is an IBM employee on IBM i team or driver writer for IBM i, there isn't really a sound reason to use it, hence niche.
- skissane 6y agoMetal C is for z/OS, not IBM i. ISVs definitely use it, not just IBM. Most z/OS user exits cannot use language environment, they must use either Metal C, assembly or PL/X. (And, outside of IBM, PL/X is only an option for those few companies who have bought PL/X licenses, which apparently IBM doesn’t even sell anymore.) Also, historically there has been a big culture at z/OS sites of writing site-specific user exits in assembly. Less of a need for it nowadays given features in newer z/OS versions and ISV solutions, but some folks still do it. And Metal C is the only alternative to assembly that customers have. For a real world example of where it is used, I used to work with a product that used RACF user exits to send security change notifications over the network to a Java app running on a Unix system, for auditing, scheduled access certification, etc. (The user exit in question was written in HLASM not Metal C, but if you were building the same thing from scratch today you’d quite possibly choose Metal C over HLASM. You can’t write a RACF user exit in C++ because that needs language environment and language environment use is not allowed in RACF user exits.)
- pjmlp 6y agoYes, I mix IBM i and z/OS all the time, thanks for the correction. However I would say that is exactly the example of a niche use case.
- skissane 6y agoVendors who write system level software (security, backup, operations, management, batch scheduling, middleware, databases, transaction monitors, etc) do a lot of that you are classifying as “niche”, but for which Metal C is one of the few available options. Application level stuff, nobody should use Metal C for that. Use Language Environment C/C++. But at application level, C and C++ are not very popular languages for z/OS. COBOL and Java are. On IBM i, IBM used C++ heavily as a system programming language, especially as a replacement for PL/MP. By contrast, C++ has always been relatively niche on z/OS.
- pjmlp 6y agoFair enough, thanks for the overview.