pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

DescriptionDirective
Saves global data declarations and initial values in one fileSAVEGLOBALS
Reads global data declarations and initial values saved in a fileUSEGLOBALS
Marks the point in the source file where compilation is to begin if the
USEGLOBALS directive is active
BEGINCOMPILATION
NOTE:
The EpTAL compiler does not accept the SAVEGLOBALS or USEGLOBALS directive.
The EpTAL compiler ignores the BEGINCOMPILATION directive.
Topics:
Saving Global Data Declarations (page 373)
Retrieving Global Data Declarations (page 374)
Examples (page 374)
Migrating from TNS/R to TNS/E (page 375)
Terms used in the following topics:
MeaningTerm
The compilation for which you specify SAVEGLOBALSSAVEGLOBALS compilation
The source file for the SAVEGLOBALS compilationSAVEGLOBALS compilation file
The compilation for which you specify USEGLOBALSUSEGLOBALS compilation
The source file for the USEGLOBALS compilationUSEGLOBALS compilation file
Saving Global Data Declarations
When you compile with SAVEGLOBALS, the compiler saves the global data declarations—global
data identifiers and their attributes (such as data type and kind of variable initialization)—in a file
whose file code is 701.
If you make no changes in the global data declarations, you can use the saved declarations in
subsequent USEGLOBALS compilations, reducing their compilation time.
SAVEGLOBALS does not save FORWARD procedure declarations or EXTERNAL procedure
declarations. You must recompile these declarations in the USEGLOBALS compilation.
When you use the following directives in the SAVEGLOBALS compilation, they affect subsequent
USEGLOBALS compilations as follows:
Effect in Subsequent USEGLOBALS CompilationsDirective in SAVEGLOBALS Compilation
Negates the need for using the USEGLOBALS compilation because no
object file was produced by the SAVEGLOBALS compilation
SYNTAX
Continues to print symbols in the listingPRINTSYM
Continues to make symbols available for all data blocks that had symbols
during the SAVEGLOBALS compilation
SYMBOLS
You must use the same version of the compiler for the SAVEGLOBALS compilation and the
USEGLOBALS compilation; otherwise, an error occurs in the USEGLOBALS compilation.
Whenever you switch to a new version of the compiler, you must recompile the source code using
SAVEGLOBALS to create a new global declarations file.
Saving and Using Global Data Declarations 373