How to check db2 version
You can try the following query:
SELECT service_level, fixpack_num FROM TABLE
(sysproc.env_get_inst_info())
as INSTANCEINFO
It works on LUW, so I can't guarantee that it'll work on z/OS, but it's worth a shot.
SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1