CURRENT MEMBER special register
The CURRENT MEMBER special register specifies an INTEGER value that identifies the coordinator member for the statement.
For statements issued from an application, the coordinator is the member to which the application connects. For statements issued from a routine, the coordinator is the member from which the routine is invoked.
When used in an SQL statement inside a routine, CURRENT MEMBER is never inherited from the invoking statement.
CURRENT MEMBER returns 0 if the database instance is not defined to support database partitioning. The database instance is not defined for such support if there is no db2nodes.cfg file. For a partitioned database environment, the db2nodes.cfg file exists and contains database partition and member definitions.
CURRENT MEMBER can be changed through the CONNECT statement, but only under certain conditions.
Examples
VALUES CURRENT MEMBER
INTO :APPL_NODE
VALUES CURRENT MEMBER
1
-----------
0