Local declarations in a compound statement immediately follow the BEGIN keyword. These local declarations exist only within the compound statement.
See ”Declarations in compound statements” in SQL Anywhere Server - SQL Usage.