%TTNAME

Return the terminal name

 

USupported on Unix
VSupported on OpenVMS

 

name = %TTNAME

or

xcall TTNAME(name)

Return value

name

The name of the terminal at which the current process is running. (a)

Discussion

We recommend that you use terminal names for unique process distinctions rather than using the TNMBR environment variable.

On Unix, if the terminal name has the form below, TTNAME returns device_type/unit_number:

/dev/device_type/unit_number

On OpenVMS, if the program is running as a batch job, the TTNAME subroutine returns the “null” device specification: “_NLA0.”