CURRENT SERVER
The CURRENT SERVER special register specifies a VARCHAR(18) value that identifies the current application server.
CURRENT SERVER can be changed by the CONNECT (Type 1), CONNECT (Type 2), or SET CONNECTION statements, but only under certain conditions. See the description in CONNECT (Type 1), CONNECT (Type 2), and SET CONNECTION.
CURRENT SERVER cannot be specified unless the local relational database is named by adding the entry to the relational database directory using the ADDRDBDIRE or WRKRDBDIRE command.
Example
Set the host variable APPL_SERVE (VARCHAR(18)) to the name of the current server.
SELECT CURRENT SERVER
INTO :APPL_SERVE
FROM SYSIBM.SYSDUMMY1