&APPC SET_SERVER_MODE allows a server process to declare its APPC operational mode concerning client connection.
SET_SERVER_MODE indicates that this is a request to set the mode of operation for APPC client conversations concerning this server process. This request can only be issued by a process that is a registered server. If the server was registered using the START command, or through the TCT option on attaching the transaction, any client conversations directed to the server remain in a pending mode until the SET_SERVER_MODE request is issued. For these servers, this should be the first &APPC option used to set the server's client connection mode.
This verb has the following format:
&APPC SET_SERVER_MODE
[ CONNECT={ ACCEPT | NOTIFY | REJECT } ]
[ RETRY={ YES | NO } ]
[ CONVLIM=nnn ]
Operands:
Changes the client connection mode for the server process. Unless this operand is specified, the connection mode remains unchanged.
If the server was registered by other than an explicit &APPC REGISTER request, queued client conversations remain in a pending state until the connection option is explicitly set by this request.
If CONNECT=ACCEPT is specified, any queued or new client connection requests are automatically accepted by the process and satisfy an appropriate receive request.
If CONNECT=NOTIFY is specified, any queued or new client connection requests are notified to the server's &INTREAD queue in the same manner as a transfer request. In this case the server can choose to accept or reject the connection by use of the &APPC TRANSFER options. Until the conversation is accepted by the &APPC TRANSFER_ACCEPT, it cannot be operated by the process.
This mode of connection is the only one that allows the server to obtain any PIP data carried with the new conversation.
If CONNECT=REJECT is specified, any queued or new conversations are rejected with a condition of retry, or no retry, as determined by the RETRY operand.
Sets the retry status for rejected connection requests. Rejection could be due to an explicit CONNECTION=REJECT state, or due to the process conversation limit being reached.
If RETRY=YES is specified, or defaulted, connections are failed with a return code conveyed to the initiator of:
For RETRY=NO, the conversation fails with:
TRANS_PGM_NOT_AVAIL_NO_RETRY
Sets the conversation limit for the process. If this limit is reached at any stage during processing, subsequent connection requests are automatically placed in the pending queue.
Example: & APPC SET_SERVER_MODE
&APPC SET_SERVER_MODE CONNECT=ACCEPT
Return Codes:
The return codes are as follows:
Set server mode accepted
Set server mode error
Notes:
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |