An extended ACCEPT statement has one of the following:
An ACCEPT statement is not an extended ACCEPT statement if it:
Format 7 (Workstation I/O) *----------------------* V + ->->--ACCEPT--identifier-1--*----------------------*----------> *-line-col-phrase------* + + *-FROM CRT-------------* + + *-MODE--*----*--BLOCK--* + *-IS-* + + + *-with-phrase----------* ->---*-------------------------------------------*-----------> *-*----*-EXCEPTION imperative-statement-1---* *-ON-* ->---*-----------------------------------------------*-------> *-NOT-*----*-EXCEPTION imperative-statement-2---* *-ON-* ->---*------------*------------------------------------------><- *-END-ACCEPT-* where line-col-phrase is: *--------------------------------------* V + ->->--*--*----*-*-LINE--*--------*--*-identifier-2-*---*--*---><- + *-AT-* + *-NUMBER-* *-integer-1----* + + + + + + + *-*-COLUMN-*-*--------*-*-identifier-2-* + + *-COL----* *-NUMBER-* *-integer-1----* + + + *--AT--*-identifier-3-*-----------------------------* *-integer-2----* where with-phrase is: *---------------------------------------------* V + ->->--WITH--*-*-AUTO------*-------------------------------*---><- + *-AUTO-SKIP-* + + + *-*-BELL-*------------------------------------* + *-BEEP-* + + + *---BLINK-------------------------------------* + + *-*-FULL---------*----------------------------* + *-LENGTH-CHECK-* + + + *---HIGHLIGHT---------------------------------* + + *-*-REQUIRED----*-----------------------------* + *-EMPTY-CHECK-* + + + *---REVERSE-VIDEO-----------------------------* + + *-*-SECURE--*---------------------------------* + *-NO-ECHO-* + + + *---UNDERLINE---------------------------------* + + *---RIGHT-JUSTIFY-----------------------------* + + *---SPACE-FILL--------------------------------* + + *---TRAILING-SIGN-----------------------------* + + *---UPDATE------------------------------------* + + *---ZERO-FILL---------------------------------* + + *---SIZE--*----*--*-identifier-4-*------------* + *-IS-* *-integer-3----* + + + *---PROMPT--*--------------*-*-identifier-5-*-* + *-CHARACTER IS-* *-literal------* + + + *-*-FOREGROUND-COLOR--*-*----*-integer-4------* + *-FOREGROUND-COLOUR-* *-IS-* + + + *-*-BACKGROUND-COLOR--*-*----*-integer-5------* + *-BACKGROUND-COLOUR-* *-IS-* + + + *---LEFT-JUSTIFY------------------------------*
Identifier-1 is a data item whose value may be updated.
Fields accepted or displayed require an attribute byte before and after the field. For this reason, you cannot use line 1 and column 1 for data because that position is required for the first display attribute. The lowest position that you can use on the screen for data is line 1, column 2.
The AT phrase indicates the absolute address on the screen at which the ACCEPT operation is to start. If you do not specify the AT phrase, the ACCEPT operation starts at line 1, column 2. The AT phrase does not indicate the starting position of the initial display attribute.
The LINE phrase specifies the line number at which the screen item starts on the screen. The LINE and COLUMN phrases can appear in any order.
Identifier-2 and integer-1 must be unsigned numeric integers with a value greater than or equal to zero. If the value for LINE or COLUMN is negative, the absolute value is taken. Identifier-2 or integer-1 is moved into a PIC 9(3) number.
The COLUMN phrase specifies the column number at which the screen item starts on the screen. The LINE and COLUMN phrases can appear in any order.
COL is an abbreviation for COLUMN.
Identifier-3 must be a PIC 9(4) or a PIC 9(6) field. Integer-2 must be a 4- or 6-byte numeric field. If identifier-3 or integer-2 is 4 digits long, the first 2 digits specify the line, and the second 2 digits specify the column. If identifier-3 or integer-2 is 6 digits long, the first 3 digits specify the line, and the second 3 digits specify the column.
The FROM CRT phrase indicates that the ACCEPT statement is extended.
The MODE IS BLOCK phrase indicates that the identifier is treated as an elementary item; even if it is a group item, it is accepted as one item.
The WITH phrase allows you to specify options for the ACCEPT operation. If you specify more than one item prior to this phrase, only the item immediately before the phrase is affected by it.
When a field has been filled by operator input, the AUTO phrase automatically steps the cursor to the next input field, rather than waiting for a terminating character to be entered. If the field is the last in a group, AUTO-SKIP acts as if the ENTER key had been pressed. You can use AUTO and AUTO-SKIP interchangeably.
If you specify the BELL phrase, an audible alarm sounds each time the item containing this phrase is accepted.
You can use BELL and BEEP interchangeably.
If you specify the BLINK phrase, the screen item blinks when it appears on the screen.
If you specify the FULL phrase, the operator must either leave the screen item completely empty or fill it entirely with data. The FIELD-EXIT, FIELD+, and FIELD- keys are not allowed. Any attempt to use the delete key on the data within the input field, followed by the enter key, is also not allowed. The FULL phrase can be satisfied by data that is initially displayed.
If this phrase is specified at a group level, it applies to all suitable subordinate elementary items.
The FULL phrase is effective during the execution of any ACCEPT statement.
You can use FULL and LENGTH-CHECK interchangeably.
If you specify the HIGHLIGHT phrase, the screen item is in high-intensity mode when it appears on the screen.
Use the REQUIRED phrase to ensure that the field does not remain empty.
For alphanumeric items, this means that the field must contain at least one character other then a space or a hexadecimal zero. For numeric items, the field must contain a value other than zero.
If a field remains empty when this phrase is specified, a run-time message will be issued which requires the operator to press the reset key and then re-enter the data.
You can use REQUIRED and EMPTY-CHECK interchangeably.
If you specify the REVERSE-VIDEO phrase, the screen item is displayed in reverse image.
The SECURE phrase prevents operator-keyed data from appearing on the screen. You may specify this phrase on a group screen item, in which case it applies to all suitable elementary items which are subordinate to that item. When you specify the SECURE phrase, only spaces and the cursor appear on the screen.
You can use SECURE and NO-ECHO interchangeably.
If you specify the UNDERLINE phrase, the screen item is underlined when it appears on the screen.
If you specify the RIGHT-JUSTIFY phrase, operator-keyed characters are moved on the screen to the rightmost character positions of the field. Trailing spaces and trailing hexadecimal zeros are removed.
This phrase affects only non-edited data items. It takes effect upon display of the initial data in the data item and also upon termination of the ACCEPT operation. This is the only way in which numeric data is handled.
If you defined the data item with the JUSTIFIED RIGHT clause in the DATA DIVISION, the data item is treated as if you had specified the RIGHT-JUSTIFY phrase.
The SPACE-FILL phrase pertains to non-edited data items, and converts trailing hexadecimal zeros to spaces. The items appear on the screen with zero-suppression in all character positions. This takes effect upon display of initial data in the data item and again when the ACCEPT operation into the data item terminates. This phrase has no affect on edited fields.
If you specify the TRAILING-SIGN phrase, the operational sign appears in the rightmost character position of the field. This takes effect upon display of initial data in the data item and also upon termination of the ACCEPT operation. This phrase affects only signed, non-edited numeric data items. If you do not specify this phrase, the sign precedes the number.
If you specify the UPDATE phrase, the current contents of the data item are displayed before the operator is prompted to key in any new data. The initial data is then treated as though it were operator-keyed. If you do not specify the UPDATE phrase, and if the SECURE phrase was not coded, the initial data will be displayed.
UPDATE is in effect by default unless you code the SECURE phrase.
If you specify the ZERO-FILL phrase, non-edited items appear on the screen with no zero-suppression. For left-justified data, trailing spaces and trailing hexadecimal zeros are converted to zeros. For right-justified data, leading spaces are converted to zeros. This takes effect upon display of initial data in the data item and again when the ACCEPT operation into the data item terminates. It has no affect on edited fields.
This phrase is syntax checked but is treated as documentation by the compiler.
If you specify the ON EXCEPTION phrase, imperative-statement-1 is executed if the ACCEPT operation finishes with anything other than a normal completion (that is, if CRT Status Key 1 is other than zero.
Using the ON EXCEPTION phrase does not prevent the generation of a run-time message for such conditions as workstation boundaries or out-of-screen ranges.
If you specify the NOT ON EXCEPTION phrase, imperative-statement-2 is executed if the ACCEPT operation finishes with a normal completion.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.