Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 9
Echoing Text to the Terminal
Echoing Text to the Terminal
When a user types text at a terminal, the text usually appears on the screen as it is
typed; that is, the text is echoed. Sometimes it is useful, however, for text to be
hidden; for example, when typing in a password. For terminals that are operating in
conversational mode and have terminal echo mode configured at system-generation
time, you can control whether text is echoed.
Use SETMODE function 20 to programmatically control echo mode. The following call
turns off echo mode:
LITERAL ECHO^MODE = 20,
OFF = 0;
.
.
CALL SETMODE(TERMNUM,
ECHO^MODE,
OFF);
IF <> THEN ...
To turn echo mode back on again:
LITERAL ON = 1;
.
.
CALL SETMODE(TERMNUM,
ECHO^MODE,
ON);
IF <> THEN ...
Setting the Transfer Mode
Each terminal has a default transfer mode configured for it at system-generation time.
The mode is either conversational or page. Terminals operating in conversational
mode transfer each character, as typed, to the system buffers. A file transfer is
terminated when a line-termination character (usually a carriage return) is received by
the system.
Terminals operating in page mode store each character, as typed, in an internal buffer.
The entire block of characters is transferred as one continuous stream. The transfer is
usually started when the user presses the ENTER (or SEND or XMIT) key. The file
transfer terminates when a page-termination character (usually a carriage return or
ETX character) is received by the computer system.
You can override the transfer mode set at system-generation time through a call to the
SETMODE procedure with function 8. The following example sets conversational
mode:
LITERAL MODE = 8,
CONVERSATIONAL = 0;
.
.
CALL SETMODE(TERMNUM,