&APPC TRANSFER_CONNECT allows an attached conversation, on which no APPC verb has been issued, to be transferred to another NCL process.
If a RECEIVE has already been issued on the conversation, this request fails. Otherwise, the conversation is passed to the target process as a connection request, and is connected according to the server connection mode, if set. Otherwise, it is placed in the pending queue.
This verb has the following format:
&APPC TRANSFER_CONNECT
[ ID=id ]
[ NCLID=nclid | SERVER=servername ]
[ WAIT=nn ]
Operands:
Indicates this is a request to transfer the conversation identified to the target NCL process as a client connection request. If the conversation has already been operated, the request fails.
Specifies the conversation identifier (as first returned by the system variable &ZAPPCID after successful allocation) that references a particular conversation. If this parameter is omitted, the current (last referenced, or only) conversation is assumed.
Nominates the target NCL process to which ownership of the LU6.2 conversation is to be transferred. The notification message (see below) is queued to the internal environment of this process to indicate it that has been targeted for a transfer request.
SERVER=servername is an alternative way to nominate the target NCL process. If this operand is used, a search is performed for the server name registered for the region, user or system, in that order.
Specifies the time, in seconds (for example, 10), or seconds and hundredths (for example, 1.25), for which the procedure is prepared to wait for the transfer to be accepted or rejected. If not successful before this interval expires, the transfer request is canceled, and an unsuccessful return code (&RETCODE is set to 4, &ZFDBK is set to 0) results.
Example: &APPC TRANSFER_CONNECT
&APPC TRANSFER_CONNECT NCLID=123
Return Codes:
The return codes are as follows:
Request successful
Request unsuccessful
Remote program error
State check
Request or conversation error
&ZFDBK is also set, plus all APPC system variables.
State Transition:
This request is valid from send or receive state only, and no state changes occur as a result.
Notification Message Format:
When a TRANSFER_CONNECT is issued, the following message is placed on the request queue of the internal environment for the NCL process targeted:
N00101 NOTIFY: APPC EVENT: TRANSFER RESOURCE: id
id is the system unique conversation identifier being transferred. This value must be supplied on any subsequent TRANSFER_CONNECT or TRANSFER_REJECT request by the target procedure.
Note:
The main use of this verb is to transfer a conversation to an active server. For example, if an NCL process was started as a result of a remotely initiated conversation (and the relevant TCT entry does not specify a server name), it is possible to have two or more instances of the process started. The first one to register becomes the server. When the process attempts to register, the &APPC REGISTER verb fails with a duplicate server name error, and the conversation is transferred to the active server by using the &APPC TRANSFER_CONNECT verb. For example:
&APPC REGISTER SERVER=PRINTSERVER &IF &RETCODE = 16 &THEN + &DO &APPC TRANSFER_CONNECT SERVER=PRINTSERVER . . .
| Copyright © 2009 CA. All rights reserved. |
|