InterSystems FAQ rubric
When connecting to the database using a client-server architecture, for example using language binding, the machine name of the client can be obtained using the following code:
set client=##CLASS(%SYS.ProcessQuery).Open("P"_$j).ClientNodeName