X 6.1.1 Requirements for a Method Procedure Division
X When using a Method Procedure Division, you need to know that:
- X You can use the EXIT METHOD statement or the GOBACK statement to
X return control to the invoking method or program. An implicit EXIT
X METHOD statement is generated as the last statement of every method
X procedure division.
X For details on the EXIT METHOD statement, see "EXIT METHOD Statement"
X in topic 6.2.15.
- X You can use the STOP RUN statement (which terminates the run unit) in
X a method.
- X You can use the RETURN-CODE special register within a method Procedure
X Division to access return codes from CALLed subprograms, but the
X RETURN-CODE value is not returned to the invoker of the current
X method. Use the Procedure Division RETURNING data name to return a
X value to the invoker of the current method. For details, see the
X discussion of RETURNING data-name-2 under "The Procedure Division
X Header" in topic 6.1.2.
X You cannot specify the following statements in a method PROCEDURE
- X ALTER
- X ENTRY
- X EXIT PROGRAM
- X GO TO without a specified procedure name
- X SEGMENTATION
- X USE FOR DEBUGGING
X The following special registers are allocated on a per-invocation basis
X for methods; thus, they are in initial state on each method entry.
- X ADDRESS OF (for each record in the Linkage Section)
- X RETURN-CODE
- X SORT-CONTROL
- X SORT-CORE-SIZE
- X SORT-FILE-SIZE
- X SORT-MESSAGE
- X SORT-MODE-SIZE
- X SORT-RETURN
- X TALLY
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
IBM Hardware |
IBM System z Redbooks
How to order publications
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Download IBM Softcopy Librarian
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.