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 6.2.22.6 RETURNING Phrase




X You can specify the RETURNING phrase for invoking methods written in
X COBOL, C, or in other programming languages that use C linkage
X conventions.


X identifier-6

X The RETURNING data item. Identifier-6:

  • X Must be defined in the DATA DIVISION
  • X Must not be reference-modified
  • X Is not changed if an EXCEPTION occurs
  • X Contains the return value of the invoked method
    
    

X If identifier-6 is specified and the target method is written in
X COBOL, then the target method must have a RETURNING phrase on its
X Procedure Division statement. When the target returns, its return
X value is assigned to identifier-6, using the rules for the SET
X statement if identifier-6 is USAGE IS INDEX, USAGE IS POINTER, USAGE
X IS PROCEDURE-POINTER, or USAGE IS OBJECT REFERENCE; otherwise, the
X rules for the MOVE statement are used.


X Note: The INVOKE... RETURNING data item is an output-only parameter. On
X entry to the called method, the initial state of the PROCEDURE DIVISION
X RETURNING data item has an undefined and unpredictable value. You must
X initialize the PROCEDURE DIVISION RETURNING data item in the invoked
X method before you reference its value. The value that is passed back to
X the invoker is the final value of the PROCEDURE DIVISION RETURNING data
X item when the invoked method returns.


X The RETURN-CODE special register is not set by execution of INVOKE
X statements.


X Conformance Requirements for RETURNING Phrase: The identifiers specified

X on an INVOKE RETURNING phrase and the corresponding method Procedure
X Division RETURNING phrase must satisfy the following:



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.