In the statement DECLARE cname CURSOR, the identifier cname can be used in only one DECLARE statement in the source file. This is true even when the DECLARE statement appears inside a function. Although a program variable made with the DEFINE statement is local to the function, a cursor within a function is still global to the whole module.