 
 
 
 The EXIT statement can also exit an inline PERFORM, a paragraph or a section.
 The EXIT statement can also exit an inline PERFORM, a paragraph or a section. 
    
The EXIT PROGRAM statement marks the logical end of a called program.
 You can also return values to activating runtime elements written in any language.
 You can also return values to activating runtime elements written in any language. 
    

 The EXIT METHOD statement marks the logical end of an invoked method.
 The EXIT METHOD statement marks the logical end of an invoked method. 
    
 The EXIT FUNCTION statement marks the logical end of the execution of a function.
 The EXIT FUNCTION statement marks the logical end of the execution of a function. 
    

 This rule is not enforced.
 This rule is not enforced. 
      
 This rule is not enforced.
 This rule is not enforced. 
      
 Integer-1 may be signed.
 Integer-1 may be signed. 
     GIVING and RETURNING are equivalent.
 GIVING and RETURNING are equivalent. 
     If the ADDRESS OF clause is not specified, identifier-1 must be no larger than 8 bytes in size.
 If the ADDRESS OF clause is not specified, identifier-1 must be no larger than 8 bytes in size. 
     
  The execution of an EXIT PERFORM statement without a CYCLE phrase causes control to be passed to an implicit CONTINUE statement, immediately following the END-PERFORM associated with the nearest inline PERFORM statement.
 The execution of an EXIT PERFORM statement without a CYCLE phrase causes control to be passed to an implicit CONTINUE statement, immediately following the END-PERFORM associated with the nearest inline PERFORM statement. 
     The execution of an EXIT PERFORM statement with a CYCLE phrase causes control to be passed to an implicit CONTINUE statement, immediately preceding the END-PERFORM associated with the nearest inline PERFORM statement.
 The execution of an EXIT PERFORM statement with a CYCLE phrase causes control to be passed to an implicit CONTINUE statement, immediately preceding the END-PERFORM associated with the nearest inline PERFORM statement. 
     
  The execution of a Format 3 EXIT statement with the PARAGRAPH phrase causes control to pass to an implicit CONTINUE statement immediately following the last statement in the paragraph.
 The execution of a Format 3 EXIT statement with the PARAGRAPH phrase causes control to pass to an implicit CONTINUE statement immediately following the last statement in the paragraph. 
     The execution of an EXIT SECTION statement causes control to be passed to an unnamed empty paragraph immediately following the last paragraph of the current section, preceding any return mechanisms for that section.
 The execution of an EXIT SECTION statement causes control to be passed to an unnamed empty paragraph immediately following the last paragraph of the current section, preceding any return mechanisms for that section. 
     If the EXIT PROGRAM statement is executed in a program which is not under the control of a calling runtime element, the EXIT PROGRAM statement causes execution of the program to continue with the next executable statement.
 If the EXIT PROGRAM statement is executed in a program which is not under the control of a calling runtime element, the EXIT PROGRAM statement causes execution of the program to continue with the next executable statement. 
     The execution of an EXIT PROGRAM statement in a called program which does not possess the initial attribute causes execution to continue with the next executable statement following the CALL statement in the calling runtime element. The state of the calling runtime element is not altered and is identical to that which existed at the time it executed the CALL statement except that the contents of data items and the contents of data files shared between the calling and called runtime elements may have been changed. The program state of the called program is not altered except that the ends of the ranges of all PERFORM statements executed by that called program are considered to have been reached.
 The execution of an EXIT PROGRAM statement in a called program which does not possess the initial attribute causes execution to continue with the next executable statement following the CALL statement in the calling runtime element. The state of the calling runtime element is not altered and is identical to that which existed at the time it executed the CALL statement except that the contents of data items and the contents of data files shared between the calling and called runtime elements may have been changed. The program state of the called program is not altered except that the ends of the ranges of all PERFORM statements executed by that called program are considered to have been reached. 
     Besides the actions specified in General Rule 7, the execution of an EXIT PROGRAM statement in a called program which possesses the initial attribute is equivalent to also executing a CANCEL statement referencing that program except that the statement does not free any memory. See the topic 
      The CANCEL Statement in the chapter 
      Procedure Division - ACCEPT - DIVIDE.
 Besides the actions specified in General Rule 7, the execution of an EXIT PROGRAM statement in a called program which possesses the initial attribute is equivalent to also executing a CANCEL statement referencing that program except that the statement does not free any memory. See the topic 
      The CANCEL Statement in the chapter 
      Procedure Division - ACCEPT - DIVIDE. 
     An EXIT PROGRAM statement must not be executed while executing a declarative procedure in which the GLOBAL phrase is specified except in a program called while executing that declarative procedure.
 An EXIT PROGRAM statement must not be executed while executing a declarative procedure in which the GLOBAL phrase is specified except in a program called while executing that declarative procedure. 
     Execution of an EXIT PROGRAM statement in a program that is under the control of a calling runtime element, causes a return value to be set in the system area generally available for non-COBOL programs to return a value. This system area is never smaller than 4 bytes in size but may be larger in some environments.
 Execution of an EXIT PROGRAM statement in a program that is under the control of a calling runtime element, causes a return value to be set in the system area generally available for non-COBOL programs to return a value. This system area is never smaller than 4 bytes in size but may be larger in some environments. 
      If the GIVING phrase is not specified and the calling convention specifies updating the RETURN-CODE special-register (see the rules for the CALL-CONVENTION clause in the topic The Special-Names Paragraph) then the object program operates as if the system area were declared as a COBOL numeric data item with USAGE COMP-5 and with a size determined by the operating environment external to the COBOL system and as if a MOVE statement had been executed with the RETURN-CODE as the sending item and the system area as the receiving item. (See the topic Special Registers in the chapter Concepts of the COBOL Language for details of RETURN-CODE.)
If the GIVING ADDRESS OF phrase is specified, the object program operates as if the system area were declared as a COBOL data item with USAGE POINTER and as if a SET statement had been executed with TO ADDRESS OF identifier-1 as the first operand and the system area as the second operand. The ADDRESS OF phrase may be used to indirectly pass a value that is larger than the system area.
If the GIVING identifier-1 phrase is specified, identifier-1 must describe the same number of character positions as is required to hold the return value in the system area and must be of the type and usage that is expected by the calling runtime element. The object program operates as if a MOVE statement had been executed with identifier-1 as the sending item and the system area as the receiving item.
If the GIVING integer-1 phrase is specified, integer-1 must not be larger than the value that can be held in the system area. The object program operates as if the system area were declared as a COBOL numeric data item with USAGE COMP-5 and with a size determined by the operating environment external to the COBOL system and as if a MOVE statement had been executed with integer-1 as the sending item and the system area as the receiving item.
When compiling procedural COBOL code to managed COBOL, if there is no RETURNING phrase on the PROCEDURE DIVISION header, the Compiler generates a method that returns a 32 or 64-bit integer depending on the setting of the RTNCODE-SIZE directive. Statements of the form EXIT PROGRAM RETURNING identifier-1 attempt to convert identier-1 into the correct integer type, according to the rules of the MOVE statement, before returning the value to the calling program.

 
 
 The execution of an EXIT METHOD statement causes the executing method to terminate, and control to return to the invoking statement. If a RETURNING phrase is present in the containing method definition, the value in the data item referenced by the RETURNING phrase becomes the result of the method invocation.
 The execution of an EXIT METHOD statement causes the executing method to terminate, and control to return to the invoking statement. If a RETURNING phrase is present in the containing method definition, the value in the data item referenced by the RETURNING phrase becomes the result of the method invocation. 
     
 
