CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-7
Writing TAL Routines That Use the TNS CRE
•
Call TAL_CRE_INITIALIZER_ in the first statement of a TAL main procedure.
TAL_CRE_INITIALIZER_ is located in the TAL run-time library, TALLIB and the
external declaration is located in TALDECS. TAL_CRE_INITIALIZER_ invokes
TNS CRE functions that initialize the TNS CRE. Program Initialization on page 2-4
describes the TNS CRE’s initialization tasks. The TAL Programmer’s Guide
describes the interface to TAL_CRE_INITIALIZER_. Note that the TNS CRE does
not create backup processes.
•
Call CRE_Terminator_, not the PROCESS_STOP_, STOP or ABEND system
procedures, for TAL routines that terminate program execution.
•
Call system procedures to access resources that are not managed by the TNS
CRE.
•
Call system procedures to access resources that can be managed by the TNS
CRE but that you do not want to share with routines written in other languages.
•
Call the TNS CRE functions described in Section 6, CRE Service Functions, to
access resources managed by the TNS CRE that you want to share with routines
written in other languages.
For example, call TNS CRE library functions to share access to the standard files
or $RECEIVE. Note that the presence of these objects does not necessarily mean
that your program shares these resource amongst routines written in multiple
languages. If no other language is reading from or writing to $RECEIVE, then your
TAL program can open, read, write, and close $RECEIVE using system
procedures, rather than TNS CRE library functions.
For example, call the PROCESS_CREATE_ system procedure in your TAL routine
to create a new process. The TNS CRE does not provide a run-time function to
create processes on behalf of your program.
•
Source in the file CREDECS
•
Do not use the INITIALIZER system procedure. Both the TNS CRE and the
INITIALIZER procedure read system messages, including the startup message,
the PARAMs message, and ASSIGN messages.
Programs that use sequential I/O (SIO) procedures (for example, OPEN^FILE,
READ^FILE, WRITE^FILE, CLOSE^FILE, and so forth) are particularly likely to use
the INITIALIZER system procedure.
You must resolve how to remove the call to the INITIALIZER procedure from your
program.
The Guardian Procedure Calls Reference Manual describes the INITIALIZER
procedure and each of the SIO procedures. The Guardian Programmer’s Guide
describes how to use the INITIALIZER system procedure with SIO procedures.
•
If your TAL routines call standard math functions, the TAL routines must manage
the trap enable bit of the TNS CRE environment register to control program