ILE COBOL Programmer's Guide

Returning Control from an ILE CL Program or Procedure

The RETURN command in ILE CL causes control to be returned to the caller.

Control is returned to your ILE COBOL program at the next statement after the CALL statement if the called program ends without an exception. If the called program ends with an exception then control is returned to the exception handling procedure identified in your ILE COBOL program. Refer to ILE COBOL Error and Exception Handling for a full description of transferring control to an exception handling procedure.

The called program can also send an escape message past the calling ILE COBOL program skipping it altogether. In this case, the invocation of the ILE COBOL program is canceled. Canceling the invocation is similar to returning from the ILE COBOL program.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]