Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

BIND

&pagelevel(5)&pagelevel

Alias:         LINK

This statement starts a linkage run and, in the case of C++ V3, C++2017 and C++ 2020 objects, also activates the prelinker for automatic template instantiation. The input sources and other conditions for the linkage and prelinker runs are defined in the preceding MODIFY-BIND-PROPERTIES statements.

BIND

ACTION= list-poss: *PRELINK / *MODULE-GENERATION

,OUTPUT= *NONE / *LIBRARY-ELEMENT(...)


*LIBRARY-ELEMENT(...)



|

LIBRARY= <filename 1..54> / *LINK(...)



|


*LINK(...)



|



|

LINK-NAME= <filename 1..8>



|

,ELEMENT= <composed-name 1..64 with-under>(...)



|


<composed-name 1..64 with-under>(...)



|



|

VERSION= *UPPER-LIMIT / *INCREMENT / <composed-name 1..24 with-under>

,OUTPUT-FORMAT= *UNCHANGED / *LLM(...)


*LLM(...)



|

EXTERNAL-NAMES= *UNCHANGED / *STD / *SHORT

,ADD-OPTION= *UNCHANGED / *NONE / <c-string 1..1800 with-low>

ACTION = list-poss: *PRELINK / *MODULE-GENERATION
The *PRELINK specification is only relevant in the modes C++ V3, C++ 2017 and C++ 2020 and affects the automatic template instantiation by the prelinker.

If the ACTION option is not specified, the following default applies:

ACTION = (*PRELINK,*MODULE-GENERATION)

This causes both a prelinker and a linkage run to be performed in the modes C++ V3, C++ 2017 and C++ 2020. The result comprises individual modules in which all templates are instantiated and a linked module. Note that the *PRELINK specification is ignored in the C modes and in the Cfront C++ mode, so only a linkage run is performed in these modes.

If ACTION=*PRELINK is specified, only a prelinker run is performed. The result consists of individual modules in which all templates are instantiated. Specifications in the OUTPUT and OUTPUT-FORMAT options, if any, are ignored.

If ACTION=*MODULE-GENERATION is specified, only a linkage run is performed.

OUTPUT = *NONE / *LIBRARY-ELEMENT(...)
This option specifies the PLAM library (LIBRARY=) and the element name (ELEMENT=) under which the linked module is to be stored. These values are passed to BINDER (as a MODULE-CONTAINER operand) in a SAVE-LLM statement. If no further specifications are made with the ADD-OPTION option, the remaining operands of the SAVE-LLM statement are set to the corresponding defaults for BINDER.
The *NONE option is the default. But because this does not create a link object, this option can only sensibly be used with (see above, ACTION = ).

LIBRARY =<filename 1..54>
The module is written to a PLAM library with the specified name.

LIBRARY = *LINK(...)

LINK-NAME = <filename 1..8>

<filename> can be used (instead of a cataloged library name) to specify a valid link name for the library. The link name must already have been assigned to the PLAM library with the ADD-FILE-LINK command before the compiler is called.

ELEMENT = <composed-name 1..64 with-under>(...)
The module is written to the element with the assigned name under the PLAM library specified with LIBRARY=.

VERSION = *UPPER-LIMIT
The highest possible version is used by the compiler.

VERSION = *INCREMENT
The element is assigned a version number that is obtained by incrementing the highest existing version number by 1, assuming that the highest existing version ID ends with a digit that can be incremented. If the version ID cannot be incremented, the compiler run is aborted with an error message.
See the COMPILE statement for an example.

VERSION = <composed-name 1..24 with-under>
The element is assigned the specified version.

OUTPUT-FORMAT = *LLM(EXTERNAL-NAMES = *UNCHANGED / *STD / *SHORT)

This option controls how symbol names in EEN (Extended External Name) format are handled by BINDER. In BINDER this is handled by the FOR-BS2000-VERSION operand of the SAVE-LLM statement. Depending on the value of this option an appropriate operand value will be given to BINDER.

EENs, i.e. external C++ symbols with untruncated names, are generally contained in modules that were generated with the compiler in the mode C++ V3, C++ 2017 or C++ 2020.
Untruncated external C symbols are generated only if the following option is specified at compilation: MODIFY-MODULE-PROPERTIES C-NAMES=*UNLIMITED (see MODIFY-MODULE-PROPERTIES).
In this case, even longer external C symbols are not truncated by the compiler to 32 characters. Modules with EENs are stored by the compiler in LLM Format 4. The modules of the C++ libraries and of the CRTE runtime systems used in the modes C++ V3, C++ 2017 or C++ 2020 are also provided in LLM Format 4.

If the modules generated by the compiler do not include any EENs, i.e. are in LLM Format 1, this option has no effect, since the BINDER generates an input format corresponding to LLM Format 1.

EXTERNAL-NAMES = *UNCHANGED
The specification in the last BIND statement applies.

EXTERNAL-NAMES = *STD
By default, BINDER generates LLM Format 4. The EENs remain in the result module without being truncated. LLMs in Format 4 can be partially linked, i.e. first linked with unresolved external references to EENs and then processed further as desired by means of BINDER or DBL.

EXTERNAL-NAMES = *SHORT
This entry is needed if BINDER is to generate LLM Format 1.

Summary of generated LLM formats

Input format

SDF option EXTERNAL-NAMES =

Output format

LLM 1

No entry / *STD / *SHORT

LLM 1

LLM 4 (EEN)

No entry / *STD

LLM 4

*SHORT

LLM 1

ADD-OPTION = *UNCHANGED / *NONE / <c-string 1..1800 with-low>

<c-string> can be used to specify further operands of the BINDER statement SAVE-LLM in addition to the MODULE-CONTAINER operand (see OUTPUT option) and the FOR-BS2000-VERSION operand (see OUTPUT-FORMAT option). If more than one operand is specified, they must be separated by commas as follows:
operand1,operand2,...
The operands are directly passed through to BINDER without SDF analysis.
The following operands of the BINDER statement SAVE-LLM are obtained from the MODIFY-BIND-PROPERTIES statement and must therefore not be specified with ADD-OPTION: TEST-SUPPORT (to save LSD information) and MAP (to generate a map listing).

Automatic template instantiation

The operands specified with ADD-OPTION are currently not considered during the automatic template instantiation by the prelinker, but only during subsequent linkage with BINDER. The operands should not affect the type, number or order of the modules to be linked, since different preconditions during the prelinker and linkage runs could result in duplicates or unresolved external references.

Example

//BIND OUTPUT=*LIB(LIB=PLAM.BSP,ELEM=HELLO),ADD-OPT=’OVERWRITE=*NO,

NAME-COLLISION=*WARNING’