When linking with BINDER it is possible to link not the entire C, C++ or
COBOL runtime system and the internal routines but instead simply linkage modules which resolve all open external references to the preloadable components of the CRTE. Unless they are preloaded, the required modules themselves are then not dynamically loaded until runtime.
There are two variants of the partial bind linkage method:
Standard partial bind
Complete partial bind
In view of the considerable savings in disk space, it is advisable always to use the partial bind linkage technique when linking the following programs:
C programs
COBOL programs
Programs in other languages which contain components written in C or COBOL or which use common internal routines.
In all cases, CRTE must be installed in the executing system.
- The corresponding CRTE must be available when the program is called.
- If you use shared libraries under POSIX then successful linkage is only guaranteed if you use complete partial bind.
Standard partial bind
When linking with standard partial bind, you should use the library
SYSLNK.CRTE.PARTIAL-BIND instead of SYSLNK.CRTE (see section “Libraries for thepartial bind linkage method on /390 systems”).
In the event of a standard partial bind, the linkage modules loaded from
SYSLNK.CRTE.PARTIAL-BIND resolve all open unresolved references of the object module that is to be linked. Other external references are ignored.
Depending on the mode (C-Front or ANSI), further libraries are required when linking C++ programs (see the sections “Cfront-C++-library functions and runtime system” and “ANSI-C++ libraries and runtime systems”).
Complete partial bind
When linking using complete partial bind, you should use the library
SYSLNK.CRTE.COMPL instead of SYSLNK.CRTE (see section “Libraries for the partialbind linkage method on /390 systems”).
In the event of a complete partial bind, the loaded linkage modules in
SYSLNK.CRTE.COMPL receive all the entries and external data of the full C or COBOL runtime system. This means that the unresolved external references that may occur in the case of a standard partial bind are excluded when you perform a complete partial bind.
Complete partial bind with C, COBOL and mixed C/COBOL programs
The C and COBOL runtime systems are linked either in their entirety or not at all. This means that:
If your user program requires at least one C entry then all external references to the entire C runtime system are resolved in the event of a complete partial bind.
If your COBOL program requires at least one COBOL entry then all external references to the entire COBOL runtime system are resolved in the event of a complete partial bind.
In the case of pure C programs, no COBOL entries are linked.
As all entries and all external variables are linked in, they can collide with the entries or external variables of the same name in the application program (duplicate entries). Redefinition of runtime system functions by functions of the same name in the application program is no longer possible, either. Names reserved by the runtime system can be displayed using the following LMS statement:
//SHOW-ELEMENT (SYSLNK.CRTE.COMPL,*,L),LLM-INF=PAR(INF=ESVD) .
Complete partial bind for C++ programs
When binding C++ programs (ANSI), the library SYSLNK.CRTE.CPP-COMPL is also required.
Special characteristics of complete partial bind
You should remember the following points when linking with SYSLNK.CRTE.COMPL:
The function _edt is not supported.
The POSIX and TIME link switches are not present. They are automatically included when you use the cc command under POSIX.
No upwards compatibility is guaranteed for the extension of the C/C++ systems by new functions in the COMPL libraries. If the application is linked using complete partial bind then each new entry may theoretically generate a conflict with an entry of the same name that is already present in the application.
Employed subsystems
The following subsystems are used for both partial bind variants:
CRTEPART (for C)
COBPART (for COBOL)
CRTESIS (for common routines)