Compare Pointer for Space Addressability (CMPPSPAD)

Instruction Syntax

Op Code (Hex) Extender Operand 1 Operand 2 Operand 3 [4-6]
CMPPSPADB 1CE6 Branch options Compare operand 1 Compare operand 2 Branch targets
CMPPSPADI 18E6 Indicator options Compare Operand 1 Compare Operand 2 Indicator targets
Operand 1: Space pointer or data pointer.

Operand 2: Numeric variable scalar, character variable scalar, numeric variable array, character variable array, space pointer, or data pointer.

Operand 3 [4-6]:

  • Branch Form–Instruction number, relative instruction number, branch point, or instruction pointer.
  • Indicator Form–Numeric variable scalar or character variable scalar.

Description:

The space addressability contained in the pointer specified by operand 1 is compared with the space addressability defined by operand 2.

The value of the operand 1 pointer is compared based on the following:

  • If operand 2 is a scalar data object (element or array), the space addressability of that data object is compared with the space addressability contained in the operand 1 pointer.
  • If operand 2 is a pointer, it must be a space pointer or data pointer, and the space addressability contained in the pointer is compared with the space addressability contained in the operand 1 pointer.

Based on the results of the comparison, the resulting condition is used with the extender to transfer control (branch form) or to assign a value to each of the indicator operands (indicator form). If the operands are not in the same space, the resultant condition is unequal. If the operands are in the same space and the offset into the space of operand 1 is larger or smaller than the offset of operand 2, the resultant condition is high or low, respectively. An equal condition occurs only if the operands are in the same space at the same offset. Therefore, the resultant conditions (high, low, equal, and unequal) are mutually exclusive. Consequently, if you specify that an action be taken upon the nonexistence of a condition, this results in the action being taken upon the occurrence of any of the other three possible conditions. For example, a branch not high would result in the branch being taken on a low, equal, or unequal condition.

The object destroyed (hex 2202) exception, parameter reference violation (hex 0801) exception, and pointer does not exist (hex 2401) exception are not signaled when operand 1 or operand 2 is a space pointer machine object or when operand 2 is a scalar based on a space pointer machine object. This occurs when the space pointer machine object contains an internal machine value that indicates one of these error conditions exists. If the corresponding exception is not signaled, the resulting condition of the comparison operation is not defined other than that it will be one of the four valid resultant conditions for this instruction.

When the Override Program Attributes (OVRPGATR) instruction is used to override this instruction, the pointer does not exist (hex 2401) exception is not signaled when operand 1 or operand 2 is a space pointer (i.e. either a space pointer data object or a space pointer machine object). Furthermore, some comparisons involving space pointers are defined even when one or both of the compare operands is a pointer subject to the pointer does not exist condition. Specifically, if both compare operands are subject to the pointer does not exist condition, the resultant condition is equal. When one space pointer is set and one is subject to the pointer does not exist condition, the resultant condition is unequal, but undefined with respect to comparisons which include specification of the high or low conditions.

Resultant Conditions

  • High
  • Low
  • Equal
  • Unequal

Authorization Required

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
    • 0603 Range
    • 0604 External Data Object Not Found
  • 08 Argument/Parameter
    • 0801 Parameter Reference Violation
  • 10 Damage Encountered
    • 1004 System Object Damage State
    • 1044 Partial System Object Damage
  • 1C Machine-Dependent
    • 1C03 Machine Storage Limit Exceeded
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 22 Object Access
    • 2201 Object Not Found
    • 2202 Object Destroyed
    • 2203 Object Suspended
    • 2208 Object Compressed
    • 220B Object Not Available
  • 24 Pointer Specification
    • 2401 Pointer Does Not Exist
    • 2402 Pointer Type Invalid
  • 2E Resource Control Limit
    • 2E01 User Profile Storage Limit Exceeded
  • 36 Space Management
    • 3601 Space Extension/Truncation
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation