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

Using Binder
Binder Manual528613-004
2-11
Binding C Programs
the include code block list is a separate program unit. All FORTRAN code blocks that
are bound together form one program unit. Based on these concepts, Binder
constructs all the control blocks needed to execute the program. These control blocks
include:
One run-unit control block (RUCB) for the target file.
One program unit control block (PUCB) for each COBOL85 program unit in the
target file; the PUCB includes the file control blocks.
One program unit control block for the FORTRAN program unit in the object file
(the FORTRAN special data block, #PUCB, is always the last PUCB data block in
any object file).
One file control block for each file (logical unit) in the set of files for the FORTRAN
program unit in the object file; these control blocks are contained in the PUCB
blocks.
One FORTRAN logical unit table.
Binding C Programs
The C compiler generates one bindable code file for each source language compilation
unit. C code files are executable only when you specify a RUNNABLE pragma to
instruct the compiler to build an executable object file. Generally, you use the
RUNNABLE pragma in C to build an executable object file automatically. For large
programs created from multiple modules, it is often easier to invoke BIND as a
separate step.
To produce an executable C object file without using the RUNNABLE pragma, you
must invoke Binder and use it to do the following:
1. Bind together your separately compiled modules.
2. Bind in the appropriate version of the C memory-model file.
3. Bind in the appropriate version of the C run-time library file for C-series programs
only.
4. Specify a heap size before issuing the BUILD command. You can specify the heap
size in PAGES (1024 words), WORDS, or BYTES.
On C-series systems the C run-time library resides in a file, CLIB, that must be bound
into each object file that contains C functions. On D-series systems the C run-time
library is split between two files, CLIB and CRELIB. Because CLIB and CRELIB are
configured into the system library, do not bind them into object files. The D20 and D30
C run-time libraries have significant architectural differences. Because of these
differences, D20 programs that bound in CLIB without also binding in CRELIB will not
run correctly on D30 or later product versions. You must bind such programs again
without CLIB or CRELIB. CLIB no longer comes as a separate file. Check your BIND
scripts to ensure that you do not bind in CLIB or CRELIB. Delete any old copies of
CLIB from $SYSTEM.SYSTEM.