|
HP COBOL Reference Manual
FILLER Phrase (Format 3)
- You can use the FILLER phrase only when you also specify the
PROTECTED phrase.
- The FILLER phrase initializes each character position of the input
field with the character specified in prot-fill-lit. As you
enter characters, the filler characters are replaced by your input. If
you strike the delete key after you have entered data, the position
made available by the delete operation is refilled with the character
specified in prot-fill-lit. When you terminate the ACCEPT
operation, any remaining filler characters are replaced by space
characters.
- When you use the FILLER phrase with the NO BLANK phrase, the input
field is filled with the character specified in prot-fill-lit,
after you have entered the first character.
- The FILLER phrase is not allowed to be used with the EDITING
phrase. If both are present, the FILLER phrase is ignored.
NO ECHO Phrase (Format 3)
- The NO ECHO phrase suppresses the display of input characters on
the screen.
- When you do not use the NO ECHO phrase, valid input characters are
displayed on the screen as they are typed.
- When the EDITING phrase is used, the field editing functions still
take place, but the display field is not modified.
DEFAULT Phrase (Format 3)
- The DEFAULT phrase specifies default input values when no
characters are entered from the terminal. Null input is signaled by
entering a legal terminator key that is not preceded by data. (See the
general rules for the CONTROL KEY phrase.)
- When the null input condition occurs, def-src-lit or the
value of def-src-item is moved to dest-item according
to theMOVE rules. When the move occurs, the specified default value is
not displayed on the terminal screen.
- Conversion of the DEFAULT item will occur if CONVERSION is
specified.
- When the EDITING phrase is used, the default value is displayed in
the input field. The value can be blank-filled on the right or
truncated, depending on the relative lengths of the default value and
the input field.
- When the EDITING phrase is used and a terminator is entered, the
contents of the input field are moved to dest-item according
to the MOVE rules.
CURRENT VALUE Phrase (Format 3)
- The CURRENT VALUE phrase can be used only when you specify the
DEFAULT phrase.
- The CURRENT VALUE phrase specifies that the default input value is
the initial value of the ACCEPT destination item.
- The value of the ACCEPT destination item is the same as it was
before the execution of the ACCEPT statement if all the following
conditions exist:
- You specify the CURRENT VALUE phrase.
- The EDITING phrase is not used.
- The default path is taken.
- When you use the EDITING phrase, dest-item can be
alphabetic, alphanumeric, or non-floating-point numeric. In this case,
the input field is always updated to be what is on the screen. It
cannot be numeric edited, alphanumeric edited, COMP-1, or COMP-2; if it
is, the program will ignore the DEFAULT and CURRENT VALUE phrases.
CONTROL KEY Phrase (Format 3)
- When you use the CONTROL KEY phrase in Format 3, the operator must
terminate data input with a legal terminator key. Ctrl/Z is a legal
terminator if ON EXCEPTION or AT END is specified.
- When you do not use the CONTROL KEY phrase in Format 3, the
operator can terminate data input only with RETURN or TAB.
- When the EDITING phrase is used, the keys which invoke field
editing functions do not terminate the ACCEPT statement and are not
stored in key-dest-item.
Format 4
- When any key other than a valid control key is entered: (1) the
contents of key-dest-item do not change, and (2) the terminal
bell rings. This occurs until a proper control key is entered.
Format 5
- The end-of-file indication is considered a normal, successful
termination.
- The data in each field is converted and validated as you leave the
field. The updated value is displayed in the field if the SECURE clause
is not specified.
Conversion occurs in the following instances:
- If the field is not numeric and the JUSTIFIED clause is specified,
the data is right-justified.
- If the field is numeric or numeric edited, the data is formatted
according to the PICTURE, SIGN, and BLANK WHEN ZERO clauses. This
formatting is always successful because only the following characters
from the data are formatted:
- 0--9
- Period (.), if DECIMAL POINT IS COMMA is not specified
- Comma (,), if DECIMAL POINT IS COMMA is specified
- Sign (+, - , DB, db, CR, or cr)
Note that only the first occurrence of the period, comma and sign
is accepted; multiple occurrences are ignored. Also, to the left and
right of the decimal point excess leftmost digits and excess rightmost
digits are truncated, respectively.
Validation occurs when the FULL or REQUIRED clauses are specified.
- The default value for each field is displayed when the operator
enters the field for the first time during an ACCEPT statement. The
default value is determined as follows:
- If the USING clause is specified, the default is the current value
of the USING item.
- If the TO and FROM clauses are specified, the default is the
current value of the FROM item.
- If only the TO clause is specified:
- The default is ZEROES (or SPACES if BLANK WHEN ZERO is specified)
for numeric and numeric edited items.
- The default is SPACES for alphabetic, alphanumeric, and
alphanumeric edited items.
- If the operator types a terminator key prior to entering data in
every field, the default value for each untouched field is moved to the
field's destination item.
- The operator is limited to entering the number of characters
specified by the PICTURE clause. If the operator attempts to type
beyond the rightmost position of the field: (1) the cursor remains on
the position to the right of the rightmost position and (2) the last
character of the field is overwritten with the new character.
- There are special keys that allow the operator to edit data within
a field and to move among the fields within a screen. Except where
noted otherwise, the operator is allowed to move among the fields in
the order in which the fields are defined within the Screen Description
Entry.
The keys defined on OpenVMS Alpha and I64 systems are
described in Table 6-10.
Table 6-10 SCREEN SECTION Keys for OpenVMS Alpha and I64 Systems
Key |
Description |
Left,
Ctrl/B,
Ctrl/D
|
Move left (if not at beginning of field, move left within field; if at
beginning of field, move to previous field).
|
Right,
Ctrl/F
|
Move right (if not at end of field, move right within field; if at end
of field, move to next field).
|
Up
|
Move to the nearest field that is positioned above the current cursor
position; this movement ignores the order in which fields are defined
within the Screen Description Entry and is based simply on the location
of items on the screen.
|
Down
|
Move to the nearest field that is positioned below the current cursor
position; this movement ignores the order in which fields are defined
within the Screen Description Entry and is based simply on the location
of items on the screen.
|
Ctrl/P,
Ctrl/L
|
Move to previous field.
|
TAB,
Ctrl/N,
Ctrl/I
|
Move to next field.
|
Ctrl/H,
Ctrl/W
|
Move to beginning of line (if at beginning of line within a
multiple-line field, move to beginning of previous line).
|
Ctrl/E
|
Move to end of text (if at end of text within a multiple-line field,
move to end of text on next line).
|
Ctrl/A,
Ctrl/T
|
Toggle insert and overstrike mode (if $ SET NOCONTROL=T).
|
Ctrl/K
|
Erase to end of line (always performed in insert mode).
|
Ctrl/U,
Ctrl/X
|
Erase to beginning of line (always performed in insert mode).
|
CR,
Ctrl/M,
Ctrl/Z
|
Terminate input. <>
|
The keys defined on Tru64 UNIX systems are described in
Table 6-11.
Table 6-11 SCREEN SECTION Keys for Tru64 UNIX Systems
Key |
Description |
Left,
Ctrl/B,
Ctrl/D
|
Move left (if not at beginning of field, move left within field; if at
beginning of field, move to previous field).
|
Right,
Ctrl/F
|
Move right (if not at end of field, move right within field; if at end
of field, move to next field).
|
Up
|
Move to the nearest field that is positioned above the current cursor
position; this movement ignores the order in which fields are defined
within the Screen Description Entry and is based simply on the location
of items on the screen.
|
Down
|
Move to the nearest field that is positioned below the current cursor
position; this movement ignores the order in which fields are defined
within the Screen Description Entry and is based simply on the location
of items on the screen.
|
Ctrl/P,
Ctrl/L
|
Move to previous field.
|
TAB,
Ctrl/N,
Ctrl/I
|
Move to next field.
|
Ctrl/A,
Ctrl/H,
Ctrl/W
|
Move to beginning of line (if at beginning of line within a
multiple-line field, move to beginning of previous line).
|
Ctrl/E
|
Move to end of text (if at end of text within a multiple-line field,
move to end of text on next line).
|
Ctrl/T
|
Toggle insert and overstrike mode.
|
Ctrl/K
|
Erase to end of line (always performed in insert mode).
|
Ctrl/U,
Ctrl/X
|
Erase to beginning of line (always performed in insert mode).
|
CR,
Ctrl/M
|
Terminate input. <>
|
- The description of insert and overstrike editing for the EDITING
Phrase (Format 3) also applies here.
|