Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 5
Initializing SIO Files Using TAL or pTAL DEFINEs
For convenience in writing programs to run in both the native and TNS environments,
the native form of the INITIALIZER call can also be used in TNS procedures, in which
case it overrides the processing of contiguous FCBs.
See Using the INITIALIZER Procedure, later in this section, for more information about
calling INITIALIZER.
Initializing SIO Files Using TAL or
pTAL DEFINEs
A set of TAL and pTAL DEFINEs in the $SYSTEM.SYSTEM.GPLDEFS file enable you
to create and initialize an FCB for each SIO file, a common FCB, and a run-unit control
block (RUCB):
The INITIALIZER handles the Startup and Assign messages and places any relevant
info
rmation from these messages into the appropriate FCBs if the RUCB is passed:
The Startup message provides the names of the input and output files typically
supplied by the user with the RUN command.
Assign messages provide the actual file name as well as other file characteristics
such as access mode and record and block length. These messages result from
ASSIGN operations set up by the user before running the program.
The INITIALIZER procedure automatically reads and processes the Startup and Assign
messages. File characteristics provided by the program user through Assign
messages during process startup can also be provided programmatically using the
SET^FILE procedure.
To perform initialization using TAL or pTAL DEFINEs, your program must do the
following:
ALLOCATE^CBS Allocates and initializes the RUCB and common FCB. It
initializes the RUCB with the number of FCBs to be
processed by the INITIALIZER.
ALLOCATE^CBS^D00 Performs the same functions as ALLOCATE^CBS, but
allocates a larger common FCB. This DEFINE must be
used if any of the FCBs are allocated using
ALLOCATE^FCB^D00.
ALLOCATE^FCB Allocates space for and initializes an FCB with the default
file name. This DEFINE is typically used for FCBs other
than $RECEIVE and the common FCB.
ALLOCATE^FCB^D00 Performs the same functions as ALLOCATE^FCB, but
allocates a larger FCB. This DEFINE must be used for
the $RECEIVE file.
Note. The FCBs for a TNS/R native process use more memory than those for a TNS process.