An FCONTROL call with a controlcode
value of 36 is used to specify the type of parity generation and
checking that will be done if parity is enabled for a terminal.
When a terminal is initially opened certain parity conditions
exist, as determined by the terminal type and port configuration,
and whether the port is opened by an operator logon or by a user
program. These parity conditions can be changed through a call to
FCONTROL(36), specifying a number that corresponds to the desired
parity as the value of param. Hewlett-Packard
provides four parity options, called odd, even, ones and zeros.
Table 8-5 “Parity
Settings with FCONTROL(36)” shows the results of
each of these options on input and output data, along with the param
value associated with each option.
When FCONTROL(36) is called, the parity option specified replaces
whatever option was previously associated with the terminal, and
the previous option is returned to the call as the new value of
param. This makes it possible to determine
a terminal's parity setting even with parity disabled.
You can also use the returned value to restore parity to its original
setting when your program ends, since MPE/iX does not reset parity
when a file is closed.
Once you have set the parity option, you can call FCONTROL(24)
to enable parity. Your program should also request the terminal
operator to change the terminal's parity setting to the
new setting of the software. Additionally, if parity is to be checked
on incoming data, the local terminal control that determines whether
or not parity is checked should be set to check parity.
Parity cannot be used with 8-bit character sets.
This call is ignored for devices connected via PAD, DTC Telnet,
Telnet/iX, or VT. If issued against such a device it will return
a condition code of CCE, but no device control action will occur.