Binder Manual (G06.24+, H06.03+)
Using Binder
Binder Manual—528613-003
2-16
Resolving External References
To decrease the time required to SQL compile a program, Binder estimates the size of
the SQL object run-time data unit (RTDU) by adding slack space to the object file
during the host-language compilation. If the SQL-compiled object fits in the pre-
allocated slack space, then Binder can quickly update the RTDU region with the
compiled SQL code. Binder estimates the size of the SQL object RTDU region by
multiplying by four the size of the SQL source RTDU region. To determine the amount
of slack space Binder adds to the object file during host compilation, enter the following
Binder commands to list all blocks:
Next add the size of all blocks of type SQL_SRC, and multiply the value by four.
Resolving External References
Procedures in source code programs often contain references to other procedures
known as external references.
A major part of building an executable object file is resolving external references.
Binder resolves external references by locating entry points in other object files, if they
exist, and including a copy of any compiled code and data required by the reference in
the target file.
References to procedures in other programs, references to procedures in the same
source file, and references to a library of procedures shared by many users are all
considered external references. If a reference is made to a procedure entry point in the
same source file, or to a library of procedures shared by many users, the referenced
entry point name is considered external to the procedure. For information about user
libraries, see Section 6, User Libraries
If Binder cannot find the entry point to an external reference, the reference is not
satisfied. In the example shown in Figure 2-1, Program B can still be in the planning
stages when Program A is compiled. In this case, Binder would not be able to resolve
the reference to Procedure Z, and it would leave the entry point reference for later
resolution. Resolution can occur later in another binding operation or at program load
time.
@ADD * FROM object-file
@INFO INCLUDE *