Programming with Metal C
When you want to build an XL C program that can run in any z/OS® environment, you can use the Metal C programming features provided by the XL C compiler as a high level language (HLL) alternative to writing the program in assembly language.
Metal C programming features facilitate direct use of operating system services. For example, you can use the C programming language to write installation exits.
When the METAL option is in effect, the XL C compiler:
- Generates code that is independent of Language Environment®. Note: Although the compiler generates default prolog and epilog code that allows the Metal C code to run, you might be required to supply your own prolog and epilog code to satisfy runtime environment requirements.
- Generates code that follows MVS™ linkage
conventions. This facilitates interoperations between the Metal C
code and the existing code base. See Metal C and MVS linkage conventions. Note: Metal C also provides a feature that improves the program's runtime performance. See NAB linkage extension.
- Provides support for accessing the data stored in data spaces. See AR-mode programming support.
- Provides support for embedding your assembly statements into the compiler-generated code. See Inserting HLASM instructions into the generated source code.
If you use the METAL compiler option together with XL C optimization capabilities, you can use C to write highly optimized system-level code.
The METAL compiler option implies certain other XL C compiler options and disables others. For detailed information, see the METAL | NOMETAL (C only) option in z/OS XL C/C++ User's Guide.