The ACCEPT statement makes low-volume data available to the program.
The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are
COBOL language additions that facilitate video forms design and data
handling.
Format 3 -
ACCEPT dest-item
{| { line-num } |}
{| FROM LINE NUMBER { line-id [ PLUS [ plus-num ] ] } |}
{| { PLUS [ plus-num ] } |}
{| { column-num } |}
{| FROM COLUMN NUMBER { column-id [ PLUS [ plus-num ] ] } |}
{| { PLUS [ plus-num ] } |}
{| ERASE [TO END OF] { SCREEN } |}
{| { LINE } |}
{| WITH BELL |}
{| UNDERLINED |}
{| BOLD |}
{| WITH BLINKING |}
{| PROTECTED [| SIZE { prot-size-lit } |] |}
{| [| { prot-size-item } |] |}
{| [| WITH AUTOTERMINATE |] |}
{| [| WITH EDITING |] |}
{| [| WITH NO BLANK |] |}
{| [| WITH FILLER prot-fill-lit |] |}
{| WITH CONVERSION |}
{| REVERSED |}
{| WITH NO ECHO |}
{| DEFAULT IS { def-src-lit } |}
{| { def-src-item } |}
{| { CURRENT VALUE } |}
{| CONTROL KEY IN key-dest-item |}
{ [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment ] }
{ [ AT END stment ] [ NOT AT END stment ] }
[ END-ACCEPT ]
1 – dest-item
is the identifier of a data item into which data is accepted.
2 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
3 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
4 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
5 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6 – plus-num
is a numeric literal that increments the current value for line or column position, or that increments the value of line-id or column-id. Plus-num can be zero or a positive integer.
7 – prot-size-lit
is a numeric literal that specifies the maximum length of the video screen field into which data can be typed. Prot-size-lit must be a positive integer. It cannot be zero.
8 – prot-size-item
is the identifier of a numeric integer data item that specifies the maximum length of the video screen field into which data can be typed. It must be a positive integer; it cannot be zero.
9 – prot-fill-lit
is a single character alphanumeric literal that is used to initialize each character position of a protected video screen field into which data can be typed.
10 – def-src-lit
is a nonnumeric literal or a figurative constant. However, it cannot be the figurative constant ALL literal.
11 – def-src-item
is the identifier of an alphanumeric data item.
12 – key-dest-item
is the identifier of a data item that defines a control key. Key-dest-item must specify an alphanumeric data item at least four characters in length.
13 – stment
is an imperative statement executed for an AT END, NOT AT END, ON EXCEPTION or NOT ON EXCEPTION condition.