The CURRENT NODE special register specifies an INTEGER value that identifies the coordinator node number (the partition to which an application connects).
CURRENT NODE returns 0 if the database instance is not defined to support partitioning (no db2nodes.cfg file 21 ).
The CURRENT NODE can be changed by the CONNECT statement, but only under certain conditions (see CONNECT (Type 1)).
Set the host variable APPL_NODE (integer) to the number of the partition to which the application is connected.
VALUES CURRENT NODE INTO :APPL_NODE