Using Java to extract information from DB2 zOS



IBM's flagship relational database management system

Using Java to extract information from DB2 zOS

Postby jeroc » Mon May 25, 2009 6:47 pm

Hello,

I would like to use Java on Windows to access a DB2 zOS subsystem. I have already implemented some queries in a JCL in order to extract information from system-catalog into readable Windows text files and now I would like to use Java. For instance, I have the following query that allows to extract the list of columns of tables and views.

SELECT
TBCREATOR,
TBNAME,
COLNO,
NAME,
CASE
WHEN TYPENAME = ' ' THEN COLTYPE
ELSE TYPENAME
END,
TYPESCHEMA,
COALESCE(KEYSEQ,0),
LENGTH,
SCALE,
NULLS,
REMARKS,
DEFAULTVALUE

FROM SYSIBM.SYSCOLUMNS
ORDER BY TBCREATOR, TBNAME, COLNO;

Do you have an example of Java code that to execute queries from Windows against DB2 zOS and corresponding results?

Thank you in advance.
jeroc
 
Posts: 22
Joined: Tue Sep 18, 2007 2:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using Java to extract information from DB2 zOS

Postby jeroc » Wed Jun 03, 2009 2:40 pm

Has anyone already implemented SQL queries in Java code running on Windows against a DB2for zOS?

Thanks in advance.

Regards
jeroc
 
Posts: 22
Joined: Tue Sep 18, 2007 2:11 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post