Declaring local variables or parameters of the anchored data type is a task that you would perform whenever it is necessary that the data type of the variable or parameter remain consistent with the data type of the object to which it is anchored.
The object of the data type that the variable will be anchored to must be defined.
If the DECLARE statement executes successfully, the variable is defined in the database with the specified anchor data type.
DECLARE v1 ANCHOR DATA TYPE TO emp.c1;
Once the variable is defined it can be assigned a value, be referenced, or passed as a parameter to routines.