Previous Topic: Automatic Connection Mode

Next Topic: Rejection Mode

Notification Mode

As an alternative, the server can declare it will operate in notification mode by issuing:

&APPC SET_SERVER_MODE ...  CONNECT=NOTIFY

or

&APPC REGISTER ...  CONNECT=NOTIFY

Once this mode is set any pending connection requests, or any subsequent connection requests, are notified to the server by an event message being queued to the process's internal environment. This message is the same as that created by a transfer request from another process, and the server accepts or rejects these connections in the same manner as a transfer request. An &INTREAD statement can be used to receive the notification, informing the process of the conversation identifier that is pending connection. The server can choose to accept the connection request and begin processing the transaction. For example:

&APPC TRANSFER_ACCEPT ID=&id VARS=PIP*

In this case, it is possible for the server to obtain any PIP data present in the attach request. However, the server might choose to reject the new transaction. For example:

&APPC TRANSFER_REJECT ID=&id RETRY=YES

This is manifested in the remote allocation system as an allocation failure, with a reason of either:

TRANS_PGM_NOT_AVAIL_RETRY

or

TRANS_PGM_NOT_AVAIL_NO_RETRY

If the connection is accepted, the conversation is connected in receive state and is operated in the usual manner. This form is most useful when the server is to continue to operate in notification mode, by using the asynchronous form of receipt. For example:

&APPC RECEIVE_NOTIFY ID=CLIENTS