Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

X 1.1.3.5 RETURN-CODE




X The RETURN-CODE special register can be used to pass a return code to the
X calling program or operating system when the current COBOL program ends.
X When a COBOL program ends:


X The RETURN-CODE special register has the implicit definition:


 X   01  RETURN-CODE GLOBAL PICTURE S9(4) USAGE BINARY VALUE ZERO


X The following are examples of how to set the RETURN-CODE special register:


 X   COMPUTE RETURN-CODE = 8


X or


 X   MOVE 8 to RETURN-CODE.


X When used in nested programs, this special register is implicitly defined
X in the outermost program.


X Note: The RETURN-CODE special register does not return a value from an
X invoked method or from a program that uses CALL...RETURNING. For more
X information, see "INVOKE Statement" in topic 6.2.22 or "CALL Statement" in
X topic 6.2.4.


X You can specify the RETURN-CODE special register in a function wherever an
X integer argument is allowed.


X The RETURN-CODE special register will not contain return code information:



Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.