Object code control
#pragma longname, #pragma nolongname You can use the #pragma preprocessor directive to override the default values for compiler options. However, for LONGNAME | NOLONGNAME, the compiler options override the #pragma preprocessor directives.
Provides support for external names of mixed case and up to 1024 characters long.
When the LONGNAME compiler option is in effect, the compiler generates untruncated and mixed case external names in the object module produced by the compiler for functions with non-C++ linkage.
For C:
.-NOLO-. >>-+-LO---+----------------------------------------------------><
For C++:
.-LO---. >>-+-NOLO-+----------------------------------------------------><
For C, the default option is NOLONGNAME. For C++, the default option is LONGNAME.
For the z/OS® UNIX System Services utilities, the default for a regular compile is LONGNAME.
Functions with C++ linkage are always untruncated and mixed-case external names.
The system binder recognizes the format of long external names in object modules, but the system linkage editor does not.
For z/OS XL C, if you specify the ALIAS option with LONGNAME, the compiler generates a NAME control statement, but no ALIAS control statements.
If you use #pragma map to associate an external name with an identifier, the compiler generates the external name in the object module. That is, #pragma map has the same behavior for the LONGNAME and NOLONGNAME compiler options. Also, #pragma csect has the same behavior for the LONGNAME and NOLONGNAME compiler options.
A comment that indicates the setting of the LONGNAME option will be generated in your object module to aid you in diagnosing your program.
For C only, LONGNAME is always in effect even if you specify NOLONGNAME. Either the LONGNAME compiler option or the #pragma longname preprocessor directive is required for the IPA compile step.
The IPA link step ignores this option if you specify it, and uses the LONGNAME option for all partitions it generates.
For C, __LONGNAME__ is predefined to 1 when the LONGNAME compiler option is in effect.
For C++, __LONGNAME__ is always predefined to 1 regardless of the LONGNAME compiler option.
For C++, __IBMCPP_LONGNAME__ is defined as 1 if the LONGNAME compiler option is in effect, and it is undefined if the NOLONGNAME compiler option is on.