Pointer data items are items defined explicitly as USAGE IS POINTER. Otherwise, they are ADDRESS OF data items or ADDRESS OF special registers, which are implicitly defined as USAGE IS POINTER.
Only EQUAL and NOT EQUAL are allowed as relational operators when you specify 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 pointer data items.
ADDRESS Comparison - Format >>-+-ADDRESS OF--identifier-1-+--+----+--+-----+----------------> +-identifier-2-------------+ '-IS-' '-NOT-' +-NULL---------------------+ '-NULLS--------------------' >--+-EQUAL--+----+-+--+-ADDRESS OF--identifier-3-+------------->< | '-TO-' | +-identifier-4-------------+ '-=-------------' +-NULL---------------------+ '-NULLS--------------------'
That is, NULL=NULL is not allowed.