Inline method invocation references a temporary data item returned from invocation of a method.
General Format
Syntax Rules
- Inline method invocation must not be specified as a receiving operand.
- Identifier-1 must be of class object; neither the predefined object reference NULL nor a universal object reference may be specified.
- One of the INVOKE statements specified in general rule 1 must be valid according to syntax rules for the INVOKE statement.
- The data item referenced in the RETURNING phrase of the invoked method's PROCEDURE DIVISION header must not be described with the ANY LENGTH clause.
General Rules
- An inline method invocation references a temporary data item with the same class, category, and content as the temp-identifier that would be returned from the execution of the applicable form of INVOKE statement, as follows:
INVOKE identifier-1 literal-1 USING arguments RETURNING temp-identifier INVOKE identifier-1 literal-1 RETURNING temp-identifier INVOKE class-name-1 literal-1 USING arguments RETURNING temp-identifier INVOKE class-name-1 literal-1 RETURNING temp-identifier
where:
- arguments are the operands specified within parentheses in the inline method invocation, if any
- temp-identifier has the same description, class, and category as the RETURNING parameter in the specification of the method identified by literal-1 and either identifier-1 or class-name-1
- temp-identifier is a temporary item that exists for the purpose of effecting the inline invocation in this way and for no other purpose