On Thu, 27 Feb 2014 15:41:24 -0800, Frank Swarbrick <[email protected]> wrote:
>I guess would should still be free to use RETURN-CODE to pass data between >caller and callee. But I still think it's not a great idea, because one then >has to remember to set RETURN-CODE back to zero if they don't want the >callee's return code to be passed back to the operating system. (unless, of >course, they call another subroutine which implicitly sets RETURN-CODE to >zero!) When a Cobol program calls another program, it ALWAYS sets RETURN-CODE to the value in register 15 upon return from the called program. Whether or not the called program sets RETURN-CODE before exiting makes no difference. Whether or not you want to check RETURN-CODE upon return from the called program, you should realize that there is only one RETURN-CODE special register and it can be set in two ways: either explicitly by moving something to it or implicitly by making a call. -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
