“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.