IBM Extension

Procedure-pointer Data Items

Procedure-pointer data items are items defined explicitly as USAGE IS PROCEDURE-POINTER.

Only EQUAL and NOT EQUAL are allowed as relational operators when you specify procedure-pointer data items. The operands are equal if the two addresses used in the comparison would both result in the same storage location.

This relation condition is allowed in IF, PERFORM, EVALUATE, and SEARCH Format 1 statements. It is not allowed in SEARCH Format 2 (SEARCH ALL) statements, because there is not a meaningful ordering that can be applied to procedure-pointer data items.

Read syntax diagramSkip visual syntax diagram
Procedure-Pointer Comparison - Format

>>-+-identifier-1-+--+----+--+-----+--+-EQUAL--+----+-+--------->
   +-NULL---------+  '-IS-'  '-NOT-'  |        '-TO-' |   
   '-NULLS--------'                   '-=-------------'   

>--+-identifier-2-+--------------------------------------------><
   +-NULL---------+   
   '-NULLS--------'   

identifier-1, identifier-2
Must be described as USAGE IS PROCEDURE-POINTER (see PROCEDURE-POINTER Phrase for more information).
NULL(S)
Used only if the other operand is defined as USAGE IS PROCEDURE-POINTER. NULL=NULL is not allowed.
End of IBM Extension