Recovering hostname with Cicode function

I wanted to know if it is posible to recover Server hostname with a Cicode function. I needed to make sure that the current server is the online one for an specific I/O Device

Thank in advance