The tcsettables callable service sets the terminal session code page names and conversion tables to the specified values.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TST): | 31-bit |
AMODE (BPX4TST): | 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 BPX4TST with the same parameters.
The name of a fullword that contains the file descriptor of the terminal for which the code page names and data conversion tables are to be set.
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 that contains the code page information that is to be set. This structure contains the source (ASCII) code page name, target (EBCDIC) code page name, and control flags. The Termcp_structure is mapped by the BPXYTCCP macro (see BPXYTCCP — Map the terminal control code page structure).
The name of a field that contains a 256-byte data conversion table for the source-to-target (ASCII to EBCDIC) data conversion. The byte offset into this table corresponds to the character code from the source (ASCII) code page. The data value at each offset is the converted target (EBCDIC) character code.
The name of a field that contains a 256-byte data conversion table for the target-to-source (EBCDIC to ASCII) data conversion. The byte offset into this table corresponds to the character code from the target (EBCDIC) code page. The data value at each offset is the converted source (ASCII) character code.
The name of a fullword in which the tcsettables service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EBADF | File_descriptor is an incorrect open file descriptor. |
EINTR | A signal interrupted the call. |
EINVAL | One of the following error conditions exists:
|
EIO | The process group of the process that is issuing the function is an orphaned, background process group, and the process that is issuing the function is not ignoring or blocking SIGTTOU. |
ENODEV | The terminal device driver does not support the forward code page names and tables CPCN capability. |
ENOTTY | The file that is associated with the file descriptor is not a terminal device. |
The name of a fullword in which the tcsettables service stores the reason code. The tcsettables 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 tcsettables callable service is used with terminal devices that support the forward code page names and tables CPCN capability. Use the tcgetcp (BPX1TGC, BPX4TGC) callable service to determine the terminal device CPCN capability.
During its processing of the tcsettables service, the OCS rty device driver applies the new code page names when the outbound data queue is drained. When this occurs, the rty input data queue is also flushed, and the new conversion environment takes effect.
Source (ASCII) code page | Target (EBCDIC) code page |
---|---|
IBM-eucJP | IBM-939 |
IBM-932 | IBM-939 |
SIGTTOU processing | Expected behavior |
---|---|
Default or signal handler | The SIGTTOU signal is generated. The function is not performed. Return_value is set to -1, and Return_code is set to EINTR. |
None.
For an example using this callable service, see BPX1TST (tcsettables) example.