The isatty callable service determines whether a file is a terminal.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX2ITY): | 31-bit |
AMODE (BPX4ITY): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4ITY with the same parameter.
The name of a fullword that contains the file descriptor.
The name of a fullword in which the isatty service returns 1 if File_descriptor is a terminal, or 0 if it is not a terminal.
Return_code | Explanation |
---|---|
EBADF | The filedes argument is not a valid open file descriptor. |
ENOTTY | The filedes argument is not associated with a terminal. |
The name of a fullword in which the isatty service stores the reason code. The isatty service may return Reason_code only if Return_value is 0. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the isatty service.
For an example using this callable service, see BPX2ITY (isatty) example.