Microsoft KB Archive/40637

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

“OPERAND NOT DECLARED”; Use OSVS with RETURN-CODE in MS-DOS

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

3.00 3.00a MS-DOS

The information in this article applies to:
- Microsoft COBOL for MS-DOS, versions 3.0 and 3.0a

Summary: Page 9-19 of the “Microsoft COBOL Version 3.0 Operating Guide” specifies that unless NOOSVS is set, the compiler generates code to store the value of the AX or BX:AX in a special register name, “RETURN-CODE”. If the compiler directive RTNCODE-SIZE“2” is set, then the value stored in the AX register by the calling program is stored in RETURN-CODE. Use RTNCODE-SIZE“4” to save the BX:AX register.

More Information: Under MS-DOS, if OSVS is not set, the compiler reports the error-message number 012, “OPERAND NOT DECLARED”. However, when compiling under MS OS/2 in the MS-DOS compatibility window, no error message is generated and the code runs correctly. Note: This special register was not available in COBOL versions earlier than Version 3.0.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.