Microsoft KB Archive/32427

How ACCEPT Handles Alphanumeric Fields

PSS ID Number: Q32427 Article last modified on 04-21-1993

3.00 MS-DOS

Summary: The following information describes how the ACCEPT statement is executed on alphanumeric fields in Microsoft COBOL Version 3.0: The term “alphanumeric field” is used here to cover all alphanumeric, alphabetic and alphanumeric-edited fields. For the purposes of ACCEPT, an alphanumeric-edited field is treated as a PIC X(n) field of the same length. Any insertion symbols, such as “/” or “0” are ignored and treated as an X. Therefore, a field defined as PIC XX0XX0XX will be treated as if it were specified as PIC X(8). If the field is defined as PIC A(n), only the characters “A” to “Z”, “a” to “z”, and space are allowed in the field. As data is entered in the field, the cursor is advanced to the next character. The cursor can be moved back over the data in the field using the cursor keys. Editing functions such as rubout, delete, etc., are provided. By default, the INS key is set up to toggle between insert mode and replace mode.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.