A call to FCONTROL with a controlcode
value of 23 or 24 determines whether or not parity is generated
and checked for data transmitted between the system and a terminal.
Use 23 to disable parity, 24 to enable parity. FCONTROL(23) and
(24) do not apply to printers.
Parity can be used for terminals opened programmatically as
well as for those operating in session mode.The default for both
session and programmatic devices is to not generate or check parity,
but to operate in 8-bit pass-through mode.
When parity is enabled, the Asynchronous Serial Communications
software (ASC) generates parity on outgoing data and checks for
parity errors on incoming data. After the parity is checked, the
parity bit is always set to zero because the program using the data
has no need for parity information. Parity checking is handled the
same way in block mode as in character mode.
The type of parity that will be used if parity is enabled
can be modified through a call to FCONTROL(36). If FCONTROL(23)
is used to disable parity after it was previously enabled, a subsequent
call to FCONTROL(24) will reenable the same type of parity, unless
it was changed through another call to FCONTROL(36).
Because parity requires the eighth bit to be set as a parity
bit, it is not possible to use parity with 8-bit character sets.
If binary mode is enabled, the parity bit will be passed through
as data, and no parity checking will occur.
If enabling parity, make sure that your program also requests
the terminal operator to change the physical parity setting of the
terminal to the new setting of the ASC software. Additionally, if
a user wants the terminal to check parity on incoming data, the
local terminal control used to turn parity checking on or off should
be set to ON.
If either of these FCONTROL calls is issued against a terminal
connected via PAD, DTC Telnet, Telnet/iX, or VT (from a PC or HP-UX
local client), the call will return a CCE condition code but will
actually have no effect on the parity which the device is transmitting.
Additionally, the call will return a meaningless value in param.
If a parity error is detected by the ASC software, the current
read is completed in error, and no read data is returned. The ASC
software reports the error to the program reading the data.