VSC2MF 

Comparisons Involving Data Items with USAGE POINTER or USAGE-POINTER-32(Relation Condition)

Two items whose USAGE is either implicitly or explicitly POINTER or POINTER-32 can be compared. Only the relational operators which test for exact equality or inequality are permitted in pointer comparisons.

General Format


Syntax for the general format of pointers

Syntax Rules

  1. Identifier-1 and identifier-3 refer to an 01 or 77 level items in the Linkage Section.
  2. MF Identifier-1 and identifier-3 can refer to any data items defined in the Data Division.
  3. Identifier-2 and identifier-4 refer to items with USAGE IS POINTER

    ENTMF  or USAGE is POINTER-32

    .
  4. Only one operand in the comparison can be the figurative constant NULL.

General Rules

  1. The operands are equal if the two addresses are the same, otherwise they are unequal.
  2. This type of relation condition is allowed in IF, PERFORM, EVALUATE and SEARCH (Format 1) statements. It is not allowed in SEARCH (Format 2) statements (SEARCH ALL) because no meaningful ordering can be applied to pointer data items.
  3. ENTMF  If the AMODE"64" directive is specified, the value of the POINTER-32 data item is zero-extended to 64-bit when compared with a POINTER data item.