Using MERGE statement with parameters in MATCHING clause produced error at prepare time :
An error was found in the application program input parameters for the SQL statement.
SQL error code = -804.
Data type unknown.
It seems the problem is because pass1_merge not called set_parameter_type as pass1_update does.
Not tryed with NOT MATCHING clause