Compaq COBOL AAQ2G1FTK User Manual

Page 396

Advertising
background image

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions

Figure 11–2 Screen After the ERASE Statement Executes

12345678901234567890123456789012345678901234567890123456789012345678901234567890

4

1

2

3

5

6

7

8

1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

ZK−6091−GE

Employee number:

Example 11–2 Cursor Positioning

IDENTIFICATION DIVISION.
PROGRAM-ID.

LOCATE.

ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 COL-NUM

PIC 99

VALUE 4.

PROCEDURE DIVISION.
A00-OUT-PARA.

DISPLAY "Employee name:"

LINE 19
COLUMN COL-NUM
ERASE SCREEN.

DISPLAY " " LINE 24

COLUMN 1.

STOP RUN.

Note

The default initial cursor position is in the upper left corner of the screen.
Compaq COBOL moves the cursor to this initial position just prior to
the execution of the first ACCEPT or DISPLAY statement. This is true
regardless of the format of the statement, unless you specify the cursor
position.

In Example 11–2 and in Figure 11–3, "Employee name:" is displayed on line 19
starting in column 4.

11–6 Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms

Advertising