Both function and stored procedures are supposed to return a table.
CREATE FUNCTION Fn_Tasks(ID vargraphic(40))
RETURNS TABLE (Id vargraphic(40),
F1: BEGIN ATOMIC
RETURN CALL Get_Tasks(ID);
The error I get is
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "(ID" was found following "CALL
Get_Tasks". Expected tokens may include: "<space>". LINE NUMBER=12.