Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Pathway Application Example
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
8-7
SCREEN COBOL Program for Conversational Mode
SCREEN COBOL Program for Conversational
Mode
The following is a SCREEN COBOL program for conversational terminals:
IDENTIFICATION DIVISION.
PROGRAM-ID. dconv-exp
(1)
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. T16.
OBJECT-COMPUTER. T16, TERMINAL IS CONVERSATIONAL
(2)
SPECIAL-NAMES.
BELL IS BELL,
NOBELL IS NOBELL.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 EMPLOYEE-REC.
05 EMP-LAST-NAME PIC X(10) VALUE SPACES.
05 EMP-FIRST-NAME PIC X(10) VALUE SPACES.
05 EMP-MIDDLE-INIT PIC X(02) VALUE SPACES.
05 EMP-ADDR PIC X(30) VALUE SPACES.
05 EMP-CITY PIC X(10) VALUE SPACES.
05 EMP-STATE PIC X(02) VALUE SPACES.
05 EMP-ZIP PIC 9(05) VALUE ZEROS.
01 WS-ADVISORY PIC X(70) VALUE SPACES.
01 WS-FUNC PIC X(06) VALUE SPACES.
88 WS-SEARCH-REQUEST VALUE "SEARCH".
88 WS-ADD-REQUEST VALUE "ADD".
88 WS-DELETE-REQUEST VALUE "DELETE".
(5) The key that was pressed to terminate the ACCEPT statement has a positional
value associated with it from the ACCEPT statement; the key is put into
TE RMI NATIO N- STAT US .
(6) All unprotected fields are cleared.
(7) This line resets the fields to the initial values and FILL characters declared.
(8) This line causes SERVER-RECORD to blink by setting the BLINK attribute.
(9) This line stops the blinking of SERVER-RECORD by resetting the attribute to
normal.
(10) This line resets the portion of SERVER-RECORD to its original value (blank
line).
(11) This line specifies the server class to be used. This can be a data name in
working storage.
(12) The fields that comprise SERVER-RECORD are displayed.
(13) This line displays ERROR-MSG on the screen as temporary data.
(14) This line sets the BLINK attribute as a temporary attribute and makes the value
of ERROR-MSG blink.