TAL Reference Manual
Compiler Directives
TAL Reference Manual—526371-001
16-94
Usage Considerations
Usage Considerations
USEGLOBALS can appear either in the compilation command or in the source code
before any global data declarations. If USEGLOBALS appears anywhere else, the
compiler issues a warning and ignores the directive.
Do not use USEGLOBALS and CROSSREF in the same compilation unit. If you do,
the compiler does not pass Inspect and cross-reference information to SYMSERV.
Saving Global Data Declarations
When you compile with SAVEGLOBALS, the compiler saves global data declarations
as follows:
•
It stores the identifiers and data characteristics (data type and kind of variable) in a
global declarations file.
•
It stores the initialization values (addresses and constant lists) in the object file.
Retrieving Saved Global Data Declarations
After the SAVEGLOBALS compilation completes, you can subsequently compile the
source file and retrieve the saved global data declarations and initializations by using
the following directives:
•
USEGLOBALS retrieves the saved global data declarations and suppresses
compilation of text lines and SOURCE directives until a BEGINCOMPILATION
appears.
•
BEGINCOMPILATION marks the point at which compilation is to begin.
BEGINCOMPILATION, if present, must appear after the last global data
declaration or SEARCH directive and before the first procedure declaration,
including EXTERNAL and FORWARD declarations.
•
SEARCH retrieves global initializations and template structure declarations (unless
you used SYNTAX in the SAVEGLOBALS compilation).
Make sure the global data declarations in both the SAVEGLOBALS and
USEGLOBALS compilations are identical. If you include new or changed data
declarations anywhere in the USEGLOBALS source file, results are unpredictable.
The USEGLOBALS compilation terminates if the global declarations file:
•
Cannot be found or opened by the compiler
•
Is not file code 105
•
Was created using a different version of the compiler
Note. Do not use USEGLOBALS and SAVEGLOBALS in the same compilation unit. If you do,
the compiler issues an error message and uses only the first of the two directives.