SETDEV MERGE |
Transfer TCP Connections |
SETDEV (chan1) MERGE WITH (chan2)
chan1 |
Channel number of the TCP file that will receive the connections. |
chan2 |
Channel number of a TCP file whose connection will be transferred to chan1. |
The SETDEV ( ) MERGE directive allows the current connection(s) from an open TCP channel/file to be transferred to another. It is typically used to simplify the logic required to READ from multiple connections by consolidating the connections onto a single channel from which you can issue a READ.
Both channel numbers must refer to TCP file handles. The channel from which the connections will be transferred will be closed upon completion of this command.
The SETDEV ( ) MERGE directive is also used to only allow merging of clients to the server.
(The SETDEV MERGE directive was added in PxPlus v10.20.)
(Support for client merges was added in PxPlus 2018.)