TAL Programmer's Guide
CRE Guidelines for TAL
Mixed-Language Programming
096254 Tandem Computers Incorporated 17–47
Writing a Message to Standard Files
To write a record to standard log , a TAL routine calls CRE_LOG_MESSAGE_. For
example, to write the content of a 15-character array named MSG to standard log, you
can specify:
CALL CRE_LOG_MESSAGE_ (msg:15);
To write a record to standard output , a TAL routine calls CRE_FILE_OUTPUT_. For
example, to write the record "B" to standard output , you can specify:
STRING var;
var := "B";
CALL CRE_FILE_OUTPUT_ (cre^standard^output, var:1);
Closing Standard Files
To close standard files, a TAL routine calls CRE_FILE_CLOSE_. For example, to close
standard log, specify:
CALL CRE_FILE_CLOSE_ (cre^standard^log);
As another example, to close standard output, specify:
CALL CRE_FILE_CLOSE_ (cre^standard^output);
Using Spooling
You can specify a spooler collector as the device for standard output or standard log.
For standard output, the CRE uses buffered spooling unless you specify otherwise.
For standard log, you cannot use buffered spooling.
To request an open to a spooler collector:
1. The TAL routine calls CRE_FILE_OPEN_.
2. If the spooler is closed, CRE_FILE_OPEN_ sets a flag that CRE_SPOOL_START_
has not been called.
3. If the flag in step 2 is set, other CRE standard-file routines (such as
CRE_FILE_OUTPUT_) call CRE_SPOOL_START_, which clears the flag and starts
the spooler with default settings.
To change the default settings, the TAL routine must call CRE_SPOOL_START_
directly and specify the new settings, such as the setting for multiple copies.
4. CRE_FILE_OPEN_ grants the TAL routine a connection to the spooler.
5. For each subsequent request, CRE_FILE_OPEN_ grants a connection to the same
spooler open.