Example Of Display; Figure 6.2. Example Of Statements Used For Display - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

Example of DISPLAY
When the last line on the screen is filled, the next character string will be
displayed in line 3; succeeding character strings will follow until the last line
is filled, and wrap around again.
2. When you use DISPLAY, the maximum number of characters that will
appear on one line of the work station display is 78. If a character string is
greater than 78 characters, the remaining characters will be sent to
succeeding lines in 78-character increments until the entire string is
displayed.
3. You can use DISPLAY and ACCEPT for the printer and the work station
screen. DISPLAY transmits character strings to the printer by default
unless you specifically specify the screen.
4. If you specify the printer as the I/O device in your program either implicitly
or explicitly, the operator can re-direct the DISPLAY transmission to the
work station screen when the COBOL program is loaded.
5. If you specify the work station screen, the operator cannot re-direct
transmission to the printer.
6. ACCEPT can process only 78 characters of data. Any data over 78
characters will be truncated.
7. The printer cannot be shared with another program while a DISPLAY to
the printer is being executed.
Figure 6.2 gives an example of the statements needed to display data on a
work station screen.
IDENTIFICATION DIVISION.
PROGRAM-ID.
SEND-RECEIVE.
AUTHOR.
J BELL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370 WITH DEBUGGING MODE.
OBJECT-COMPUTER. IBM-5280.
SPECIAL-NAMES.
CONSOLE IS SCREEN.
PROCEDURE DIVISION.
IF COMM-ERROR
0
DISPLAY
"RECORDS SENT SUCCESSFULLY; NOW AWAITING RESPONSE"
UPON SCREEN.
Figure 6.2. Example of statements used for DISPLAY
Chapter 6. Other I/O
6- 3

Advertisement

Table of Contents
loading

Table of Contents