VALID

VALID returns a BIT(1) value that indicates if the contents of a reference are valid for its data type.

Read syntax diagramSkip visual syntax diagramVALID( x)
x
Reference with either PICTURE, FIXED DEC, or ORDINAL type.
VALID(x) returns '1'b if:
  • x is PICTURE or WIDEPIC and its contents are valid for x's picture specification.
  • x is FIXED DECIMAL and the data in x is valid packed decimal data.
  • x is ORDINAL and the data in x is one of the defined values for that ordinal type.

Otherwise it returns '0'b.