TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-86
Examples of SOURCE Directive
Effect of Other Directives
If LIST and NOSUPPRESS are in effect after a SOURCE directive completes
execution, the compiler prints a line identifying the source file to which it reverts and
begins reading at the line following the SOURCE directive.
If USEGLOBALS is in effect, the compiler ignores all SOURCE directives until it
encounters BEGINCOMPILATION. For more information on how these directives
interact, see the SAVEGLOBALS Directive
on page 16-75.
Examples of SOURCE Directive
1. This SOURCE directive instructs the compiler to process the file until an end of file
occurs:
?SOURCE $src.current.routines
(Any SECTION directives in the file ROUTINES are treated as comments.)
2. This SOURCE directive reads three sections from the source file. It reads the files
in the order in which they appear in the source file, not in the order specified in the
SOURCE directive.
?SOURCE $src.current.routines (sec1, sec2, sec3)
(The specified files appear in the source file in the order SEC3, SEC2, and SEC1,
so they are read in that order.)
3. This example shows how you can specify the order in which the compiler is to read
the sections, regardless of their order in the source file:
?SOURCE $src.current.routines (sec1)
?SOURCE $src.current.routines (sec2)
?SOURCE $src.current.routines (sec3)
SQL Directive
SQL instructs the compiler to make preparations for the processing of SQL commands.
The syntax for this directive is described in the
NonStop SQL Programming Manual for
TAL.
SQLMEM Directive
SQLMEM specifies where in memory the compiler is to place internal SQL data
structures that describe SQL statements and host variables.
The syntax for SQLMEM is described in the
NonStop SQL Programming Manual for
TAL.