COBOL Manual for TNS and TNS/R Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
29-1
29 Terminal Input and Output
Most interaction between users and an HP system is conducted through video display
terminals. The HP COBOL language has no mechanisms for full-screen block input-
output. On an HP system, a typical application uses Pathway/TS to write requester
programs in SCREEN COBOL to handle terminal input and output and uses
HP COBOL or TAL server programs to handle database input and output.
Occasionally, an HP COBOL process must communicate with a terminal directly.
For very small amounts of data transfer and for free-format collection and reporting of
numeric values, such processes can use the ACCEPT and DISPLAY statements. Each
ACCEPT or DISPLAY statement either specifies a mnemonic name of a device or
defaults to the process’s IN or OUT file, respectively (only if the IN and OUT files are
suitable for ACCEPT and DISPLAY statement use).
If a process needs uninterrupted access to a terminal or wants to determine at run time
which of several terminals to communicate with, the process must declare the terminal
process as a sequential file and operate on it with the usual OPEN, READ, WRITE,
and CLOSE statements.
The system generation process includes operations to define each terminal attached to
an HP system. Each terminal has a device name and a logical device number.
The file system supports transfers from terminals in both page mode and
conversational mode. Conversational mode is easy to use from an HP COBOL
process, but page mode is awkward. The normal way to use page-mode input and
output in conjunction with an HP COBOL process is to write a SCREEN COBOL
requester program and have it communicate with an HP COBOL server process.
Topics:
•
Using ACCEPT and DISPLAY With a Terminal
•
Using a Terminal as a File
•
Prompting the Terminal Operator for Input
•
Sharing a Terminal
•
Getting Break Ownership
•
Transferring Break Ownership
•
Communicating With an Operator or Process
•
Logging Program Activity Information to a Terminal