CRE Programmer's Guide
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-1
6 CRE Service Functions
This section describes the interfaces to the CRE service functions. The service
functions include:
•
Environment Functions on page 6-1
•
File-Sharing Functions on page 6-4
•
$RECEIVE Functions on page 6-30
•
CRE_Terminator_ on page 6-42
•
Exception-Handling Functions on page 6-44
The TNS CRE service functions, data, and data structure declarations in TAL are
available in the CREDECS file. The native CRE service functions, data, and data
structure declarations in pTAL are available in the CRERDECS files.
C, COBOL, and FORTRAN run-time libraries call CRE service functions to access
resources managed by the CRE. Do not call CRE service functions from C, COBOL, or
FORTRAN routines; use each language’s high-level constructs instead. Call CRE
service functions only from TAL and pTAL routines that must share resources
managed by the CRE with routines written in another language.
Many of the functions described in this section specify literal values that are
predefined. For example, if you invoke CRE_File_Close_, you can use a predefined
literal value to specify which standard file you are closing. The literal values used in
this section are declared in the CREDECS file. See Section 3, Compiling and Binding
Programs for the TNS CRE, for information on using CREDECS.
Environment Functions
This subsection describes the functions that retrieve and modify program environment
variables. These functions are listed in Table 6-1
on page 6-1.
CRE_Getenv_
The CRE_Getenv_ function retrieves the address of the value portion of an
environment variable.
The syntax for the TNS CRE environment is:
Table 6-1. CRE Environment Functions
Function Name Function Action
CRE_Getenv_
on
page 6-1
Returns a pointer to the value portion of an environment variable.
CRE_Putenv_
on
page 6-2
Stores a value in the value portion of an environment variable.
INT(32) PROC CRE_Getenv_( name );
STRING .EXT name; ! in, required TNS only