Problem:
EXEC SQL
CALL UDBSP (:WS-INPUT1 IN,
:WS-OUTPUT1 OUTPUT)
:WS-ORDER-BY-STR-OLD OUTPUT)
END-EXEC.
Error after compiling: COBDB0100S SQL0104N An unexpected token was found following CALL UDBSP.
Resolution:
The DB2 ECM support does not use the type parameters in the stored procedure call list. Removing the IN and OUTPUT from the CALL resolves the compilation error.
Also you may need to compile with directive DB2(CALL_RESOLUTION=DEFERRED) if you place the name of the stored procedure in a host variable or if the precompiler fails to resolve the procedure on a CALL statement (in which case, the precompiler reports error SQL0204).