Microsoft KB Archive/32483

Mixed-Language Return Codes and Parameters in COBOL 3.0

PSS ID Number: Q32483 Article last modified on 04-21-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: With compiler dialect directives OSVS and VSC2, COBOL Version 3.0 uses the special register RETURN-CODE, as in the following example: CALL “FRED”. IF RETURN-CODE = 4 THEN EXHIBIT FRED. /* C code: */ FRED { RETURN(4); } The default is a 2-byte return code in the AX (AL, standard in Microsoft C and FORTRAN) register.

More Information: It is also possible to obtain 4-byte return codes. Because there is no definitive register-usage standard, it is important to be aware of the following specific language-software assumptions: COBOL - BX:AX Lattice - AX:BX Microsoft - DX:AX To receive 4-byte return codes, compile with the RTNCODE-SIZE(4) compiler directive and specify a language prefix in the literal CALL.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.