Directives 

SETDEV MERGE

Transfer TCP Connections

Format

SETDEV (chan1) MERGE WITH (chan2)

Where:

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.

Description

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.

Note:
It is allowable to mix secure (SSL) connections and insecure connections.

(The SETDEV MERGE directive was added in PxPlus v10.20.)
(Support for client merges was added in PxPlus 2018.)