Microsoft KB Archive/67698

How to Alter Input Field Acceptance Order with SCREENS.EXE

PSS ID Number: Q67698 Article last modified on 01-09-1991

4.00 | 4.00 MS-DOS | OS/2

Summary: Microsoft COBOL version 4.00 screens utility (SCREENS.EXE) allows you to specify the acceptance order of the ACCEPT fields in a screen. If more than one input field exists on a screen, you can define the order of field input when the screen is ACCEPTed. If a field is specified as output only, any acceptance order for that field is ignored. This information applies to Microsoft COBOL Compiler version 4.00 for MS-DOS and MS OS/2.

More Information: Field ordering specifies data acceptance in a sequence different from the standard (top to bottom, left to right). When field ordering is used, all fields with field accept-order 0 are accepted first, followed by all fields with accept order 1, etc. Valid accept-order characters are 0 through 9, A through Z, and a through z. The standard ordering applies to fields with the same accept-order character. To specify acceptance order, select “F10 – FIELD-ORDER” from the main menu. All field definitions will automatically fill with the number 5. Position the cursor within the field you want to have accepted first, and enter the desired character. This changes the acceptance order. Move to the next field and continue. When all field order characters have been specified, select “F10 – FIELD-ORDER” to save ordering, and return to main menu. If the screen contains any repeating fields, these are referred to as a group. A group must be accepted in its entirety; thus, acceptance ordering applies to the whole group. Acceptance order can be specified on a field that is output only; however, it will be ignored when the screen is ACCEPTed. Acceptance ordering is not indicated by a screen descriptor clause, but rather, by the physical positioning of the screen descriptor entries themselves. In the following example, the line referencing DATA-ITEM-3 will be accepted first because it is located first in the source code. DATA-ITEM-2 will be accepted next. For Example: 01 G-SAMPLE. 02 BLANK SCREEN. 02 LINE 1 COL 5 VALUE “TEST SCREEN HEADER”. 02 LINE 5 COL 16 PIC X(24) USING DATA-ITEM-3 AUTO. 02 LINE 3 COL 4 PIC 9 TO DATA-ITEM-2 BLANK ZERO. For more information about the screens utility, see chapter 28 in the “Microsoft COBOL 4.0: Operating Guide.”

Copyright Microsoft Corporation 1991.