Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC and Relational Databases and the fly likes How to read DB2 session tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to read DB2 session tables" Watch "How to read DB2 session tables" New topic

How to read DB2 session tables

Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi All,

My application connects to DB2 installed in mainframe to process some date based on the inputs given. The mainframe programme does the processing and will store the results in DB2 global session tables. Then I will invoke a DB2 stored procedure which will read this session table for further processing and gives the final result.

The problem here is most of the time I am not very sure what data is there in the DB2 session tables. Is there any way to read this session tables from java? for example if the session table name is DATA_SESS_TBL, if I try to query this table like "select * from DATA_SESS_TBL" I am getting an error saying that so such table exist

Any help on this is appreciated.


Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

You need to include the schema name of the table. I think it is SYSCAT. I'm not positive off the top of my head, so you should verify the schema name by looking at your db2 tables.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: How to read DB2 session tables
It's not a secret anymore!