Microsoft KB Archive/31211

Initialized 99/99/99 Fields DISPLAY as 999999

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

2.20 MS-DOS

Summary: The map 99/99/99 is initially set to 12/12/87. When a screen is displayed that uses this map, the field appears blank. When information is entered into the field, it displays as 999999. After accepting a value, the field assumes the edit picture, i.e., 08/23/87. This is program design for the product. Both the screen description in the WORKING-STORAGE SECTION and the screen item are numeric-edited items in the program (i.e., you type all digits). This is an illegal MOVE, so the ACCEPT does not use the source until the screen is redisplayed. On DISPLAY , it will convert to a regular number so the number can be displayed using the edited picture clause in the screen section. To work around this problem, do the following: 1. Put the slashes in the screen itself as literals. 2. Use the AUTO clause to skip to the next field of the date. 3. Break apart the date into month, day, and year. The edit characters should be removed from the WORKING-STORAGE variable. However, displays of screens that contain WORKING-STORAGE edit items do work correctly; if you put something in the program to suspend execution, the DISPLAY displays 12/12/87.

Additional reference words: 2.20 Copyright Microsoft Corporation 1993.