Additional features of z/OS XL C/C++

Feature Description
long long Data Type z/OS® XL C/C++ supports long long as a native data type when the compiler option LANGLVL(LONGLONG) is turned on. This option is turned on by default by the compiler option LANGLVL(EXTENDED). As of z/OS V1R7, the XL C compiler supports long long as a native data type (according to the ISO/IEC 9899:1999 standard), when the LANGLVL(STDC99) option or LANGLVL(EXTC99) option is in effect.
Multibyte Character Support z/OS XL C/C++ supports multibyte characters for those national languages such as Japanese whose characters cannot be represented by a single byte.
Wide Character Support Multibyte characters can be normalized by z/OS XL C library functions and encoded in units of one length. These normalized characters are called wide characters. Conversions between multibyte and wide characters can be performed by string conversion functions such as wcstombs(), mbstowcs(), wcsrtombs(), and mbsrtowcs(), as well as the family of wide-character I/O functions. Wide-character data can be represented by the wchar_t data type.
Extended Precision Floating-Point Numbers z/OS XL C/C++ provides three IBM® z/Architecture® floating-point number data types: single precision (32 bits), declared as float; double precision (64 bits), declared as double; and extended precision (128 bits), declared as long double.

Extended precision floating-point numbers give greater accuracy to mathematical calculations.

z/OS XL C/C++ also supports IEEE 754 floating-point representation (base-2 or binary floating-point formats). By default, float, double, and long double values are represented in z/Architecture floating-point formats (base-16 floating-point formats). However, the IEEE 754 floating-point representation is used if you specify the FLOAT(IEEE) compiler option. For details on this support, see FLOAT.

As of z/OS V1R9, XL C/C++ also supports IEEE 754 decimal floating-point representation (base-10 floating-point formats), with the types _Decimal32, _Decimal64, and _Decimal128, if you specify the DFP compiler option. For details on this support, see DFP | NODFP.

Command Line Redirection You can redirect the standard streams stdin, stderr, and stdout from the command line or when calling programs using the system() function.
National Language Support z/OS XL C/C++ provides message text in either American English or Japanese. You can dynamically switch between these two languages.
Coded Character Set (Code Page) Support z/OS XL C/C++ compiler can compile C/C++ source written in different EBCDIC code pages. In addition, the iconv utility converts data or source from one code page to another.
Selected Built-in Library Functions For selected library functions, the compiler generates an instruction sequence directly into the object code during optimization to improve execution performance. String and character functions are examples of these built-in functions. No actual calls to the library are generated when built-in functions are used.
Multi-threading Threads are efficient in applications that allow them to take advantage of any underlying parallelism available in the host environment. This underlying parallelism in the host can be exploited either by forking a process and creating a new address space, or by using multiple threads within a single process. For more information, refer to "Using Threads in z/OS UNIX Applications" in z/OS XL C/C++ Programming Guide.
Packed Structures and Unions z/OS XL C provides support for packed structures and unions. Structures and unions may be packed to reduce the storage requirements of a z/OS XL C program or to define structures that are laid out according to COBOL or PL/I structure alignment rules.
Fixed-point (Packed) Decimal Data z/OS XL C supports fixed-point (packed) decimal as a native data type for use in business applications. The packed data type is similar to the COBOL data type COMP-3 or the PL/I data type FIXED DEC, with up to 31 digits of precision.
Long Name Support For portability, external names can be mixed case and up to 32 K - 1 characters in length. For C++, the limit applies to the mangled version of the name.
System Calls You can call commands or executable modules using the system() function under z/OS, z/OS UNIX System Services, and TSO. You can also use the system() function to call EXECs on z/OS and TSO, or shell scripts using z/OS UNIX System Services.
Exploitation of Hardware

Use the ARCHITECTURE compiler option to select the minimum level of machine architecture on which your program will run. Note that certain features provided by the compiler require a minimum architecture level. For more information, refer to ARCHITECTURE.

Use the TUNE compiler option to optimize your application for a specific machine architecture within the constraints imposed by the ARCHITECTURE option. The TUNE level must not be lower than the setting in the ARCHITECTURE option. For more information, refer to TUNE.

Built-in Functions for Floating-Point and Other Hardware Instructions Use built-in functions for floating-point and other hardware instructions that are otherwise inaccessible to XL C/C++ programs. For more information, see the built-in functions described in z/OS XL C/C++ Programming Guide.
Vector processing support z/OS XL C/C++ compiler provides vector programming support for programmers to make use of the Vector Facility for z/Architecture. For detailed information, see Using vector programming support in z/OS XL C/C++ Programming Guide