ILE COBOL Language Reference
+-------------------------------IBM Extension--------------------------------+
A data item defined with the PROCEDURE-POINTER phrase is a
procedure-pointer data item. It is a 16-byte elementary item
containing the address of an entry point to an ILE procedure or program object
(*PGM), such as:
- The entry point of the outermost ILE COBOL program (an ILE procedure) in
the compilation unit defined by the PROGRAM-ID statement
- An entry point of a non-COBOL program, such as an ILE C function (an ILE procedure)
- An entry point of a program (*PGM).
A procedure-pointer data item may only be used in:
- The SET statement
- A relation condition
- The USING phrase of a CALL statement, or the Procedure Division header
- Expressions involving ADDRESS OF and LENGTH OF
- The CALL statement as a target
- The argument on an intrinsic function
Like pointer data items, procedure-pointer data items must be in
alignment.
Related Information:
- The USAGE IS PROCEDURE-POINTER clause cannot be written at
level-88.
- In a group item described with the USAGE IS PROCEDURE-POINTER clause, the
elementary items within the group are procedure-pointer data items (the group
itself is not a procedure-pointer).
- The USAGE clause of an elementary item cannot contradict the USAGE clause
of a group to which the item belongs.
- Procedure-pointer data items can be part of a group that is referred to in
a MOVE statement, or an input/output statement. However, there is no
conversion of values when the statement is executed.
- A procedure-pointer data item can be written to a file, but if you later
read the same record containing the procedure-pointer, the item will no longer
represent a valid address.
- GLOBAL, EXTERNAL, OCCURS, SYNCHRONIZED, and LIKE clauses may be used with
USAGE IS PROCEDURE-POINTER.
- A procedure-pointer may be the subject or object of a REDEFINES
clause.
- A VALUE clause for a procedure-pointer data item can contain only NULL or
NULLS.
- JUSTIFIED, PICTURE, TYPE, BLANK WHEN ZERO, and FORMAT clauses cannot
describe group or elementary items defined with the USAGE IS PROCEDURE-POINTER
clause.
- A procedure-pointer data item cannot be a conditional variable, does not
belong to any class or category, and is ignored in CORRESPONDING
operations.
+----------------------------End of IBM Extension----------------------------+
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.