Reputation: 503
I was asked to connect to a Db2 database on my company's mainframe. I was given the host name, port number and database. I was able to successfully connect to it using Java with the IBM JDK version 1.8 and the Db2 Universal JDBC driver. Now that I am connected to it, how do I find out what is the under lying mainframe platform. Where it is z/OS, OS/400 or VSE? Are there any SQL queries that can get that platform information? Also how do I find out what is the version of the Db2?
Upvotes: 0
Views: 323
Reputation: 601
Querying SYSPROC.ENV_GET_INST_INFO
will give level info on LUW, for Z/OS SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1
, I'm not sure about OS/400... Also DatabaseMetaData
should give you vendor-agnostic info about the database you are connected to
Upvotes: 1