Difference between revisions of "Recital Linker"

From Recital Documentation Wiki
Jump to: navigation, search
Line 8: Line 8:
  
 
<pre>
 
<pre>
$ dbl -i <input file> -o <output file> -x <first procedure> -m <message file>
+
$ recitaladmin -l -i <input file> -o <output file> -x <first procedure> -m <message file>
 +
</pre>
 +
 
 +
or
 +
 
 +
<pre>
 +
$ recitaladmin linker -i <input file> -o <output file> -x <first procedure> -m <message file>
 
</pre>
 
</pre>
  
Line 32: Line 38:
  
  
==Compiling large files==
+
==Invoking the Recital Linker from within Recital==
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:
+
The Recital Linker can also be invoked from within Recital using the [[LINK]] command.
 
+
Maximum compile file size (MAXDBO) of <value> exceeded with file <.src file>.
+
 
+
If this occurs, you need to increase the [[SET MAXDBO|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|SET MAXDBO TO <expN>]] is set in the main [[Configuration Files|configuration file]], but can also be issued at the interactive prompt.
+
  
  
==Invoking the Recital/Linker from the Recital/4GL==
+
==dbl==
The Recital/Linker can also be invoked through the Recital/4GL using the [[LINK]] command.
+
The ''dbl'' syntax has been deprecated in Recital 10, to be replaced with ''recitaladmin -l | linker''.
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Reference]]
 
[[Category:Reference]]

Revision as of 13:40, 1 December 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.

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

or

$ recitaladmin linker -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.


Invoking the Recital Linker from within Recital

The Recital Linker can also be invoked from within Recital using the LINK command.


dbl

The dbl syntax has been deprecated in Recital 10, to be replaced with recitaladmin -l | linker.