• Abstract for XL C/C++Programming Guide
    • z/OS Version 2 Release 1 summary of changes
  • Introduction
    • About IBM z/OS XL C/C++
  • Input and Output
    • Introduction to C and C++ input and output
      • Types of C and C++ input and output
        • Text streams
        • Binary streams
        • Record I/O
        • Blocked I/O
    • Understanding models of C I/O
      • The record model for C I/O
        • Record formats
      • The byte stream model for C I/O
        • Mapping the C types of I/O to the byte stream model
    • Using the Standard C++ Library I/O Stream Classes
      • Advantages to using the C++ I/O stream classes
      • Predefined streams for C++
      • How C++ I/O streams relate to C I/O streams
      • Mixing the Standard C++ I/O stream classes, USL I/O stream class library, and C I/O library functions
      • Specifying file attributes
    • Opening files
      • Prototypes of functions
      • Categories of I/O
      • Specifying what kind of file to use
        • OS files
        • UNIX file system files
        • VSAM data sets
        • Terminal files
        • Memory files and hiperspace memory files
        • CICS data queues
        • z/OS Language Environment Message file
        • How to specify RECFM, LRECL, and BLKSIZE
        • fopen() defaults
        • DDnames
      • Avoiding Undesirable Results when Using I/O
      • How z/OS XL C/C++ determines what kind of file to open
        • Under TSO, MVS batch, IMS — POSIX(ON)
        • Under TSO, MVS batch, IMS — POSIX(OFF)
        • Under CICS
    • Buffering of C streams
    • Using ASA text files
      • Example of writing to an ASA file
      • ASA file control
    • z/OS XL C Support for the double-byte character set
      • Opening files
      • Reading streams and files
      • Writing streams and files
        • Writing text streams
        • Writing binary streams
      • Flushing buffers
        • Flushing text streams
        • Flushing binary streams
        • ungetwc() considerations
      • Setting positions within files
        • Repositioning within text streams
        • Repositioning within binary streams
        • ungetwc() considerations
      • Closing files
      • Manipulating wide character array functions
    • Using C and C++ standard streams and redirection
      • Default open modes
      • Interleaving the standard streams with sync_with_stdio()
      • Interleaving the standard streams without sync_with_stdio()
      • Redirecting standard streams
      • Redirecting streams from the command line
        • Using the redirection symbols
      • Assigning the standard streams
      • Using the freopen() library function
      • Redirecting streams with the MSGFILE option
        • MSGFILE considerations
      • Redirecting streams under z/OS
        • Under MVS batch
        • Under TSO
        • Under IMS
        • Under CICS
      • Passing C and C++ standard streams across a system() call
        • Passing binary streams
        • Passing text streams
        • Passing record I/O streams
        • Passing blocked I/O streams
      • Using global standard streams
        • Command line redirection
        • Direct assignment
        • freopen()
        • MSGFILE() runtime option
        • fclose()
        • File position and visible data
        • C++ I/O stream library
    • Performing OS I/O operations
      • Opening files
        • Using fopen() or freopen()
        • Generation data group I/O
        • Regular and extended partitioned data sets
        • Partitioned and sequential concatenated data sets
        • In-stream data sets
        • SYSOUT data sets
        • Tapes
        • Multivolume data sets
        • Striped data sets
        • Large format sequential data sets
        • Other devices
        • Access method selection
        • fopen() and freopen() parameters
      • Buffering
        • Multiple buffering
      • DCB (Data Control Block) attributes
      • Reading from files
        • Reading from binary files
        • Reading from text files
        • Reading from record I/O files
        • Reading from blocked I/O files
      • Writing to files
        • Writing to binary files
        • Writing to text files
        • Writing to record I/O files
        • Writing to blocked I/O files
      • Flushing buffers
        • Updating existing records
        • Reading updated records
        • Writing new records
        • ungetc() considerations
      • Repositioning within files
        • ungetc() considerations
        • How long fgetpos() and ftell() values last
        • Using fseek() and ftell() in binary files
        • Using fseek() and ftell() in text files (ASA and Non-ASA)
        • Using fseek() and ftell() in record files
        • Using fseek() and ftell() in blocked files
        • Porting old C code that uses fseek() or ftell()
      • Closing files
      • Renaming and removing files
      • fldata() behavior
    • Performing z/OS UNIX file system I/O operations
      • Creating files
        • Regular files
        • Link and symbolic link files
        • Directory files
        • Character special files
        • FIFO files
      • Opening files
        • Using fopen() or freopen()
      • Reading from z/OS UNIX file system files
      • Opening and reading from z/OS UNIX file system directory files
      • Writing to z/OS UNIX file system files
      • Flushing records
      • Setting positions within files
      • Closing files
      • Deleting files
      • Pipe I/O
        • Using unnamed pipes
        • Using named pipes
        • Character special file I/O
      • Low-level z/OS UNIX I/O
      • Example of z/OS UNIX file system I/O functions
      • fldata() behavior
      • File tagging and conversion
      • Access control lists (ACLs)
    • Performing VSAM I/O operations
      • VSAM types (data set organization)
        • Access method services
      • Choosing VSAM data set types
        • Keys, RBAs and RRNs
        • Summary of VSAM I/O operations
      • Opening VSAM data sets
        • Using fopen() or freopen()
        • Buffering
      • Record I/O in VSAM
        • RRDS record structure
        • Reading record I/O files
        • Writing to record I/O files
        • Updating record I/O files
        • Deleting records
        • Repositioning within record I/O files
        • Flushing buffers
        • Summary of VSAM record I/O operations
      • VSAM record level sharing and transactional VSAM
        • Error reporting
      • VSAM extended addressability
      • Text and binary I/O in VSAM
        • Reading from text and binary I/O files
        • Writing to and updating text and binary I/O files
        • Deleting records in text and binary I/O files
        • Repositioning within text and binary I/O files
        • Flushing buffers
        • Summary of VSAM text I/O operations
        • Summary of VSAM binary I/O operations
      • Closing VSAM data sets
      • VSAM return codes
      • VSAM examples
        • KSDS example
        • RRDS example
      • fldata() behavior
    • Performing terminal I/O operations
      • Opening files
        • Using fopen() and freopen()
        • Buffering
      • Reading from files
        • Reading from binary files
        • Reading from text files
        • Reading from record I/O files
      • Writing to files
        • Writing to binary files
        • Writing to text files
        • Writing to record I/O files
      • Flushing records
        • Text streams
        • Binary streams
        • Record I/O
      • Repositioning within files
      • Closing files
      • fldata() behavior
    • Performing memory file and hiperspace I/O operations
      • Using hiperspace operations
      • Opening files
        • Using fopen() or freopen()
        • Simulating partitioned data sets
        • Buffering
      • Reading from files
      • Writing to files
      • Flushing records
        • ungetc() considerations
      • Repositioning within files
      • Closing files
        • Performance tips
      • Removing memory files
      • fldata() behavior
      • Example program
    • Performing CICS Transaction Server I/O operations
    • Language Environment Message file operations
      • Opening files
      • Reading from files
      • Writing to files
      • Flushing buffers
      • Repositioning within files
      • Closing files
    • CELQPIPI MSGRTN file operations
      • Opening files
      • Reading from files
      • Writing to files
      • Flushing buffers
      • Repositioning within files
      • Closing files
      • fldata() behavior
      • fldata() example
    • Debugging I/O programs
      • Using the __amrc structure
      • Using the __amrc2 structure
      • Using __last_op codes
      • Using the SIGIOERR signal
      • File I/O trace
      • Locating the file I/O trace
  • Interlanguage Calls with z/OS XL C/C++
    • Using Linkage Specifications in C or C++
      • Syntax for Linkage in C or C++
        • Syntax for Linkage in C
        • Syntax for Linkage in C++
      • Kinds of Linkage used by C or C++ Interlanguage Programs
      • Using Linkage Specifications in C++
    • Combining C or C++ and Assembler
      • Establishing the z/OS XL C/C++ environment
      • Specifying linkage for C or C++ to Assembler
      • Parameter lists for OS linkage
      • XPLINK Assembler
      • Using standard macros
        • Non-XPLINK assembler prolog
        • Non-XPLINK assembler epilog
        • XPLINK Assembler prolog
        • XPLINK Call
        • XPLINK Assembler epilog
        • Accessing automatic memory in the non-XPLINK stack
      • Calling C code from Assembler — C example
      • Calling runtime library routines from Assembler — C++ example
      • Register content at entry to a non-XPLINK ASM routine using OS linkage
      • Register content at exit from a non-XPLINK ASM routine to z/OS XL C/C++
      • Retaining the C environment using preinitialization
        • Setting up the interface for preinitializable programs
        • Preinitializing a C program
        • Multiple preinitialization compatibility interface C environments
        • Using the service vector and associated routines
  • Coding: Advanced Topics
    • Building and using Dynamic Link Libraries (DLLs)
      • Support for DLLs
      • DLL concepts and terms
      • Loading a DLL
        • Loading a DLL implicitly
        • Loading a DLL explicitly
      • Managing the use of DLLs when running DLL applications
        • Loading DLLs
        • Sharing DLLs
        • Freeing DLLs
      • Creating a DLL or a DLL application
      • Building a simple DLL
        • Example of building a simple C DLL
        • Example of building a simple C++ DLL
        • Compiling your code
        • Binding your code
      • Building a simple DLL application
        • Steps for using an implicitly loaded DLL in your simple DLL application
      • Creating and using DLLs
      • DLL restrictions
        • Improving performance
    • Building complex DLLs
      • Rules for compiling source code with XPLINK
        • XPLINK applications
        • Non-XPLINK applications
      • Compatibility issues between DLL and non-DLL code
        • Pointer assignment
        • Function pointers
      • DLL function pointer call in non-DLL code
        • C example
        • Non-DLL function pointer call in DLL(CBA) code
        • Non-DLL function pointer call in DLL code
        • Function pointer comparison in non-DLL code
        • Function pointer comparison in DLL code
      • Using DLLs that call each other
    • z/OS 64-bit environment
      • Differences between the ILP32 and LP64 environments
        • ILP32 and LP64 addressing capabilities
        • ILP32 and LP64 data models and data type sizes
      • Advantages and disadvantages of the LP64 environment
        • LP64 application performance and program size
        • LP64 restrictions
      • Migrating applications from ILP32 to LP64
        • When to migrate applications to LP64
        • Checklist for ILP32-to-LP64 pre-migration activities
        • Checklist for ILP32-to-LP64 post-migration activities
      • Using compiler diagnostics to ensure portability of code
        • Using the INFO option to ensure that numbers are suffixed
        • Using the WARN64 option to identify potential portability problems
      • ILP32-to-LP64 portability issues
        • IPA(LINK) option and exploitation of 64-bit virtual memory
        • Availability of suboptions
        • Potential changes in structure size and alignment
        • Data type assignment differences under ILP32 and LP64
        • Pointer declarations when 32-bit and 64-bit applications share header files
        • Potential pointer corruption
        • Potential loss of data in constant expressions
        • Data alignment problems when structures are shared
        • Portability issues with unsuffixed numbers
        • Using a LONG_MAX macro in a printf subroutine
      • Programming for portability between ILP32 and LP64
        • Using header files to provide type definitions
        • Using suffixes and explicit types to prevent unexpected behavior
        • Defining pad members to avoid data alignment problems
        • Using prototypes to avoid debugging problems
        • Using a conditional compiler directive for preprocessor macro selection
        • Using converters under ILP32 or LP64
        • Using locales under ILP32 or LP64
    • Using threads in z/OS UNIX applications
      • Models and requirements
        • Functions
        • Creating a thread
        • Synchronization primitives
        • Thread-specific data
        • Signals
        • Generating a signal
        • Thread cancellation
        • Cleanup for threads
        • Thread stack attributes
      • Behaviors and restrictions in z/OS UNIX applications
        • Using threads with MVS files
        • Multithreaded I/O
        • Thread-scoped functions
        • Unsafe thread functions
        • Fetched functions and writable statics
        • MTF and z/OS UNIX threading
        • Thread queuing function
        • Thread scheduling
        • iconv() family of functions
    • Reentrancy in z/OS XL C/C++
      • Natural or constructed reentrancy
        • Limitations of constructed reentrancy for C programs
      • Controlling external static in C programs
        • Controlling writable strings
        • Controlling the memory area in C++
      • Controlling where string literals exist in C++ code
      • Using writable static in Assembler code
    • Using decimal data types in C
      • Decimal data type declarations
        • Declaring fixed-point decimal constants
        • Declaring decimal variables
      • Defining decimal-type constants
      • Using operators on decimal data types
        • Arithmetic operators
        • Assignment operators
        • Unary operators
        • Summary of operators used with decimal types
      • Converting decimal types
        • Converting decimal types to decimal types
        • Converting decimal types to and from integer types
        • Converting decimal data types to and from floating-point data types
      • Calling functions with decimal data types
      • Using library functions
        • Using variable arguments with decimal data types
      • Formatting input and output operations with decimal data types
      • Validating decimal values
      • Fixing sign variables
      • Returning decimal absolute values
      • Programming examples
      • Decimal exception handling
        • printf() and scanf() and format validation
        • Additional considerations
        • Error messages
        • Decimal exceptions and Assembler interlanguage calls
    • IEEE Floating-Point
      • Floating-point numbers
      • C/C++ compiler support
      • Using IEEE floating-point
    • Handling error conditions, exceptions, and signals
      • Handling C software exceptions under C++
      • Handling hardware exceptions under C++
      • Tracebacks under C++
      • AMODE 64 exception handlers
        • Scope and nesting of exception handlers
        • Handling exceptions
      • Signal handlers
        • Handling signals with POSIX(OFF) using signal() and raise()
        • Handling signals using Language Environment callable services
        • Handling signals using z/OS UNIX with POSIX(ON)
        • Asynchronous signal delivery under z/OS UNIX
        • C signal handling features under z/OS XL C/C++
    • Network communications under UNIX System Services
      • Understanding z/OS UNIX sockets and internetworking
      • Basics of network communication
        • Transport protocols for sockets
      • What is a socket?
        • z/OS UNIX Socket families
        • z/OS UNIX Socket types
        • Guidelines for using socket types
        • Addressing within sockets
      • The conversation
        • The server perspective
        • The client perspective
        • A typical TCP socket session
      • A typical UDP socket session
      • Locating the server's port
      • Network application example
      • Using common INET
      • Compiling and binding
      • Using TCP/IP APIs
        • Restrictions for using z/OS TCP/IP API with z/OS UNIX
      • Using z/OS UNIX sockets
        • Compiling under MVS batch for Berkeley sockets
        • Compiling under MVS batch for X/Open sockets
      • Understanding the X/Open Transport Interface (XTI)
        • Transport endpoints
        • Transport providers for X/Open Transport Interface
        • General restrictions for z/OS UNIX
    • Interprocess communication using z/OS UNIX
      • Message queues
      • Semaphores
      • Shared memory
      • Memory mapping
      • TSO commands from a shell
    • Using templates in C++ programs
      • Using the TEMPINC compiler option
        • TEMPINC example
        • Regenerating the template instantiation file
        • TEMPINC considerations for shared libraries
      • Using the TEMPLATEDEPTH compiler option
      • Using the TEMPLATEREGISTRY compiler option
        • Recompiling related compilation units
        • Switching from TEMPINC to TEMPLATEREGISTRY
      • Using explicit instantiation declarations (C++11 only)
        • Examples of explicit instantiation declarations
    • Using environment variables
      • Working with environment variables
        • Naming conventions
      • Environment variables specific to the z/OS XL C/C++ library
        • _CEE_DLLLOAD_XPCOMPAT
        • _CEE_DMPTARG
        • _CEE_ENVFILE
        • _CEE_ENVFILE_COMMENT
        • _CEE_ENVFILE_CONTINUATION
        • _CEE_ENVFILE_S
        • _CEE_HEAP_MANAGER
        • _CEE_REALLOC_CONTROL
        • _CEE_RUNOPTS
        • _EDC_ADD_ERRNO2
        • _EDC_ANSI_OPEN_DEFAULT
        • _EDC_AUTOCVT_BINARY
        • _EDC_BYTE_SEEK
        • _EDC_CLEAR_SCREEN
        • _EDC_COMPAT
        • _EDC_CONTEXT_GUARD
        • _EDC_C99_NAN
        • _EDC_DLL_DIAG
        • _EDC_EOVERFLOW
        • _EDC_ERRNO_DIAG
        • _EDC_FLUSH_STDOUT_PIPE
        • _EDC_FLUSH_STDOUT_SOCKET
        • _EDC_GLOBAL_STREAMS
        • _EDC_IEEEV1_COMPATIBILITY_ENV
        • _EDC_IO_ABEND
        • _EDC_IO_TRACE
        • _EDC_POPEN
        • _EDC_PTHREAD_BACKOUT
        • _EDC_PTHREAD_YIELD
        • _EDC_PTHREAD_YIELD_MAX
        • _EDC_PUTENV_COPY
        • _EDC_RRDS_HIDE_KEY
        • _EDC_STOR_INCREMENT
        • _EDC_STOR_INCREMENT_B
        • _EDC_STOR_INITIAL
        • _EDC_STOR_INITIAL_B
        • _EDC_STRPTM_STD
        • _EDC_SUSV3
        • _EDC_UMASK_DFLT
        • _EDC_ZERO_RECLEN
      • Propagating environment variables
    • Using hardware built-in functions
      • General instructions
        • PLO - Perform Locked Operation available in ARCH(5)
      • Decimal instructions
      • Floating-point support instructions
      • Decimal floating-point built-in functions
        • Macros for use with decimal floating-point built-in functions
      • Hexadecimal floating-point instructions
      • Binary floating-Point instructions
      • Built-in functions for transaction execution
    • Hardware model and feature built-ins
    • Using vector programming support
      • Options
      • Macro
      • Vector data types
      • Language extensions
        • Vector literals
        • Initialization of vectors
        • typedef definitions for vector types
        • Pointers
        • Unary expressions
          • Unary operators ++ -- + - ~
          • Address operator &
          • The __alignof__ operator
          • The sizeof operator
          • The typeof operator
          • The vec_step operator
        • Binary expressions
          • Assignment operator =
          • Multiplication operator *
          • Division operator /
          • Remainder operator %
          • Addition operator +
          • Subtraction operator -
          • Bitwise left shift operator <<
          • Bitwise right shift operator >>
          • Relational less than operator <
          • Relational greater than operator >
          • Relational less than or equal to operator <=
          • Relational greater than or equal to operator >=
          • Equality operator ==
          • Inequality operator !=
          • Bitwise AND operator &
          • Bitwise exclusive OR operator ^
          • Bitwise inclusive OR operator |
          • Vector subscripting operator []
        • Cast expressions
        • Compound literal expressions
        • Other extensions for vector types
      • Vector built-in functions
        • Header file
        • Summary of vector built-in functions
        • Arithmetic
          • vec_abs: Vector Absolute Value
          • vec_add_u128: Vector Add unsigned 128-bits
          • vec_addc: Vector Add Carryout
          • vec_addc_u128: Vector Add Compute Carryout unsigned 128-bits
          • vec_adde_u128: Vector Add With Carry unsigned 128-bits
          • vec_addec_u128: Vector Add With Carry Compute Carry unsigned 128-bits
          • vec_andc: Vector AND With Complement
          • vec_avg: Vector Average
          • vec_checksum: Vector Checksum
          • vec_gfmsum: Vector Galois Field Multiply Sum
          • vec_gfmsum_128: Vector Galois Field Multiply Sum 128-bits
          • vec_gfmsum_accum: Vector Galois Field Multiply Sum and Accumulate
          • vec_gfmsum_accum_128: Vector Galois Field Multiply Sum and Accumulate 128-bits
          • vec_madd: Vector Multiply Add
          • vec_max: Vector Maximum
          • vec_meadd: Vector Multiply and Add Even
          • vec_mhadd: Vector Multiply and Add High
          • vec_min: Vector Minimum
          • vec_mladd: Vector Multiply and Add Low
          • vec_moadd: Vector Multiply and Add Odd
          • vec_msub: Vector Multiply Subtract
          • vec_mule: Vector Multiply Even
          • vec_mulh: Vector Multiply High
          • vec_mulo: Vector Multiply Odd
          • vec_nabs: Vector Negative Absolute
          • vec_sqrt: Vector Square Root
          • vec_sub_u128: Vector Subtract unsigned 128-bits
          • vec_subc: Vector Subtract Carryout
          • vec_subc_u128: Vector Subtract Carryout unsigned 128-bits
          • vec_sube_u128: Vector Subtract with Carryout
          • vec_subec_u128: Vector Subtract with Carryout, Carryout
          • vec_sum_u128: Vector Sum Across Quadword
          • vec_sum2: Vector Sum Across Doubleword
          • vec_sum4: Vector Sum Across Word
        • Compare
          • vec_cmpeq: Vector Compare Equal
          • vec_cmpeq_idx: Vector Compare Equal Index
          • vec_cmpeq_idx_cc: Vector Compare Equal Index with Condition Code
          • vec_cmpeq_or_0_idx: Vector Compare Equal or Zero Index
          • vec_cmpeq_or_0_idx_cc: Vector Compare Equal or Zero Index with Condition Code
          • vec_cmpge: Vector Compare Greater Than or Equal
          • vec_cmpgt: Vector Compare Greater Than
          • vec_cmple: Vector Compare Less Than or Equal
          • vec_cmplt: Vector Compare Less Than
          • vec_cmpne_idx: Vector Compare Not Equal Index
          • vec_cmpne_idx_cc: Vector Compare Not Equal Index with Condition Code
          • vec_cmpne_or_0_idx: Vector Compare Not Equal or Zero Index
          • vec_cmpne_or_0_idx_cc: Vector Compare Not Equal or Zero Index with Condition Code
        • Compare Ranges
          • vec_cmpnrg: Vector Compare Not in Ranges
          • vec_cmpnrg_cc: Vector Compare Not in Ranges with Condition Code
          • vec_cmpnrg_idx: Vector Compare Not in Ranges Index
          • vec_cmpnrg_idx_cc: Vector Compare Not in Ranges Index with Condition Code
          • vec_cmpnrg_or_0_idx: Vector Compare Not in Ranges or Zero Index
          • vec_cmpnrg_or_0_idx_cc: Vector Compare Not in Ranges or Zero Index with Condition Code
          • vec_cmprg: Vector Compare Ranges
          • vec_cmprg_cc: Vector Compare Ranges with Condition Code
          • vec_cmprg_idx: Vector Compare Ranges Index
          • vec_cmprg_idx_cc: Vector Compare Ranges Index with Condition Code
          • vec_cmprg_or_0_idx: Vector Compare Ranges or Zero Index
          • vec_cmprg_or_0_idx_cc: Vector Compare Ranges or Zero Index with Condition Code
        • Find Any Element
          • vec_find_any_eq: Vector Find Any Element Equal
          • vec_find_any_eq_cc: Vector Find Any Element Equal with Condition Code
          • vec_find_any_eq_idx: Vector Find Any Element Equal Index
          • vec_find_any_eq_idx_cc: Vector Find Any Element Equal Index with Condition Code
          • vec_find_any_eq_or_0_idx: Vector Find Any Element Equal or Zero Index
          • vec_find_any_eq_or_0_idx_cc: Vector Find Any Element Equal or Zero Index with Condition Code
          • vec_find_any_ne: Vector Find Any Element Not Equal
          • vec_find_any_ne_cc: Vector Find Any Element Not Equal with Condition Code
          • vec_find_any_ne_idx: Vector Find Any Element Not Equal Index
          • vec_find_any_ne_idx_cc: Vector Find Any Element Not Equal Index with Condition Code
          • vec_find_any_ne_or_0_idx: Vector Find Any Element Not Equal or Zero Index
          • vec_find_any_ne_or_0_idx_cc: Vector Find Any Element Not Equal or Zero Index with Condition Code
        • Gather and Scatter
          • vec_extract: Vector Extract
          • vec_gather_element: Vector Gather Element
          • vec_insert: Vector Insert
          • vec_insert_and_zero: Vector Insert and Zero
          • vec_perm: Vector Permute
          • vec_permi: Vector Permute Immediate
          • vec_promote: Vector Promote
          • vec_scatter_element: Vector Scatter Element
          • vec_sel: Vector Select
        • Generate Mask
          • vec_genmask: Vector Generate Byte Mask
          • vec_genmasks_8: Vector Generate Mask (Byte)
          • vec_genmasks_16: Vector Generate Mask (Halfword)
          • vec_genmasks_32: Vector Generate Mask (Word)
          • vec_genmasks_64: Vector Generate Mask (Doubleword)
        • Copy until Zero
          • vec_cp_until_zero: Vector Copy Until Zero
          • vec_cp_until_zero_cc: Vector Copy Until Zero
        • Load and Store
          • vec_ld2f: Vector Load 2 float
          • vec_load_bndry: Vector Load to Block Boundary
          • vec_load_len: Vector Load with Length
          • vec_load_pair: Vector Load Pair
          • vec_st2f: Vector Store 2 float
          • vec_store_len: Vector Store with Length
          • vec_xld2: Vector Load 2 Doubleword
          • vec_xlw4: Vector Load 4 Word
          • vec_xstd2: Vector Store 2 Doubleword
          • vec_xstw4: Vector Store 4 Word
        • Logical
          • vec_cntlz: Vector Count Leading Zeros
          • vec_cnttz: Vector Count Trailing Zeros
          • vec_nor: Vector NOR
          • vec_popcnt: Vector Population Count
        • Merge
          • vec_mergeh: Vector Merge High
          • vec_mergel: Vector Merge Low
        • Pack and Unpack
          • vec_pack: Vector Pack
          • vec_packs: Vector Pack Saturate
          • vec_packs_cc: Vector Pack Saturate Condition Code
          • vec_packsu: Vector Pack Saturated Unsigned
          • vec_packsu_cc: Vector Pack Saturated Unsigned Condition Code
          • vec_unpackh: Vector Unpack High Element
          • vec_unpackl: Vector Unpack Low Element
        • Replicate
          • vec_splat: Vector Splat
          • vec_splat_s8: Vector Splat Signed Byte
          • vec_splat_s16: Vector Splat Signed Halfword
          • vec_splat_s32: Vector Splat Signed Word
          • vec_splat_s64: Vector Splat Signed Doubleword
          • vec_splat_u8: Vector Splat Unsigned Byte
          • vec_splat_u16: Vector Splat Unsigned Halfword
          • vec_splat_u32: Vector Splat Unsigned Word
          • vec_splat_u64: Vector Splat Doubleword
          • vec_splats: Vector Splats
        • Rotate and Shift
          • vec_rl: Vector Element Rotate Left
          • vec_rl_mask: Vector Element Rotate and Insert Under Mask
          • vec_rli: Vector Element Rotate Left Immediate
          • vec_slb: Vector Shift Left by Byte
          • vec_sld: Vector Shift Left Double by Byte
          • vec_sldw: Vector Shift Left Double by Word
          • vec_sll: Vector Shift Left
          • vec_srab: Vector Shift Right Arithmetic by Byte
          • vec_sral: Vector Shift Right Arithmetic
          • vec_srb: Vector Shift Right by Byte
          • vec_srl: Vector Shift Right
        • Rounding and Conversion
          • vec_ceil: Vector Ceiling
          • vec_ctd: Vector Convert to Double
          • vec_ctsl: Vector Convert to signed long long
          • vec_ctul: Vector Convert to unsigned long long
          • vec_extend_s64: Vector Sign Extend to Doubleword
          • vec_floor: Vector Floor
          • vec_round: Vector Round to Nearest
          • vec_roundc: Vector Round to Current
          • vec_roundm: Vector Round toward Negative Infinity
          • vec_roundp: Vector Round toward Positive Infinity
          • vec_roundz: Vector Round toward Zero
          • vec_trunc: Vector Truncate
        • Test
          • vec_fp_test_data_class: Vector Floating-Point Test Data Class
          • vec_test_mask: Vector Test under Mask
        • All Predicates
          • vec_all_eq: All Elements Equal
          • vec_all_ge: All Elements Greater Than or Equal
          • vec_all_gt: All Elements Greater Than
          • vec_all_le: All Elements Less Than or Equal
          • vec_all_lt: All Elements Less Than
          • vec_all_nan: All Elements Not a Number
          • vec_all_ne: All Elements Not Equal
          • vec_all_nge: All Elements Not Greater Than or Equal
          • vec_all_ngt: All Elements Not Greater Than
          • vec_all_nle: All Elements Not Less Than or Equal
          • vec_all_nlt: All Elements Not Less Than
          • vec_all_numeric: All Elements Numeric
        • Any Predicates
          • vec_any_eq: Any Element Equal
          • vec_any_ge: Any Element Greater Than or Equal
          • vec_any_gt: Any Element Greater Than
          • vec_any_le: Any Element Less Than or Equal
          • vec_any_lt: Any Element Less Than
          • vec_any_nan: Any Element Not a Number
          • vec_any_ne: Any Element Not Equal
          • vec_any_nge: Any Element Not Greater Than or Equal
          • vec_any_ngt: Any Element Not Greater Than
          • vec_any_nle: Any Element Not Less Than or Equal
          • vec_any_nlt: Any Element Not Less Than
          • vec_any_numeric: Any Element Numeric
        • Defining vector built-in functions from the operators
    • ANSI C/C++ 98 applications and C99
      • Obtaining C99 behavior with XL C
      • Using C99 functions in XL C++ applications
        • Feature test macros that control C99 interfaces in XL C++ applications
        • Using C99 functions in C++ applications when ambiguous definitions exist
    • Writing applications for Single UNIX Specification, Version 3
      • Announcing your intentions
      • Testing the environment
      • What is different in SUSv3
      • Symbols withdrawn in SUSv3
      • Candidates for removal in a future version
      • Implementation compliance
    • Saved compile-time options information
      • Saved options information layout
  • Performance optimization
    • Improving program performance
      • Writing code for performance
      • Using C++ constructs in performance-critical code
      • Using explicit instantiation declarations (C++11 only)
      • ANSI aliasing rules
      • Using ANSI aliasing rules
      • Using variables
      • Passing function arguments
      • Coding expressions
      • Coding conversions
      • Arithmetical considerations
      • Using loops and control constructs
      • Choosing a data type
      • Using built-in library functions and macros
      • Using library extensions
      • Using #pragmas
      • Using rvalue references (C++11)
      • Using shared-memory parallelism (SMP)
    • Using built-in functions to improve performance
      • Platform-specific functions
    • I/O Performance considerations
      • Accessing MVS data sets
      • Accessing UNIX file system files
      • Using memory files
      • Using the C++ I/O stream libraries
    • Improving performance with compiler options
      • Using the OPTIMIZE option
      • Optimizations performed by the compiler
        • Aggressive optimizations with OPTIMIZE(3)
      • Additional options that affect performance
        • ANSIALIAS
        • ARCHITECTURE and TUNE
        • ASSERT(RESTRICT)
        • COMPRESS
        • COMPACT
        • CVFT (C++ only)
        • EXH (C++ only)
        • EXPORTALL
        • HGPR
        • HOT
        • IGNERRNO
        • IPA
        • LIBANSI
        • OBJECTMODEL (C++ only)
        • PREFETCH
        • RESTRICT
        • ROCONST
        • ROSTRING
        • RTTI
        • SPILL
        • STRICT
        • STRICT_INDUCTION
        • THREADED
        • UNROLL
      • Inlining
        • Selectively marking code to inline
        • Automatically choosing functions to inline
        • Modifying automatic inlining choices
        • Overriding inlining defaults
        • Inlining under IPA
      • Using the XPLINK option
        • When you should not use XPLINK
      • Using the IPA option
        • Types of procedural analysis
        • Program-directed feedback
        • Compiler processing flow
    • Using high performance libraries
      • Using the Mathematical Acceleration Subsystem (MASS) libraries
        • Using the MASS scalar library
        • Using the MASS vector library
        • Using the MASS SIMD library
        • Compiling and linking a program with MASS
      • Using the Automatically Tuned Linear Algebra Software (ATLAS) libraries
        • Description and functionality provided
        • Supplied ATLAS libraries and their corresponding header files
        • Required compiler options
        • Examples - Compiling, linking, and running a simple matrix multiplication ATLAS program
        • Examples - Compiling, linking, and running a complex ATLAS sample
        • Related external information
    • Parallelizing your programs
      • Using OpenMP directives
      • Shared and private variables in a parallel environment
      • OpenMP runtime functions for parallel processing
    • Optimizing the system and Language Environment
      • Improving the performance of the Language Environment
        • Storing libraries and modules in system memory
        • Optimizing memory and storage
        • Optimizing runtime options
      • Tuning the system for efficient execution
        • Link pack areas
        • Library lookasides
        • Virtual lookasides
    • Balancing compilation time and application performance
      • General tips
      • Programmer tips
      • System programmer tips
    • Stepping through optimized code using the dbx debugger utility
      • Steps for setting up a stopping point for dbx in optimized code
      • Steps for setting up a stopping point for dbx in optimized code
  • z/OS XL C/C++ Environments
    • Using the system programming C facilities
      • Using functions in the system programming C environment
      • System programming C facility considerations and restrictions
      • Creating freestanding applications
        • Creating modules without CEESTART
        • Including an alternative initialization routine under z/OS
        • Initializing a freestanding application without Language Environment.
        • Initializing a freestanding application using C functions
        • Setting up a C environment with preallocated stack and heap
        • Determining ISA requirements
        • Building freestanding applications to run under z/OS
        • Parts used for freestanding applications
      • Creating system exit routines
        • Building system exit routines under z/OS
        • An example of a system exit
      • Creating and using persistent C environments
        • Building applications that use persistent C environments
        • An example of persistent C environments
      • Developing services in the service routine environment
        • Using application service routine control flow
        • Understanding the stub perspective
        • Establishing a server environment
        • Initiating a server request
        • Accepting a request for service
        • Returning control from service
        • Constructing user-server stub routines
        • Building user-server environments
      • Tailoring the system programming C environment
        • Generating abends
        • Getting storage
        • Getting page-aligned storage
        • Freeing storage
        • Loading a module
        • Deleting a module
      • Including a runtime message file
      • Additional library routines
      • Summary of application types
    • Library functions for system programming C
      • __xhotc() — Set Up a Persistent C Environment (No Library)
      • __xhotl() — Set Up a Persistent C Environment (With Library)
      • __xhott() — Terminate a Persistent C Environment
      • __xhotu()
      • __xregs() — Get Registers on Entry
      • __xsacc() — Accept Request for Service
      • __xsrvc() — Return Control from Service
      • __xusr() - __xusr2() — Get Address of User Word
      • __24malc() — Allocate Storage below 16MB Line
      • __4kmalc() — Allocate Page-Aligned Storage
    • Using runtime user exits
      • Using runtime user exits in z/OS Language Environment
        • Understanding the basics
        • PL/I and C/370 compatibility
        • User exits supported under z/OS Language Environment
        • Order of processing of user exits
        • Using installation-wide or application-specific user exits
        • Using the Assembler user exit
        • Using sample Assembler user exits
        • Assembler user exit interface
        • Parameter values in the Assembler user exit
        • PL/I and C/370 compatibility
        • High level language user exit interface
    • Using the z/OS XL C MultiTasking Facility
      • Organizing a program with MTF
        • Ensuring computational independence
        • Running a C program without MTF
        • Running a C program with MTF
        • Running a C program with one parallel function
        • Running a C program with two different parallel functions
        • z/OS XL C with multiple instances of the same parallel function
      • Designing and coding applications for MTF
        • Step 1: Identifying computationally-independent code
        • Step 2: Creating parallel functions
        • Step 3: Inserting calls to parallel functions
        • Changing an application to use MTF
      • Compiling and linking programs that use MTF
        • Creating the main task program load module
        • Creating the parallel functions load module
        • Specifying the linkage-editor option
        • Modifying runtime options
      • Running programs that use MTF
        • STEPLIB DD statement
        • DD statements for standard streams
        • Example of JCL
        • Debugging programs that use MTF
        • Avoiding undesirable results when using MTF
  • Programming with Other Products
    • Using the CICS Transaction Server (CICS TS)
      • Developing XL C/C++ programs for the CICS environment
      • Preparing CICS for use with z/OS Language Environment
      • Designing and coding for CICS
        • Using the CICS command-level interface
        • Using input and output
        • Using z/OS XL C/C++ library support
        • Storage management
        • Using ILC support
        • Exception handling
        • Example of error handling in CICS
        • ABEND codes and error messages under z/OS XL C/C++
        • Coding hints and tips
      • Translating and compiling for reentrancy
        • Options for translating CICS statements
        • Compiling XL C/C++ programs that were preprocessed by the standalone CICS translator
      • Prelinking and linking all object modules
      • Defining and running the CICS program
        • Program processing
        • Link considerations for C programs
        • CSD considerations
        • Sample JCL to install z/OS XL C/C++ application programs
    • Using Cross System Product (CSP)
      • Common data types
      • Passing control
      • Running CSP under MVS
        • Calling CSP applications from z/OS XL C
        • Calling z/OS XL C from CSP
      • Running under CICS control
        • Example programs
    • Using Data Window Services (DWS)
    • Using DB2 Universal Database
      • Preparing an XL C/C++ application to request DB2 services
        • Using the XL C/C++ DB2 coprocessor
        • Using the DB2 C/C++ precompiler
      • Using DB2 services and stored procedures with XPLINK
      • Examples of how to use XL C/C++ programs to request DB2 services
    • Using Graphical Data Display Manager (GDDM)
      • Examples
    • Using the Information Management System (IMS)
      • Handling errors
      • Other considerations
        • Examples
    • Using the Query Management Facility (QMF)
      • Example programs
  • Internationalization: Locales and Character Sets
    • Introduction to locale
      • Internationalization in programming languages
      • Elements of internationalization
      • z/OS XL C/C++ Support for internationalization
      • Locales and localization
        • Locale-sensitive interfaces
    • Building a locale
      • Limitations of enhanced ASCII
      • Using the charmap file
        • The CHARMAP section
        • The CHARSETID section
      • Locale source files
        • LC_CTYPE category
        • LC_COLLATE category
        • LC_MONETARY category
        • LC_NUMERIC category
        • LC_TIME category
        • LC_MESSAGES category
        • LC_TOD category
        • LC_SYNTAX category
      • Method files
      • Using the localedef utility
        • Locale naming conventions
    • Customizing a locale
      • Using the customized locale
      • Referring explicitly to a customized locale
      • Referring implicitly to a customized locale
        • Customizing your installation
    • Customizing a time zone
      • Using the TZ or _TZ environment variable to specify time zone
      • Relationship between TZ or _TZ and LC_TOD
    • Definition of S370 C, SAA C, and POSIX C locales
      • Differences between SAA C and POSIX C locales
    • Code set conversion utilities
      • The genxlt utility
      • The iconv utility
      • Code conversion functions
        • _ICONV_MODE environmental variable
        • _ICONV_TECHNIQUE environmental variable
      • Code set converters supplied
      • Universal coded character set converters
        • Codeset conversion using UCS-2
        • UCMAP source format
    • Coded character set considerations with locale functions
      • Variant character detail
      • Alternate code points
      • Coding without locale support by using a hybrid coded character set
        • Writing code using a hybrid coded character set
        • Converting hybrid code
      • Coded character set independence in developing applications
        • Coded character set in source code and header files
        • Converting coded character sets at compile time
      • Writing source code in coded character set IBM-1047
      • Exporting source code to other sites
      • Converting existing work
      • Considerations with other products and tools
    • Bidirectional language support
      • Bidirectional languages
        • Overview of the layout functions
        • Using the layout functions
  • POSIX character set
  • Mapping variant characters for z/OS XL C/C++
    • Specifying the appropriate code page for the compiler
    • Testing the display of variant characters
    • Inserting and viewing square brackets during an ISPF edit session
  • z/OS XL C/C++ code point mappings
  • Locales supplied with z/OS XL C/C++
    • Compiled locales
    • Locale source files
  • Charmap files supplied with z/OS XL C/C++
  • Examples of charmap and locale definition source
    • Charmap file
    • Locale definition source file
    • Locale method source file
  • Converting hybrid code to a specific character set
    • Sample program
  • Additional Examples
    • Memory Management
    • Calling MVS WTO routines from C
    • Listing Partitioned Data Set Members
  • Application considerations for z/OS UNIX XL C/C++
    • Relationship to DB2 universal database
    • Application programming environments not supported
    • Support for the Curses library
  • External variables
    • errno
    • daylight
    • getdate_err
    • h_errno
    • __loc1
    • loc1
    • loc2
    • locs
    • optarg
    • opterr
    • optind
    • optopt
    • signgam
    • stdin
    • stderr
    • stdout
    • t_errno
    • timezone
    • tzname
  • Packaging considerations
    • Compiler options
    • Libraries
    • Prelinking
    • Linking