-qtarget

In z/OS® XL C/C++, the -qtarget option generates an object module for the target operating system or runtime library. This option enables you to compile and link a program on the current level of the z/OS operating system and run the resulting application on an earlier release of the z/OS operating system that is supported by the -qtarget option.

In Open XL C/C++ for z/OS, -mzos-target controls which z/OS level is assumed for compiling you program, which is a functionally equivalent option to -qtarget except that -mzos-target=current option does not define the __TARGET_LIB__ macro.

With -mzos-target=current, which is the default option in Open XL C/C++ for z/OS, the __TARGET_LIB__ macro is defined by the systems headers after the first system header is included in the source code.

Related information