The tcgetcp callable service gets the terminal session code page names and Code Page Change Notification (CPCN) capability.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TGC): | 31-bit |
AMODE (BPX4TGC): | 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 BPX4TGC with the same parameters.
The name of a fullword that contains the file descriptor of the terminal for which you want to get the code page names and data conversion environment.
The name of the fullword that contains the length of the Termcp_structure. The Termcp_structure is mapped by BPXYTCCP, and has a length of TCCP#LENGTH. See BPXYTCCP — Map the terminal control code page structure.
The name of an area where the tcgetcp service returns the Termcp_structure. The Termcp_structure is mapped by the BPXYTCCP macro. See BPXYTCCP — Map the terminal control code page structure.
Return_code | Explanation |
---|---|
EBADF | File_descriptor is an incorrect open file descriptor. |
EINVAL | One of the parameters contains a value that is not correct. Consult Reason_Code returned to determine the exact reason the error occurred. |
ENODEV | One of the following error conditions exists:
|
ENOTTY | The file that is associated with the file descriptor is not a terminal device. |
The name of a fullword in which the tcgetcp service stores the reason code. The tcgetcp service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
The pseudoterminal device driver supports this CPCN capability.
The OCS remote-tty device driver supports this CPCN capability.
The tcgetcp service is supported by the pseudoterminal and (OCS) remote terminal device drivers.
For an example using this callable service, see BPX1TGC (tcgetcp) example.