I created the following statement in an edit window.
SELECT LENGTH('123456789 ')
When I execute it, it returns 13 (and so it should)
If I change the statement and add a parameter, like so;
and I execute it (when the parm window pops up, I enter the same value as the original statement, defined as VARCHAR or CHAR) and I get the following error;
Lookup Error - DB2 Database Error: ERROR  [IBM][DB2] SQL0418N A statement contains a use of an untyped parameter marker, the DEFAULT keyword, or a null value that is not valid.
In this example use the following statement:
select LENGTH (CAST(:numvar AS VARCHAR(55))) from SYSIBM.SYSDUMMY1;
Waiting for fix in a future version of Toad for DB2