Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
Figure 11–7 Accepting Data with the ON EXCEPTION Option
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−6095−GE
Enter any number in this range: −999.999 to +999.999
1234.567−
Valid range is: −999.999 to +999.999
PLEASE try again... press your carriage return key to continue
A DISPLAY statement within an ACCEPT [NOT] ON EXCEPTION statement
must be terminated, with, for example, END-DISPLAY.
11.2.5.3 Protecting the Screen
You can use the PROTECTED phrase in an ACCEPT statement to limit the
number of characters that can be entered. This phrase prevents overwriting or
deleting parts of the screen. For more information about using the PROTECTED
phrase, refer to the ACCEPT statement in the Compaq COBOL Reference
Manual.
If you use this phrase, and you try to type past the rightmost position of the
input field or delete past the left edge of the input field, the terminal bell sounds
and the screen cursor does not move. You can accept the data on the screen
by pressing a legal terminator key, or you can delete the data by pressing the
DELETE key. If you specify PROTECTED WITH AUTOTERMINATE, the
ACCEPT operation terminates when the maximum number of characters has
been entered unless a terminator has been entered prior to this point. For more
information on legal terminator keys, refer to the CONTROL KEY phrase of the
ACCEPT statement in the Compaq COBOL Reference Manual.
You can also use the REVERSED, BOLD, BLINKING, or UNDERLINED
attributes with the PROTECTED phrase. Using these attributes lets you see
the size of the input field on the screen before you enter data. The characters you
enter also echo the specified attribute.
You can specify the NO BLANK and FILLER phrases with the PROTECTED
phrase. The NO BLANK phrase specifies that the protected input field is not to
be filled with spaces until after the first character is entered. The FILLER phrase
initializes each character position of the input field with the filler character
specified.
11–14 Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......