Difference between revisions of "Recital Linker"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
Recital Terminal Developer includes the Recital Linker utility, which can be used to link individual program files into a single file that can then be compiled.  This limits the number of files that need to be open at one time, thus using less OS file handles and making more efficient use of shared memory when running applications with [[SET PSHARE|SET PSHARE ON]].
+
Recital includes the Recital Linker utility, which can be used to link individual program files into a single file that can then be compiled.  This limits the number of files that need to be open at one time, thus using less OS file handles and making more efficient use of shared memory when running applications with [[SET PSHARE|SET PSHARE ON]].
  
 
With [[SET PSHARE|SET PSHARE ON]], compiled programs are loaded into shared memory when called.  All users accessing a particular program can access the same area of shared memory rather than loading the program into private memory.  The program is removed from shared memory when it no longer has any attached users.  A single compiled program therefore, need only be loaded once and accessed by all users.  Multiple smaller compiled programs cause an increased amount of loading and unloading activity in shared memory.
 
With [[SET PSHARE|SET PSHARE ON]], compiled programs are loaded into shared memory when called.  All users accessing a particular program can access the same area of shared memory rather than loading the program into private memory.  The program is removed from shared memory when it no longer has any attached users.  A single compiled program therefore, need only be loaded once and accessed by all users.  Multiple smaller compiled programs cause an increased amount of loading and unloading activity in shared memory.

Revision as of 23:38, 15 June 2009

Recital includes the Recital Linker utility, which can be used to link individual program files into a single file that can then be compiled. This limits the number of files that need to be open at one time, thus using less OS file handles and making more efficient use of shared memory when running applications with SET PSHARE ON.

With SET PSHARE ON, compiled programs are loaded into shared memory when called. All users accessing a particular program can access the same area of shared memory rather than loading the program into private memory. The program is removed from shared memory when it no longer has any attached users. A single compiled program therefore, need only be loaded once and accessed by all users. Multiple smaller compiled programs cause an increased amount of loading and unloading activity in shared memory.


Syntax

The linker is run from the Operating System. You must specify the name of an input file and an output file. You can optionally specify the first procedure to be run and the name of a file to which all linker messages will be sent.

$ dbl -i <input file> -o <output file> -x <first procedure> -m <message file>


Input File

The input file should contain the name of each procedure to be linked. These should be listed one to a line and must be unique e.g.

prog1.prg prog2.prg prog3.prg


Output File

The output file is the file that will be compiled and run. To distinguish this from the .prg files from which it is comprised, the convention is to give this file a .src extension.


First Procedure

If the first procedure to be run is specified, a ’DO <first procedure>’ line will be included in the output file. The file can be run as a self-contained module rather than being used as a procedure library.


Message File

If no message file is specified, the messages will be displayed on the screen (standard output) while the linker is running. The name of each file is listed as it is linked and a warning message is given if any duplicate names are found.


Compiling large files

When you come to compile your .src file, the linker output file, you may find the following error message is generated part way through the compilation:

Maximum compile file size (MAXDBO) of <value> exceeded with file <.src file>.

If this occurs, you need to increase the SET MAXDBO TO <expN> value. This setting controls the size of compiled file that can be created. The <expN> needs to be 4x the size of the compiled file in kilobytes. The default is 256.

SET MAXDBO TO <expN> is set in the main configuration file, but can also be issued at the interactive prompt.


Invoking the Recital/Linker from the Recital/4GL

The Recital/Linker can also be invoked through the Recital/4GL using the LINK command.