Binder Manual (G06.27+, H06.04+, J06.03+)

Using Binder
Binder Manual528613-004
2-14
Parameter Checking for a Mixed-Language Bind
If your program contains a COBOL85 module, that module must be the main
module.
Parameter Checking for a Mixed-Language Bind
When binding modules from more than one language, you can check for parameter
mismatches with the CHECK PARAMETER option of the SELECT command. By
default, this option is set to STRICT. When this option is set to STRICT, Binder checks
each parameter for proper size, type, and mode (passed by value or reference); it also
checks the return type of functions. Binder issues an error message if calls and entry
points do not match.
For mixed-language programs, specify SELECT CHECK PARAMETER STRONG to
avoid extraneous Binder messages. Refer to the SELECT Command on page 3-49 for
more information.
Binding SQL Program Files
When binding SQL program files, you can bind them before running them through
either the NonStop SQL/MP compiler or the Accelerator and NonStop SQL/MP
compiler. You do so just as you would for any standard language file. For example:
The difficulty with SQL program files occurs when you attempt to replace SQL
procedures in a bound program with new SQL procedures. Each code block in a
procedure references corresponding data blocks and run-time data units (RTDUs).
Depending on the choice and order of Binder commands, the newly bound file may or
may not have the new RTDUs and data blocks.
To ensure that the final program contains the new code blocks, data blocks, and
RTDUs for the SQL procedures, use one of the following three methods:
1. Rebuild the entire file using a series of ADD * FROM commands or a single ADD *
FROM MAIN command followed by a series of SELECT SEARCH commands for
each additional module.
2. Add the new SQL procedures first followed by everything from the old file. For
example:
In this example Binder adds the code blocks, data blocks, and RTDUs to the
include list from SQLFILE. When Binder encounters the old SQL entry points in
OLDFILE, it issues a warning that the entry points are already on the include list
@BIND
@ADD * FROM sqlfile
@ADD * FROM mainfile
@BUILD newfile!
@ADD * FROM sqlfile
@ADD CODE * FROM oldfile
@BUILD newfile!