Microsoft KB Archive/37476

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

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.