Using Java to extract information from DB2 zOS

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
jeroc
Member
Posts: 17
Joined: Mon Dec 03, 2007 8:14 pm

Using Java to extract information from DB2 zOS

Post by jeroc » Mon May 25, 2009 6:14 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
Member
Posts: 17
Joined: Mon Dec 03, 2007 8:14 pm

Post by jeroc » Tue Jun 02, 2009 7:54 pm

Does anymone try to query a DB2 for zOS from a Java app on Windows?

Thank you in advance.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue Jun 02, 2009 8:00 pm

I would look at the IBM Developerworks site and look at IBM Redbooks site.

Both have a 'SEARCH' window at the top right.
DeveloperWorks has hyperlinks on the left side of the page.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others