Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Terminal and File Access Types
The following SETMODE operation relinquishes exclusive access to
a terminal:
operation
= 12, set terminal access type and file access
type
parameter-1
= 0, terminal access type is normal
parameter-2
= 0, file access type is normal
An application program should use this feature only if it owns
BREAK. If a process that does not own BREAK is deleted, break
access is not cleared. Other processes with normal access are
then prevented from accessing the terminal.
Example
A process needs temporary exclusive access to a terminal. The
following call to SETMODE is made:
CALL SETMODE ( HOME^TERM^NUM, SET^ACCESS, BREAK^MODE,
BREAK^ACCESS );
Other operations with normal access are rejected.
When the process no longer requires exclusive access to the
terminal, it permits normal access with the following call to
SETMODE:
CALL SETMODE ( HOME^TERM^NUM, SET^ACCESS, NORMAL^MODE,
NORMAL^ACCESS );
Figure 4-4 illustrates exclusive access using BREAK.
4-23