Abstract for XL C/C++ User's Guide
About IBM z/OS XL C/C++
What's new for XL C/C++ V2R1M1
What's new for z/OS V2R1 XL C/C++
The XL C/C++ compilers
The C language
The C++ language
Common features of the z/OS XL C and XL C++ compilers
z/OS XL C compiler-specific features
z/OS XL C++ compiler-specific features
Class libraries
Utilities
dbx
Language Environment element
Language Environment downward compatibility
About prelinking, linking, and binding
Notes on the prelinking process
File format considerations
The program management binder
z/OS UNIX System Services
z/OS XL C/C++ applications with z/OS UNIX System Services C functions
Input and output
I/O interfaces
File types
Additional I/O features
The System Programming C facility
Interaction with other IBM products
Additional features of z/OS XL C/C++
z/OS XL C example
Example of a C program
CCNUAAM
CCNUAAN
Compiling, binding, and running the z/OS XL C example
Under z/OS batch
Non-XPLINK and XPLINK under TSO
Non-XPLINK and XPLINK under the z/OS UNIX shell
z/OS XL C++ examples
Example of a C++ program
CCNUBRH
CCNUBRC
Compiling, binding, and running the z/OS XL C++ example
Under z/OS batch
Non-XPLINK and XPLINK under TSO
Non-XPLINK and XPLINK under the z/OS UNIX shell
Example of a C++ template program
CLB3ATMP.CPP
Compiling, binding, and running the C++ template example
Under z/OS batch
Under TSO
Under the z/OS UNIX shell
Compiler options
Specifying compiler options
IPA considerations
Using special characters
Specifying z/OS XL C compiler options using #pragma options
Specifying compiler options under z/OS UNIX
Compiler option defaults
Summary of compiler options
Compiler output options
Compiler input options
Language element control options
C++ template options
Object code control options
Floating-point and integer control options
Error-checking and debugging options
Listings, messages, and compiler information options
Optimization and tuning options
Portability and migration options
Compiler customization options
Description of compiler options
AGGRCOPY
AGGREGATE | NOAGGREGATE (C only)
ALIAS | NOALIAS (C only)
ANSIALIAS | NOANSIALIAS
ARCHITECTURE
ARGPARSE | NOARGPARSE
ARMODE | NOARMODE (C only)
ASCII | NOASCII
ASM | NOASM
ASMDATASIZE (C only)
ASMLIB | NOASMLIB
ASSERT(RESTRICT) | ASSERT(NORESTRICT)
ATTRIBUTE | NOATTRIBUTE (C++ only)
BITFIELD(SIGNED) | BITFIELD(UNSIGNED)
CHARS(SIGNED) | CHARS(UNSIGNED)
CHECKOUT | NOCHECKOUT (C only)
CICS | NOCICS
COMPACT | NOCOMPACT
COMPRESS | NOCOMPRESS
CONVLIT | NOCONVLIT
CSECT | NOCSECT
CVFT | NOCVFT (C++ only)
DBRMLIB
DEBUG | NODEBUG
DEFINE
DFP | NODFP
DIGRAPH | NODIGRAPH
DLL | NODLL
DSAUSER | NODSAUSER (C only)
ENUMSIZE
EPILOG (C only)
EVENTS | NOEVENTS
EXECOPS | NOEXECOPS
EXH | NOEXH (C++ only)
EXPMAC | NOEXPMAC
EXPORTALL | NOEXPORTALL
FASTTEMPINC | NOFASTTEMPINC (C++ only)
FLAG | NOFLAG
FLOAT
FUNCEVENT | NOFUNCEVENT
GENASM | NOGENASM (C only)
GOFF | NOGOFF
GONUMBER | NOGONUMBER
HALT(num)
HALTONMSG | NOHALTONMSG
HGPR | NOHGPR
HOT | NOHOT
IGNERRNO | NOIGNERRNO
INCLUDE | NOINCLUDE
INFO | NOINFO
INITAUTO | NOINITAUTO
INLINE | NOINLINE
INLRPT | NOINLRPT
IPA | NOIPA
KEYWORD | NOKEYWORD
LANGLVL
LIBANSI | NOLIBANSI
LIST | NOLIST
LOCALE | NOLOCALE
LONGNAME | NOLONGNAME
LP64 | ILP32
LSEARCH | NOLSEARCH
MAKEDEP
MARGINS | NOMARGINS
MAXMEM | NOMAXMEM
MEMORY | NOMEMORY
METAL | NOMETAL (C only)
NAMEMANGLING (C++ only)
NESTINC | NONESTINC
OBJECT | NOOBJECT
OBJECTMODEL (C++ only)
OE | NOOE
OFFSET | NOOFFSET
OPTFILE | NOOPTFILE
OPTIMIZE | NOOPTIMIZE
PHASEID | NOPHASEID
PLIST
PORT | NOPORT (C++ only)
PPONLY | NOPPONLY
PREFETCH | NOPREFETCH
PROLOG (C only)
REDIR | NOREDIR
RENT | NORENT (C only)
REPORT | NOREPORT
RESERVED_REG (C only)
RESTRICT | NORESTRICT (C only)
ROCONST | NOROCONST
ROSTRING | NOROSTRING
ROUND
RTCHECK | NORTCHECK
RTTI | NORTTI (C++ only)
SEARCH | NOSEARCH
SEQUENCE | NOSEQUENCE
SERVICE | NOSERVICE
SEVERITY | NOSEVERITY (C only)
SHOWINC | NOSHOWINC
SHOWMACROS | NOSHOWMACROS
SKIPSRC
SMP | NOSMP
SOURCE | NOSOURCE
SPILL | NOSPILL
SPLITLIST | NOSPLITLIST
SQL | NOSQL
SSCOMM | NOSSCOMM (C only)
START | NOSTART
STATICINLINE | NOSTATICINLINE (C++ only)
STRICT | NOSTRICT
STRICT_INDUCTION | NOSTRICT_INDUCTION
SUPPRESS | NOSUPPRESS
SYSSTATE (Metal C only)
TARGET
TEMPINC | NOTEMPINC (C++ only)
TEMPLATERECOMPILE | NOTEMPLATERECOMPILE (C++ only)
TEMPLATEDEPTH (C++ only)
TEMPLATEREGISTRY | NOTEMPLATEREGISTRY (C++ only)
TERMINAL | NOTERMINAL
TEST | NOTEST
THREADED | NOTHREADED
TMPLPARSE (C++ only)
TUNE
UNDEFINE
UNROLL | NOUNROLL
UPCONV | NOUPCONV (C only)
VECTOR | NOVECTOR
WARN64 | NOWARN64
WARN0X | NOWARN0X (C++11)
WSIZEOF | NOWSIZEOF
XPLINK | NOXPLINK
XREF | NOXREF
Using the z/OS XL C compiler listing
IPA considerations
Example of a C compiler listing
z/OS XL C compiler listing components
Using the z/OS XL C++ compiler listing
IPA considerations
Example of a C++ compiler listing
z/OS XL C++ compiler listing components
Using the IPA link step listing
Example of an IPA link step listing
IPA link step listing components
Binder options and control statements
Runtime options
Specifying runtime options
Using the #pragma runopts preprocessor directive
Compiling
Input to the z/OS XL C/C++ compiler
Output from the compiler
Specifying output files
Listing output
Object module output
Preprocessor output
Template instantiation output
Valid input/output file types
Compiling under z/OS batch
Using cataloged procedures for z/OS XL C
Using cataloged procedures for z/OS XL C++
Using special characters
Examples of compiling programs using your own JCL
Specifying source files
Specifying include files
Specifying output files
Compiling under TSO
Using the CC and CXX REXX EXECs
Specifying sequential and partitioned data sets
Specifying z/OS UNIX files or directories
Compiling and binding in the z/OS UNIX System Services environment
Compiling without binding using compiler invocation command names supported by c89 and xlc
Compiling and binding in one step using compiler invocation command names supported by c89 and xlc
Building an application with XPLINK using the c89 or xlc utilities
Building a 64-bit application using the c89 or xlc utilities
Invoking IPA using the c89 or xlc utilities
Using the make utility
Compiling with IPA
The IPA compile step
The IPA link step
Working with object files
Browsing object files
Identifying object file variations
Using feature test macros
Using include files
Specifying include file names
Forming file names
Forming data set names with LSEARCH | SEARCH options
Search sequence
Determining whether the file name is in absolute form
Using SEARCH and LSEARCH
Search sequences for include files
Using the IPA link step with z/OS XL C/C++ programs
Invoking IPA using the c89 and xlc utilities
Compiling under z/OS batch
Creating a module with IPA
Example 1. all C parts
Example 2. all C parts built with XPLINK
Creating a DLL with IPA
Example 1. a mixture of C and C++
Example 2. using the IPA control file
Using profile-directed feedback (PDF)
Steps for using PDF optimization
Steps for building a module in z/OS UNIX System Services using PDF
Reference Information
IPA link step control file
Object file directives understood by IPA
Troubleshooting
Binding z/OS XL C/C++ programs
When you can use the binder
When you cannot use the binder
Using different methods to bind
Single final bind
Bind each compile unit
Build and use a DLL
Rebind a changed compile unit
Binding under z/OS UNIX
z/OS UNIX example
Steps for single final bind using c89
Steps for binding each compile unit using c89
Steps for building and using a DLL using c89
Steps for rebinding a changed compile unit using c89
Using the non-XPLINK version of the Standard C++ Library and c89
Using the non-XPLINK version of the Standard C++ Library and xlc
Binding under z/OS batch
z/OS batch example
Steps for single final bind under z/OS batch
Steps for binding each compile unit under z/OS batch
Steps for building and using a DLL under z/OS batch
Build and use a 64-bit application under z/OS batch
Build and use a 64-bit application with IPA under z/OS batch
Using the non-XPLINK version of the Standard C++ Library and z/OS batch
Steps for rebinding a changed compile unit under z/OS batch
Writing JCL for the binder
Binding under TSO using CXXBIND
TSO example
Steps for single final bind under TSO
Steps for binding each compile unit under TSO
Steps for building and using a DLL under TSO
Steps for rebinding a changed compile unit under TSO
Binder processing
Linkage considerations
Primary input processing
Secondary input processing
Autocall input processing (library search)
Incremental autocall processing (AUTOCALL control statement)
Final autocall processing (SYSLIB)
Rename processing
Generating aliases for automatic library call (library search)
Dynamic Link Library (DLL) processing
Output program object
Output IMPORT statements
Output listing
Header
Input Event Log
Module Map
Cross-Reference Table
Imported and Exported Symbols Listing
Mangled to Demangled Symbol Cross Reference
Processing Options
Save Operation Summary
Save Module Attributes
Entry Point and Alias Summary
Long Symbol Abbreviation Table
DDname vs Pathname Cross Reference Table
Message Summary Report
Binder processing of C/C++ object to program object
Rebindability
Error recovery
Unresolved symbols
Significance of library search order
Duplicates
Duplicate functions from autocall
Hunting down references to unresolved symbols
Incompatible linkage attributes
Non-reentrant DLL problems
Code that has been prelinked
Running a C or C++ application
Setting the region size for z/OS XL C/C++ applications
Running an application under z/OS batch
Specifying runtime options under z/OS batch
Specifying runtime options in the EXEC statement
Using cataloged procedures
Running an application under TSO
Specifying runtime options under TSO
Passing arguments to the z/OS XL C/C++ application
Running an application under z/OS UNIX
z/OS UNIX application environments
Specifying runtime options under z/OS UNIX
Restriction on using 24-bit AMODE programs
Copying applications between a PDS and z/OS UNIX System Services
Running a data set member from the z/OS shell
Running z/OS UNIX applications under z/OS batch
Cataloged procedures and REXX EXECs
Tailoring cataloged procedures, REXX EXECs, and EXECs
Data sets used
Description of data sets used
Examples using cataloged procedures
Other z/OS XL C utilities
Using the old syntax for CC
Using CMOD
Object library utility
Creating an object library under z/OS batch
Creating an object library under TSO
Object library utility map
Filter utility
CXXFILT options
Under z/OS batch
Under TSO
DSECT conversion utility
DSECT Utility options
Generation of structures
Under z/OS batch
Under TSO
Coded character set and locale utilities
Coded character set conversion utilities
iconv utility
Under z/OS batch
Under TSO
Under the z/OS Shell
genxlt utility
Under z/OS batch
Under TSO
localedef utility
Under z/OS batch
Under TSO
Under the z/OS Shell
CDAHLASM — Use the HLASM assembler to create DWARF debug information (C only)
Archive and make utilities
Archive libraries
Creating archive libraries
Creating makefiles
BPXBATCH utility
as — Use the HLASM assembler to produce object files
c89 — Compiler invocation using host environment variables
dbgld — Create a module map for debugging
CDADBGLD — Create a debug side file for the module map
xlc — Compiler invocation using a customizable configuration file
Invocation commands
Setting up the compilation environment
Environment variables
Environment variables for OpenMP
Setting up a configuration file
Configuration file attributes
Tailoring a configuration file
Default configuration file
Invoking the compiler
Invoking the binder
Supported options
–q options syntax
Flag options syntax
Specifying compiler options
Specifying compiler options on the command line
Specifying flag options
Specifying compiler options in a configuration file
Specifying compiler options in your program source files
Specifying compiler options for architecture-specific 32-bit or 64-bit compilation
Prelinking and linking z/OS XL C/C++ programs
Restrictions on using the prelinker
Prelinking an application
Using DD Statements for the standard data sets - prelinker
Input to the prelinker
Prelinker output
Mapping long names to short names
Linking an application
Using DD statements for standard data sets—linkage editor
Input to the linkage editor
Output from the linkage editor
Link-editing multiple object modules
Building DLLs
Using DLLs
Prelinking and linking an application under z/OS batch and TSO
Language Environment Prelinker Map
Processing the prelinker automatic library call
References to currently undefined symbols (external references)
Prelinking and linking under z/OS batch
Writing JCL for the prelinker and linkage editor
Secondary input to the linker
Using additional input object modules under z/OS batch
Under TSO
Prelinking and linking under TSO
Example of prelinking and linking under TSO
Using CPLINK
Using LINK
Prelinking and link-editing under the z/OS Shell
Using your JCL
Setting c89 to invoke the prelinker
Using the c89 utility
Prelinker control statement processing
IMPORT control statement
INCLUDE control statement
LIBRARY control statement
RENAME control statement
Reentrancy
Natural or constructed reentrancy
Using the prelinker to make your program reentrant
Steps for generating a reentrant load module in C
Steps for generating a reentrant load module in C++
Resolving multiple definitions of the same template function
External variables
Prelinker and linkage editor options
Prelinker options
Linkage editor options
Diagnosing problems
Problem checklist
When does the error occur?
Steps for problem diagnosis using optimization levels
Steps for diagnosing errors that occur at compile time
Steps for diagnosing errors that occur at IPA Link time
The error occurs at bind time
The error occurs at prelink time
The error occurs at link time
Steps for diagnosing errors that occur at run time
Steps for avoiding installation problems
Calling the z/OS XL C/C++ compiler from assembler
Example of using the assembler ATTACH macro (CCNUAAP)
Example of JCL for the assembler ATTACH macro (CCNUAAQ)
Example of using the assembler LINK macro (CCNUAAR)
Example of JCL for the assembler LINK macro (CCNUAAS)
Example of using the assembler CALL macro (CCNUAAT)
Example of JCL for assembler CALL macro (CCNUAAU)
Layout of the Events file
Description of the FILEID field
Description of the FILEEND field
Description of the ERROR field
Customizing default options for z/OS XL C/C++ compiler
Glossary