nld and noft Manual
nld Utility
nld and noft Manual—520384-003
2-13
pTAL Programs
pTAL Programs
Because pTAL does not support embedded NonStop SQL/MP or a language-specific
run-time library, there are no special requirements for linking pTAL programs.
Mixed-Language Programs
You can create mixed-language programs containing native C modules, native C++
modules, native COBOL modules, and pTAL modules. The MAIN procedure in a
mixed-language program can be written in C/C++ or COBOL but not pTAL. Mixed-
language programs that include C/C++ modules require you to link to the same run-
time initialization code and SRLs that C or C++ programs do (see C++ Programs on
page 2-10). Mixed-language programs that include COBOL modules require you to link
to the same run-time libraries that COBOL programs do (see COBOL Programs on
page 2-12).
Programs With Embedded NonStop SQL/MP
Native C and native COBOL programs can contain embedded NonStop™ SQL/MP
statements. You can use nld to create a single loadfile from multiple C or COBOL
object files that contain embedded NonStop™ SQL/MP statements. After creating a
loadfile with nld, use the NonStop™ SQL/MP compiler, SQLCOMP, to set up an
executable NonStop™ SQL/MP application.
Always run nld before SQLCOMP. Do not run SQLCOMP on a linkfile and use the
resulting file as nld input.
A user library cannot contain embedded NonStop™ SQL/MP.
Linking User Libraries
A user library, which is optional, is a set of procedures that the operating system can
link to a program file at run time. Putting commonly used procedures in a user library
provides these benefits:
•
Reduces the storage required for object code on disk and in main memory
•
Shares a set of common procedures among applications
The first time you execute a program file after compilation, duplication, or change to
the -libname specification, the operating system searches the user library to resolve
each unresolved external reference before searching the system code and library.
The operating system resolves an external reference by changing the call in the
program file to point to the user library or to the system library. You can then run the
program file repeatedly (using the same -libname specification) without resolving the
reference again.