Please enable JavaScript to view this site.

A-Shell Reference

Reviewed and revised, July 2020

xcall CONDEV, dev {,dns'flag}

CONDEV returns an identifier for the client workstation or console/terminal device. It is useful in situations where you want to identify the physical workstation, rather than the user or session.

The identifier can take one of several forms, depending on the operating system and other factors. Under Windows, it will return the computer name (e.g. "SALESPC"). Under Unix, it will first check to see if the environment variable REMOTEHOST is defined, and if so, it returns its definition. (Many shells will define the environment variable REMOTEHOST to contain the IP address of the workstation). Otherwise, if it can determine the IP address of the client workstation, it will return that in ###.###.###.### format. Otherwise, it will return the terminal device (pseudo or real tty) name, e.g. "ttya02" or "pts/0".    

Parameters

dev  (String)  [out]

receives the identifier (described above)

dns'flag (Num)  [in]

If specified and non-zero, an attempt will be made to convert the IP address to the equivalent host name. This can sometimes introduce a delay if there is no local DNS server.

Comments

See GETUSN, which is similar.

If you are using the ZTERM terminal emulator (and possibly others) you can retrieve the client’s IP address using a ZTERM Escape Sequences. In the case of ATE, you can also use MX_GETIP.