Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/37476

From BetaArchive Wiki

COBOL 3.0 Requires Special Definition for CRT STATUS

PSS ID Number: Q37476 Article last modified on 04-20-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 code sample below shows the correct definition of the variable in working storage that holds the CRT STATUS. If the definition is altered so that CRT STATUS uses more or less than three bytes, the compiler generates a “CRT-STATUS missing or illegal” error message. Note: CRT-STATUS is not available in Microsoft COBOL versions earlier than Version 3.0. The following code shows the correct definition for CRT-STATUS:

  $SET ANS85
   SPECIAL-NAMES.
        CRT STATUS IS CRT-STATUS.
   WORKING-STORAGE SECTION.
   01 CRT-STATUS.
      05 FIRST-BYTE   PIC X.
      05 SECOND-BYTE  PIC 99 COMP-X.
      05 THIRD-BYTE   PIC 99 COMP-X.
   PROCEDURE DIVISION.
   STOP RUN.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.