-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: DECSTAT DB2 z/OS getMetaData().getColumns etc
PostPosted: Fri Jan 13, 2006 4:53 pm 
Newbie

Joined: Wed Jan 11, 2006 4:40 am
Posts: 2
Location: Sydney, Australia
This is an FYI - no help required.

When using Hibernate Tools with DB2 on z/OS (Mainframe), be aware that you need to set DECSTAT=YES and rebind the packages in order for getMetaData().getColumns etc to work. NB. setting this will slightly increase your package size on DB2.

The reason for this is that within the Hibernate Tools class, org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect, calls are made with the column name, e.g. rs.getString("INDEX_NAME"). DB2 will not provide the column names without the DECSTAT setting. i.e. positioning works e.g. rs.getString(3). DB2 calls a packages SYSIBM.SQLTABLES, SYSIBM.SQLCOLUMNS etc.


Top
 Profile  
 
 Post subject: Re: DESCSTAT DB2 z/OS getMetaData().getColumns etc
PostPosted: Fri Jan 13, 2006 4:59 pm 
Newbie

Joined: Wed Jan 11, 2006 4:40 am
Posts: 2
Location: Sydney, Australia
That should read - DESCSTAT not DECSTAT

Quote:
This is an FYI - no help required.

When using Hibernate Tools with DB2 on z/OS (Mainframe), be aware that you need to set DESCSTAT=YES and rebind the packages in order for getMetaData().getColumns etc to work. NB. setting this will slightly increase your package size on DB2.

The reason for this is that within the Hibernate Tools class, org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect, calls are made with the column name, e.g. rs.getString("INDEX_NAME"). DB2 will not provide the column names without the DESCSTAT setting. i.e. positioning works e.g. rs.getString(3). DB2 calls a packages SYSIBM.SQLTABLES, SYSIBM.SQLCOLUMNS etc.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 5:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
rs.getString(3) works but rs.getString("INDEX_NAME") does not ? great ;)

p.s. you can implement your own MetaDataDialect that works around this limitation if you want

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 5:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
p.s. if you put this in jira as a FAQ contribution i wont forget to include it in the tools doc at some point

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 5:30 pm 
Newbie

Joined: Thu Sep 27, 2007 10:48 am
Posts: 5
After all.. it's DESCSTAT ?! With S right?
Cheers

_________________
School is a drill for the battle of life. If you fail in the drill you will fail in the battle.
Karl G. Maeser
california drug northern rehab


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.