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

User Libraries
Binder Manual528613-004
6-4
Shared Run-Time Libraries
There is one data space (stack) for a process, the one allocated for the program
file.
The library file’s global data matches the global data of the program file. Because
you specify the allocation and initialization of global data in your program file, if the
library file has global data, it must match the global data of the program file. The
operating system ignores any initialization of global data in the library file.
The library file cannot contain global data if the program file contains embedded
SQL statements. These global data blocks are used to process the embedded SQL
statements at run-time.
A TAL library procedure can have its own read-only arrays. Nevertheless, a global
read-only array must be in the code space containing references to the array. If
both code spaces contain references to such an array, copies of the array must
exist in both the library and in the program file.
User-library procedures cannot pass read-only array arguments to user code or to
system code. In particular, a user-library call to the Guardian system call procedure
FORMATDATA cannot pass read-only array arguments. For language specific
information on user libraries, see the appropriate manuals for more information.
Shared Run-Time Libraries
Shared run-time libraries (SRLs) are special user libraries that contain global variables.
The SRLs are provided by HP. Building an application that uses an SRL is similar to
building an application that uses a user library. This section describes some additional
commands used with SRLs.
Building Applications That Use SRLs
When building an application, you must specify an existing library to import global
variables from and reserve space in primary, secondary, and extended memory to
store the library variables. Binder uses the recommended data space sizes from the
library, but you can adjust these space sizes. Variables explicitly exported by the library
can be accessed in the application by name.
Using Binder Commands With SRLs
The following Binder commands support shared run-time libraries:
Note. A program file can use either a user library or an SRL.