SNAX/APN Application Programming Manual

The ITI Interface
SNAX/APN Application Programming Manual420111-001
3-7
Setting Terminal Access Mode and File Access Type
(SETMODE Function 12)
Setting Terminal Access Mode and File Access Type
(SETMODE Function 12)
When a user presses the BREAK key at the terminal, a Break-on-device message is sent
to the owner of BREAK (the process that is enabled for the BREAK key). Typically,
when the BREAK owner receives the message, it places the terminal in BREAK mode
by using SETMODE function 12. When the terminal is in BREAK mode, only the
process that has established BREAK access can communicate with the terminal. An
application establishes BREAK access to a terminal also by using SETMODE
function 12.
param1
sets the terminal access mode.
0 Places the terminal in normal mode (any application that has the terminal open
can communicate with the terminal).
1 Places the terminal in BREAK mode (only the application that has established
BREAK access can communicate with the terminal).
param2
sets the file access type.
0 Establishes normal access to the terminal.
1 Establishes BREAK access to the terminal.
Obtaining SNA Sense Codes (SETMODE Function 53)
In an SNA environment, error status from a device is passed to an application process in
the form of a 4-byte sense code. In a Tandem SNAX/APN environment, an application
process that uses the ITI protocol receives a file-system error instead. To obtain the
SNA sense code that caused the file-system error, the application issues the following
SETMODE procedure call:
params
returns a 4-byte SNA sense code in the array.
For a list of SNA sense codes and the file-system errors they generate in the SNAX/APN
environment, see Appendix B in this manual.
CALL SETMODE ( filenum , 12 , param1 , param2 ) ;
CALL SETMODE ( filenum , 53 , , , params ) ;