Binder Manual (G06.24+, H06.03+)
BIND Commands
Binder Manual—528613-003
3-42
REPLACE Command
both the direct and the indirect data blocks in a TAL object file. In this case,
however, you can successfully use the ADD command with the DELETE option.
•
If you want to replace one copy of a Pascal procedure with another of the same
name, you must export the procedure in each module containing it. Otherwise,
Binder leaves the old copy of the procedure in the file.
•
The REPLACE CODE command replaces the specified code blocks and puts any
references to data blocks and entry points on the unresolved list. The REPLACE *
command replaces all code blocks, data blocks, and entry points.
Before replacing any language or SQL code blocks with the REPLACE CODE
command, you need to understand completely the interdependencies between an
object file and Binder. The choice and order of commands affects whether Binder
resolves references to the data blocks and entry points from the file containing the
new code blocks or from the file containing the old code blocks.
For more information on how Binder resolves unresolved references, see
Unresolved Reference Lists on page 5-6.
Examples
The following examples illustrate the syntax of the REPLACE command.
•
In the following example, the REPLACE command replaces the code designated
by the entry name BLOCK-1 in OLDFILE with code by the same entry name in
OBJFILE. Note that you must enter an ADD command at some point in your
session before you enter a REPLACE command. Otherwise, the include lists do
not contain any blocks that can be replaced by the blocks specified in the
REPLACE command.
@ADD * FROM oldfile
@REPLACE CODE block-1 FROM objfile
•
Assume that the object file OBJFILE was compiled with a SEARCH directive for
library LIBFILE. Later library LIBFILE was recompiled, and so OBJFILE must be
rebuilt. In the following example OBJFILE is rebuilt by replacing the old contents of
LIBFILE with the new contents of LIBFILE, and the rebuilt file is given the name
NEWOFILE.
@ADD * FROM objfile
@REPLACE * FROM libfile
@BUILD newofile
•
Code or data specified in the REPLACE command but not on include lists is
ignored and no warning message is issued. For example, you entered the following
commands:
@ADD * from x
@REPLACE * from y