CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-37
CRE_Receive_Open_Close_
rcv_param.Report^flags[2] := 0;
rcv_param.Report^flags[3] := 0;
rcv_param.Report^flags[0] := CRE^cpu^down^mask LOR
 CRE^cpu^up^mask LOR
 CRE^settime^mask LOR
 CRE^power^on^mask ;
rcv_param.Report^flags[1] := CRE^CONTROL^mask LOR
 CRE^SETMODE^mask ;
rcv_param.Report^flags[2] := CRE^remote^cpu^down^mask LOR
 CRE^remote^cpu^up^mask LOR
 CRE^OPEN^mask LOR
 CRE^CLOSE^mask ;
If your program does not specify attributes or attributes is present but its 
address value is zero, the CRE uses the following 
attributes:
Maximum^requesters = 1
Maximum^syncdepth = 1
Maximum^reply = 0
Receive^depth = 1
Report^flags[0:3] = [-1, 0, 0, 0]
Report^flags[0] has special meaning. Refer to Table 6-6 on page 6-37.
Specifying the Close Variant
If variant specifies 0 to close a connection, CRE_Receive_File_Open_Close_ closes 
the specified connection. If the number of connections becomes zero but the CRE has 
messages queued that have not been read by the program, 
CRE_Receive_Open_Close_ returns a 201 reply to each of the messages. The 
CRE_Receive_Open_Close_ closes the file unless it needs to maintain an open for 
internal reasons such as monitoring a backup process.
Table 6-6. Using Report^flags
Program Has Not Previously Opened 
$RECEIVE
Program Has Already Opened $RECEIVE
Report^flags[0] < 0 Report^flags[0] => 0 Report^flags[0] < 0 Report^flags[0] => 0
Program does not 
receive system 
messages.
Program receives 
system messages 
specified in 
Report^flags[0:3].
Caller receives 
same system 
messages as 
original opener of 
$RECEIVE.
If caller specifies the 
same system messages 
as original opener, 
Report^flags are okay. 
Otherwise, 
CRE_Receive_Open_C
lose_ returns an error.










