SQL is a programming language.
If you are a programmer and you are requested to use SQL,
you should learn it and get (at least) average skill of it.
... having difficulties with syntax.
It's a basic skill for a programmer to study a programming language.
If you couldn't read and understand C(or any other programming language) syntax,
you can't be a C expert.
You can't be more than mediocre programmer.
Is it OK to use sysibm.sysdummy1 table in production ?
No problrm, I think.
Anyhow, try this...
SELECT typ, id
WHERE (typ, id)
IN (SELECT '1' , '1' FROM sysibm.sysdummy1 UNION ALL
SELECT '2' , '2' FROM sysibm.sysdummy1 UNION ALL
SELECT '3' , '3' FROM sysibm.sysdummy1
I would much prefer using a CTE, than hit against sysdummy1. In fact, I, typically, tell folks to stay away from sysdummy1 in anything other than an adhoc basis, as most times it is misused and costs you more.
Try something like:
AS ( VALUES
SELECT * FROM MYVIEW MV
WHERE mv.typ = cte.typ
and mv.id = cte.id