The server declares it will operate in automatic connection mode by issuing the following statement after process initialization:
&APPC SET_SERVER_MODE CONNECT=ACCEPT
or
&APPC REGISTER SERVER=server CONNECT=ACCEPT
Following this statement any pending connection requests, or any subsequent connection requests, are automatically connected to the server and available to operate immediately in receive state. When using this mode no access to the PIP data, if present, for a new conversation is available. Hence this mode of operation is unsuitable for servers that service transactions making use of PIP data.
Since all new conversations connect in receive state, after an automatic connection they would satisfy a receive request that specifies any active clients. For example:
&APPC RECEIVE_AND_WAIT ID=CLIENTS VARS=A*
or
&APPC RECEIVE_NOTIFY ID=CLIENTS
Any conversation that connected to the server, that is any client conversation, can satisfy such a receive. However, conversations started by the server, even if they are in receive state, do not satisfy these requests. In either case a new connection, or an existing conversation where more data had just arrived, could satisfy the receive request.
Conversations are serviced in the order that data arrives. The actual conversation satisfying the receive is identified by the usual &ZAPPCxxx system variables. The server, having received some data, can choose to operate that conversation specifically to satisfy the client, before issuing the generic receive against all clients to process the next item of work, thus serializing server activity.
| Copyright © 2010 CA. All rights reserved. |
|