Interactive Terminal I-O COBOL

RM/COBOL supports three distinct modes of transferring data to and from the terminal in an interactive fashion with the terminal operator:

  1. Standard-compliant mode.The Format 1 ACCEPT statement and the Format 1 DISPLAY statement are used to communicate with the terminal in the standard-compliant mode. This mode provides no means of controlling the video and audio features available on many CRT-based terminals but it offers the best chance of complete portability across many different implementations of COBOL. In the standard-compliant mode of terminal communication, the hardware device is driven in a plain line-by-line scrolling fashion, as if it were a typewriter.
  2. Field-oriented mode. The Format 3 ACCEPT statement and the Format 2 DISPLAY statement are used to communicate with the terminal in the field-oriented mode. The field-oriented mode supports a wide variety of language features that allow the user to control the majority of the video and audio features available on many CRT-based terminals. It also allows the user to place individual fields anywhere on the screen and to control completely the appearance of the entire screen or any subregion of the screen.
  3. Screen-oriented mode. The Format 5 ACCEPT statement and the Format 3 DISPLAY statement are used in conjunction with the Screen Section of the Data Division to communicate with the terminal in the screen-oriented mode. This mode provides much the same control over CRT features as does the field-oriented mode. The primary difference between the two is that in the field-oriented mode the added language elements that control CRT features are in the individual ACCEPT or DISPLAY statements, whereas in the screen-oriented mode they are collected together in the Screen Section of the Data Division.

Both the field-oriented and the screen-oriented modes of terminal control are nonstandard extensions to the COBOL language.

The three modes of communicating with the terminal are not intended to be intermixed within a given run unit. The interaction between the three modes is undefined, and intermixing elements from the three modes leads to results that are unpredictable and probably divergent across various implementations of RM/COBOL. A run unit should be planned with one of the modes in mind, and elements of the other modes should be avoided within that run unit.


Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics