SQL Supplement for H-Series RVUs

SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs529446-005
1-34
Binding and Linking
@BUILD progfile
@EXIT
For more information about the Binder program, see the Binder Manual. For more
information about binding HP COBOL programs, see the COBOL Manual for TNS and
TNS/R Programs.
The nld or ld Utility
The process of linking by the nld or ld utility applies only to native TNS/R objects
created by the NMCOBOL compiler (or by the nmcobol utility in the OSS
environment).
If you specify the RUNNABLE directive when compiling a source program in the
Guardian environment, the NMCOBOL compiler uses the COBOLFE process and a
linker to validate and resolve internal and external references and produce an
executable object file. If you do not specify the RUNNABLE directive when compiling
the source program, you must invoke a linker after compilation to link the object files.
Use either the nld or ld utility to link TNS/R object files:
If you compiled the source program with the NON-SHARED directive (the default),
use the nld utility to produce a non-PIC loadfile or linkfile.
To run the nld utility in the Guardian environment, enter nld at the TACL prompt.
In this example, the nld utility links the object files to create a non-PIC loadfile,
myprog:
nld sqlobj obja objb -o myprog
For more information about the nld utility, see the nld Manual.
If you compiled the source program with the CALL-SHARED directive, use the ld
utility to produce a PIC loadfile or linkfile.
To run the ld utility in the Guardian environment, enter ld at the TACL prompt. In
this example, the ld utility links the object files to create a PIC loadfile, myprog:
ld sqlobj obja objb -o myprog
For more information about the ld utility, see the ld Manual.
For more information about linking HP COBOL programs, see the COBOL Manual for
TNS and TNS/R Programs.
Caution. The Binder STRIP command without the SYMBOLS or AXCEL option removes the
Binder table from an object file. Without the Binder table, the SQL compiler cannot compile the
program file, and the SQL executor cannot execute it.
Caution. The -strip option of the linker removes symbols information from an object file.
Without the symbols information, the SQL compiler cannot compile the program file, and the
SQL executor cannot execute it.