Microsoft KB Archive/35438

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:21, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q35438 to Microsoft KB Archive/35438 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ACCEPT Blanks out Field, Compiled with MS(2) Directive

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

3.00 | 3.00 MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, version 3.0

Summary: The following program written for Microsoft COBOL Version 2.2 displays a field, allows you to type over it, and then accepts it. If the same program is compiled with COBOL Version 3.0 using the MS“2” directive, the ACCEPT statement will blank out the field that was displayed previously; therefore, the default value is not shown. Microsoft COBOL Version 2.2 compatibility can be achieved by using the ADISCF utility.

More Information: The following is a workaround for this problem: Invoke ADISCF and follow the following steps: 1. Press F2 for the Alter function. 2. Press F3 for the Accept and Display function. 3. Press F3 for the Individual Options function. 4. Enter 15 for the Enable/Disable Autoclear and Preclear function. 5. Enter 3 for Enable Autoclear. 6. Press ESC to exit screen. 7. Press ESC to exit screen. 8. Press ESC to exit screen. 9. Press F4 to Save. 10. Press F3 to Overwrite Existing Configuration. 11. Press ESC to quit. The following code example demonstrates this problem: IDENTIFICATION DIVISION. PROGRAM-ID. ACCEPT2. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 77 data-item1 pic X(10) VALUE “Hello”. 77 data-item2 pic X(10). PROCEDURE DIVISION. ONLY-PARA. DISPLAY (1, 1) data-item1. ACCEPT (1, 1) data-item2. STOP RUN.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.