Declaring local variables of the anchored data type
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.
Before you begin
The object of the data type that the variable will be anchored to must be defined.
Procedure
Results
If the DECLARE statement executes successfully, the variable is defined in the database with the specified anchor data type.
Example
DECLARE v1 ANCHOR DATA TYPE TO emp.c1;
What to do next
Once the variable is defined it can be assigned a value, be referenced, or passed as a parameter to routines.