TAL Programmer's Guide

CRE Guidelines for TAL
Mixed-Language Programming
17–46 096254 Tandem Computers Incorporated
Sharing the Standard Files To open and access standard input, output, and log files, a TAL routine must call CRE
routines directly. The CRE provides the following routines for accessing the standard
files:
CRE_FILE_CLOSE_
CRE_FILE_CONTROL_
CRE_FILE_INPUT_
CRE_FILE_MESSAGE_
CRE_FILE_OPEN_
CRE_FILE_OUTPUT_
CRE_FILE_RETRYCHECK_
CRE_FILE_SETMODE_
CRE_HOMETERM_OPEN_
CRE_LOG_MESSAGE_
CRE_SPOOL_START_
The preceding CRE routines are described in the CRE Programmer’s Guide. Some
examples are given in the following subsections.
Opening a Standard File
To request an open to a standard file, a TAL routine calls CRE_FILE_OPEN_. For
example, to request an open to standard log , specify:
CALL CRE_FILE_OPEN_ (cre^standard^log);
As another example, to request an open to the standard output file, specify:
CALL CRE_FILE_OPEN_ (cre^standard^output);
CRE_FILE_OPEN_ does the following tasks:
If the file is closed, CRE_FILE_OPEN_ calls FILE_OPEN_.
FILE_OPEN_ opens the file and returns control to CRE_FILE_OPEN_.
CRE_FILE_OPEN_ grants the TAL routine a connection to the file open.
For each subsequent open request, CRE_FILE_OPEN_ grants a connection to the
same file open.