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 4 -
ACCEPT CONTROL KEY IN key-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 |}
{ [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment ] }
{ [ AT END stment ] [ NOT AT END stment ] }
[ END-ACCEPT ]
1 – 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.
2 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
3 – 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.
4 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
5 – 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.
6 – 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.
7 – stment
is an imperative statement executed for an AT END, NOT AT END, ON EXCEPTION or NOT ON EXCEPTION condition.