DB2 error - SQL Statement too long or complex
This should probably be a comment rather than an answer since I'm not sure if my reasoning is correct, but then I wouldn't be able to have any formatting.

Could you create a temporary table and JOIN instead?

...&lt;sql statements and joins&gt;
JOIN tmp_table ON my_table.a = tmp_table AND my_table.b = tmp_table.b


Edit: if the values you're checking against don't change much, it might even make sense to persist them in a table to increase performance and facilitate querying.