TACL Reference Manual
Statements and Programs
HP NonStop TACL Reference Manual—429513-018
5-13
Creating Program Files
if executed in a routine stored in a ?TACL ROUTINE file, returns :_TACL_ROUTINE,
allowing the routine to invoke itself.
Creating a Library of TACL Statements: The ?SECTION
Directive
A library is an edit file that contains a sequential list of one or more TACL variable
definitions. For each variable, enter a ?SECTION directive at the beginning of the
definition, followed by the name of each variable and its type. (The type is not limited to
procedural variables; you can define any type of variable-ALIAS, DELTA,
DIRECTORY, MACRO, ROUTINE, STRUCT, or TEXT-in a library file). On subsequent
lines, enter the statements associated with the variable.
To load your library into the variables named in ?SECTION directives, type the LOAD
command or #LOAD function with the file name of your library file. To load the file
whenever you log on, include the LOAD or #LOAD call in your TACLCSTM file. The
load process includes partial interpretation of statements, making subsequent
invocations more efficient.
Creating a Segment File
Segment files are memory-mapped files that can be loaded into an extended memory
segment. When you attach a segment file, you load it into memory so that TACL can
gain immediate access to your macros, routines, and other variables. Segment files
provide efficient storage for commonly used macros and routines.
The Default TACL Segment File
Whenever you log on, TACL creates a private segment file to hold the variables in the
root (:) directory; this file is called the TACL default segment file. TACL then creates
the directory UTILS and attaches the segment file TACLSEGF to it for shared access.
TACLSEGF contains directories for all the software RVU products that have TACL
programs and that are available on your system. Each TACL command is stored as
:UTILS:TACL: command. For additional information about directories, see Section 6,
The TACL Environment.
User-Defined Segment Files
To create a segment file, you load a library file into a segment. Unlike a library file, you
do not need to load it again unless you change its contents. After the contents of the
file are in the segment file, the ATTACHSEG and USE commands establish access to
the variables in the segment. If the segment has not been detached since you last
logged on, only the USE command is needed.
You can add your own library of variables to the default segment file established by
TACL at logon time, or you can create your own personal segment file. If you load your
variables into the default segment file, you must do so every time that file is recreated.
If you have your own segment file, you direct TACL to attach the file to a directory
variable and to use that directory for reference to the file. Because each load performs