Microsoft KB Archive/38496

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

COBOL 2.2 ACCEPT FROM TIME Doesn’t Return Fractional Seconds

PSS ID Number: Q38496 Article last modified on 04-20-1993

2.20 MS-DOS

The information in this article applies to:
- Microsoft COBOL for MS-DOS, version 2.2

Summary: When you compile the program below in Microsoft COBOL Version 2.2, the ACCEPT <identifier> FROM TIME statement always returns “00” in the fractional seconds. The ACCEPT <identifier> FROM TIME statement returns the proper fractional value in Microsoft COBOL Version 3.0. Microsoft has confirmed this to be a problem in Version 2.2. This problem was corrected in Version 3.0.

More Information: The following is a code example: IDENTIFICATION DIVISION. PROGRAM-ID. TIMETEST. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-TIME. 05 HRS PIC XX. 05 MIN PIC XX. 05 SEC PIC XX. 05 FRC PIC XX. PROCEDURE DIVISION. MAIN-PROGRAM. ACCEPT WS-TIME FROM TIME. DISPLAY WS-TIME. STOP RUN.

Additional reference words: 2.20 Copyright Microsoft Corporation 1993.