Anchored data type variables

An anchored variable is a local variable or parameter with a data type that is an anchored data type.

Anchored variables are supported in the following contexts:
  • SQL procedures
    • In SQL procedures, parameters and local variables can be specified to be of an anchored data type.
  • Compiled SQL functions
    • SQL functions created using the CREATE FUNCTION statement that specify the BEGIN clause instead of the BEGIN ATOMIC clause can include parameter or local variable specification that are of the anchored data type.
  • Module variables
    • Anchored variables can be specified as published or unpublished variables defined within a module.
  • Global variables
    • Global variables can be created of the anchored data type.
Anchored variables are declared using the DECLARE statement.