isa operator

The operator isa is a binary operator that tests whether a given expression is of a particular type. The main purpose is to test the type of the data that is held in a field of type ANY.

The operator is used in an elementary logical expression that has the following format:
  testExpression isa typeSpecification
testExpression
A numeric, text, or datetime expression, which may be composed of a single field or literal.
typeSpecification
A type specification, which may be any of these:
  • A part name.
  • A primitive-type specification such as STRING; however, if the primitive type can be associated with a length, the length must be specified, as in these examples:
    • BIN(9)
    • CHAR(5)

    Do not include a datetime mask.

  • A type specification (as described previously) followed by paired brackets. In this case, the complete specification indicates a dynamic array of a particular type, length (where appropriate), and number of dimensions.

The logical expression resolves to true if testExpression matches the type identified in typeSpecification; and otherwise resolves to false.

Related reference
Arrays
Logical expressions
Operators and precedence

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.