CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-31
CRE_Receive_Open_Close_
CRE_Receive_Open_Close_
CRE_Receive_Open_Close_ provides a logical open or close of $RECEIVE on behalf 
of its caller. 
The syntax for the TNS environment is: 
The syntax for the native environment is:
variant
defines if the call is an open or a close request. It is nonzero for an open request, 
zero for a close request.
attributes
if present and its address value is not equal to zero, points to a structure that 
specifies attributes to apply to $RECEIVE. For further information, see Specifying 
the Receive File Open Attributes on page 6-32.
cplist
if present and its address value is nonzero in the TNS environment, is a checkpoint 
list. In the native CRE environment, this parameter has no meaning and should be 
left empty (it is used by COBOL for process pair execution).
Table 6-4. $RECEIVE Functions
Function Name Function Action
CRE_Receive_Open_Close_
on page 6-31
Opens or closes $RECEIVE.
CRE_Receive_Read_
 on 
page 6-38
Reads a message from $RECEIVE by calling 
READUPDATE. 
CRE_Receive_Write_
 on 
page 6-41
Replies to a message from $RECEIVE by calling REPLYX.
INT PROC CRE_Receive_Open_Close_(variant, attributes,
 cplist) EXTENSIBLE;
 INT variant; ! in, required
 INT .EXT attributes; ! in, optional
 INT(32) .cplist; ! in/out, optional TNS only
INT PROC CRE_Receive_Open_Close_(variant, attributes,
 cplist) EXTENSIBLE;
 INT variant; ! in, required
 INT .EXT attributes; ! in, optional
 INT(32) .EXT .cplist; ! in/out, optional native only










