Returning using ILE Bindable APIs

You can end a procedure normally by using the ILE bindable API CEETREC. However, the API will end all call stack entries that are in the same activation group up to the control boundary. When a procedure is ended using CEETREC it follows normal termination processing as described above for main procedures and subprocedures. On the next call to the procedure, a fresh copy is available for processing.

Similarly, you can end a procedure abnormally using the ILE bindable API CEE4ABN. The procedure will then follow abnormal termination as described above.

Note:
You cannot use either of these APIs in a program created with DFTACTGRP(*YES), since procedure calls are not allowed in these procedures.

Note that if the cycle-main procedure is not active, or if there is no cycle-main, then nothing will get closed or freed. In this case, you should enable an ILE cancel handler, using CEERTX. If the cancel handler is in the same module, it can close the files, unlock the data areas, and perform the other termination actions.

For more information on CEETREC and CEE4ABN, refer to the CL and APIs section of the Programming category in the i5/OS Information Center at this Web site - http://www.ibm.com/systems/i/infocenter/.



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