V5R2 DB/2 version is the same as the Op System.
Since the question is tagged with “Software/Hardware used: v5r4m0″, it seems that your version of DB2 is V5R4. You can use WRKLICINF to see what version of i5/OS you are running.
DB2 is integrated with the operating system. The two always have the same version and release. At least up through V7.1, that’s still true.
If you really need to know the version/release in a program, you can call the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/qszrtvpr.htm”>Retrieve Product Information (QSZRTVPR) API</a> with a ProductID specification of “*OPSYS”. The returned values will be for the operating system, but just as applicable for DB2 until IBM provides a separate ProductID for DB2 (if that ever happens).