BPX4TYN (ttyname) example
The following code retrieves the pathname for the standard
error output file.
For the callable service, see ttyname (BPX1TYN, BPX4TYN) (POSIX version) — Get the name of a terminal.
AMODE 31 callers use BPX2TYN (ttyname) example.
MVC BUFLENA,=A(1023) Maximum pathname
CALL BPX4TYN, Determine terminal name +
(=A(STDERR_FILENO), Input: File descriptor +
BUFLENA, Length of buffer for pathname +
BUFFERA, Buffer for pathname of terminal +
RETVAL, Return value: 0, -1 +
RETCODE, Return code: describes why VAL=-1 +
RSNCODE), Reason code: qualifier on RETCODE +
MF=(E,PLIST) ----------------------------------