z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
Previous topic |
Next topic
|
Contents
|
Contact z/OS
|
Library
|
PDF
Contents (exploded view)
z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
SA38-0689-00
Abstract for Language Environment Programming Guide for 64-bit Virtual Addressing Mode
Creating AMODE 64 applications with Language Environment
Introduction to Language Environment for AMODE 64 applications
Components of Language Environment for AMODE 64 applications
Common runtime environment of Language Environment for AMODE 64 applications
Preparing to bind and run under Language Environment
Understanding the basics
Planning to bind and run
Binding AMODE 64 applications
Downward compatibility considerations
Checking which runtime options are in effect
Building and using AMODE 64 dynamic link libraries (DLLs)
Support for DLLs
DLL concepts and terms
Loading a DLL
Loading a DLL implicitly
Loading a DLL explicitly
Explicit use of a DLL in a C application
Explicit use of a DLL in a application using the dlopen() family of functions
Managing DLLs when running DLL applications
Loading DLLs
Sharing DLLs
Freeing DLLs
Creating a DLL or a DLL application
Building a DLL
Writing your C DLL code
Writing your C++ DLL code
Writing your Language Environment-conforming AMODE 64 assembler DLL code
Compiling the DLL code
Binding the DLL code
Binding C
Binding C++
Binding assembler
Building a DLL application
Creating and using DLLs
DLL restrictions
Improving performance
Binding, loading, and running under batch
Basic binding and running under batch
Specifying runtime options in the EXEC statement
Specifying runtime options with the CEEOPTS DD card
Providing bind input
Writing JCL for the bind process
Binder control statements
Using the INCLUDE statement
Using the LIBRARY statement
Bind options
Running an AMODE 64 application under batch
Program library definition and search order
Specifying runtime options under batch
Binding and executing AMODE 64 programs using z/OS UNIX
Basic binding and running C/C++ applications under z/OS UNIX
Invoking a shell from TSO/E
Using the c89 utility to bind and create AMODE 64 executable files
Running z/OS UNIX AMODE 64 application programs using z/OS XL C/C++ functions
z/OS UNIX application program environments
Placing an MVS application executable program in the file system
Running an MVS executable program from a z/OS UNIX shell
Running POSIX-enabled programs using a z/OS UNIX shell
Issuing the executable from a shell
Issuing a setup shell script from a shell
Running POSIX-enabled programs outside the z/OS UNIX shells
Running an MVS batch z/OS UNIX application file that is HFS-resident
Invoking BPXBATCH from TSO/E
Invoking BPXBATCH Using JCL
Invoking the spawn syscall in a REXX EXEC from TSO/E
Running a z/OS UNIX application program that is not HFS-resident
Using runtime options
Understanding the basics
Methods available for specifying runtime options
Order of precedence
Specifying suboptions in runtime options
Specifying runtime options and program arguments
CEEOPTS DD syntax
Creating application runtime option defaults with CEEXOPT
CEEXOPT invocation for CELQUOPT
CEEXOPT coding guidelines for CELQUOPT
Performance considerations
C and C++ compatibility considerations
Preparing an application to run with Language Environment
Using Language Environment parameter list formats
Understanding the basics
Argument lists and parameter lists
Passing arguments between routines
Making your application reentrant
Understanding the basics
Making your C/C++ program reentrant
Natural reentrancy
Constructed reentrancy
Generating a reentrant program executable for C or C++
Installing a reentrant load module
Language Environment concepts, services, and models
Initialization and termination under Language Environment
Understanding the basics
Language Environment initialization
Language Environment termination
What causes termination
What happens during termination
Thread termination
Enclave termination
Process termination
Managing return codes in Language Environment
How the Language Environment enclave return code is calculated
Setting and altering user return codes
For C and C++
How the enclave reason code is calculated
Termination behavior for unhandled conditions
Determining the abend code
Program interrupt abend and reason codes
Program model
Understanding the basics
Language Environment program model terminology
Language Environment terms and their HLL equivalents
Terminology for data
Process
Enclave
Additional enclave characteristics
Thread
The full Language Environment program model
Mapping the POSIX program model to the Language Environment program model
Key POSIX program entities and Language Environment counterparts
Scope of POSIX semantics
Stack and heap storage
Understanding the basics
Runtime options and services
Stack storage overview
Tuning stack storage
Heap storage overview
Using heap pools to improve performance
Applications that should use heap pools
Heap pools modes of operation
Tuning heap storage
User-created heap storage
Alternative vendor heap manager
Using _CEE_HEAP_MANAGER to invoke the alternative Vendor Heap Manager
Language Environment condition handling introduction
Understanding the basics
Runtime options
The stack frame model
Resume cursor
What is a condition in Language Environment?
Steps in condition handling
Enablement step
TRAP effects on the condition handling process
Condition step
Termination step and the TERMTHDACT runtime option
Invoking exception handlers
Responses to conditions
Condition handling scenarios
Scenario 1: Simple condition handling
Scenario 2: Exception handler present for divide-by-zero
Language Environment and HLL condition handling interactions
Understanding the basics
C condition handling semantics
Comparison of C-Language Environment terminology
Controlling condition handling in C
Using the signal() function
Using the raise() function
C atexit() considerations
C condition handling actions
C condition handling examples
C signal representation of S/370 exceptions
C++ condition handling semantics
Language Environment and POSIX signal handling interactions
Synchronous POSIX signal and Language Environment condition handling interactions
Enablement step for signals under z/OS UNIX
Condition step for POSIX signals under Language Environment
Termination step under z/OS UNIX
POSIX signals that do not enter condition handling
Using condition tokens
Understanding the basics
Related services
The effect of coding the fc parameter
Testing a condition token for success
Testing condition tokens for equivalence
Testing condition tokens for equality
Effects of omitting the fc parameter
Understanding the structure of the condition token
Using symbolic feedback codes
Locating symbolic feedback codes for conditions
Including symbolic feedback code files
Condition tokens for C signals under C and C++
q_data structure for abends
q_data structure for arithmetic program interruptions
q_data structure for square-root exception
Using and handling messages
Understanding the basics
Runtime options
APIs
Utilities
Creating messages
Creating a message source file
Using the CEEBLDTX utility
z/OS UNIX interface
TSO/E interface
Files created by CEEBLDTX
CEEBLDTX error messages
Creating a message module table
Assigning values to message inserts
Interpreting runtime messages
Specifying the national language
Runtime messages with POSIX
Handling message output
Using C or C++ I/O functions
Using multiple message handling APIs
Using date and time services
National language support
Understanding the basics
Runtime options
C/C++ APIs
Setting the national language
Setting the locale
Locale callable services
General callable services
Understanding the basics
Related services
XL C/C++ APIs
__cdump()
Specifying a target directory for CEEDUMPs
__le_ceegtjs()
__librel()
Math services
Specialized Programming Tasks
Assembler considerations
Understanding the basics
Compatibility considerations
Save areas
Register conventions
Language Environment-conforming assembler
Considerations for coding or running assembler routines
GOFF option
Asynchronous interrupts
Condition handling
Access to the inbound parameter string
CELQSTRT, CELQMAIN, CELQFMAN
Mode considerations
Language Environment Library routine retention (LRR)
Assembler macros
CELQPRLG macro — Generate a Language Environment-conforming amode 64 prolog
CELQEPLG macro — Terminate a Language Environment-conforming AMODE 64 routine
CEERCB macro — Generate an RCB mapping
CEEPCB macro — Generate a PCB mapping
CEEEDB macro — Generate an EDB mapping
CEELAA macro — Generate an LAA mapping
CEELCA macro — Generate an LCA mapping
CEECAA macro — Generate a CAA mapping
CEEDSA macro — Generate a DSA mapping
CEEDIA macro — Generate a DIA mapping
CELQCALL macro — Call a Language Environment-conforming AMODE 64 routine
CEEPDDA macro — Define a data item in the writeable static area (WSA)
CEEPLDA macro — Returns the address of a data item defined by CEEPDDA
Using preinitialization services with AMODE 64
Understanding the basics
Using preinitialization services
Macros that generate the PreInit table
CELQPIT
CELQPITY
CELQPITS
Invoking CELQPIPI
AMODE considerations
General register usage at entry to CELQPIPI
General register usage at exit from CELQPIPI
CELQPIPI interface
Initialization
CELQPIPI(init_main) — initialize for main routines
Return codes
Usage notes
Restriction
CELQPIPI(init_sub) — initialize for subroutines
Return codes
Usage notes
Restriction
Application invocation
CELQPIPI(call_main) — invocation for main routine
Return codes
CELQPIPI(call_sub) — invocation for subroutines
Return codes
CELQPIPI(call_sub_addr) — invocation for subroutines by address
Return codes
Invocation of a sequence of applications
CELQPIPI(start_seq) — start a sequence of calls
Return codes
Usage notes
CELQPIPI(end_seq) — end a sequence of calls
Return codes
PreInit termination
CELQPIPI(term) — terminate environment
Return codes
Usage notes
CELQPIPI(add_entry) — add an entry to the PreInit table
Return codes
CELQPIPI(delete_entry) — delete an entry from the PreInit table
Return codes
Usage notes
CELQPIPI(identify_entry) — identify an entry in the PreInit table
Return codes
Usage notes
CELQPIPI(identify_attributes) — identify the program attributes in the PreInit table
Return codes
Service routines
An example program invocation of CELQPIPI
Copyright IBM Corporation 1990, 2014