z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


ttyname

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-ttyname--fd--variable---------------------------------------><

Function

ttyname invokes the ttyname callable service to obtain the pathname of the terminal associated with the file descriptor.

Parameters

fd
The file descriptor (a number) for the character special file for the terminal.
variable
The name of the variable that stores the pathname for the character special file for the terminal.

Usage notes

This service does not return -1 to indicate a failure. If the file descriptor is incorrect, a null string is returned.

Example

To obtain the pathname for file descriptor 0:
"ttyname 0 path"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014