The DB2® server supports the declaration of cursor variables of the SYS_REFCURSOR built-in data type, which can be associated with any result set.
The SYS_REFCURSOR data type is known as a weakly-typed REF CURSOR type. Strongly-typed cursor variables of the REF CURSOR type require a result set specification.
DECLARE emprefcur SYS_REFCURSOR;