Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).


Contains information about the current terminal I/O device.




$ZIO contains information about the current I/O device.

For a terminal device that is a Terminal, $ZIO contains the string TRM:. If the current terminal device is connected remotely, $ZIO contains information about the remote connection.

For a terminal device connected through TELNET, $ZIO contains the following: host|port:

Parameter Description
host The remote host IP address, in either IPv4 format:nnn.nnn.nnn.nnn, where nnn is a decimal number, or in IPv6 format: h:h:h:h:h:h:h:h, where h is a hexadecimal number. Further details on IPv4 and IPv6 formats can be found in the section “Use of IPv6 Addressing” in the chapter “Server Configuration Options” in the Caché Programming Orientation Guide.
port The remote IP port number.

These two values are separated by a vertical bar character. For example,|23. For further information, refer to the %Library.NetworkAddressOpens in a new window class, a subclass of the data type class %Library.StringOpens in a new window.

If the current device is not a terminal:

  • If a file, $ZIO contains the full canonical pathname of the file.

  • If not a file, $ZIO contains the null string.

The following example returns the current device information:

   SET x=$CASE($ZIO,"TRM:":"a terminal",
               "CON:":"a console",
               "":"neither terminal nor file")
   WRITE "The current device is ",x
Copy code to clipboard

This special variable cannot be modified using the SET command. Attempting to do so results in a <SYNTAX> error.

See Also

FeedbackOpens in a new window