Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Terminal and File Access Types
2. After a BREAK message is received, the application process
specifies that subsequent file operations to the terminal
have break access. The application process can then communi-
cate with the terminal in the usual manner. Attempts by
other processes with normal access will be rejected with an
error indication.
The following SETMODE operation specifies the file access
type for this type of break handling:
operation
= 12, set file access type
parameter-1
is omitted
parameter-2
= 1, file access type is BREAK
3. When BREAK processing is finished, the application process
returns both the file access type and the terminal access
type to normal.
The SETMODE operation that restores terminal and file access
to normal is:
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
Repeat steps 2 and 3 for each break message received.
4. When the process finishes monitoring BREAK, it returns BREAK
to the previous owner with SETMODE 11, as described above in
"Using Break (Multiple Processes per Terminal)." Note that
the previous owner is characterized by an internal number
rather than by the owner's
cpu, pin
.
If the owner of BREAK closes the file with break access
specified, the terminal returns to normal access mode. This is
true when the close is the result of a CLOSE procedure call or of
the process control STOP procedure.
Example
Unless more than one process is accessing a terminal, specify
normal file access as follows:
4-20