Passing Entry Point Addresses with Procedure-Pointers

You can use procedure-pointer data items, defined with the USAGE IS PROCEDURE-POINTER clause, to pass the entry address of a program in a format required by certain ILE callable services.

For example, to have a user-written error handling routine take control when an exception condition occurs during program execution, you must first pass the entry address of an ILE procedure, such as an outermost ILE COBOL program, to CEEHDLR, a condition management ILE callable service, to have it registered.

Procedure-pointer data items can be set to contain the entry address for the following types of programs:
  • An outermost ILE COBOL program
  • An ILE procedure written in another ILE language
  • An ILE program object or an OPM program object.
Note: A procedure-pointer data item cannot be set to the address of a nested ILE COBOL program.

A procedure-pointer data item can only be set using Format 6 of the SET statement.

For a complete definition of the USAGE IS PROCEDURE-POINTER clause and the SET statement, refer to the IBM® Rational® Development Studio for i: ILE COBOL Reference.