Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Decode the value in LIMITKEY column of SYSINDEXPART table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Tue Dec 07, 2010 5:41 pm    Post subject: Decode the value in LIMITKEY column of SYSINDEXPART table
Reply with quote

How to decode the value in LIMITKEY column of SYSINDEXPART table?

For example, What is the decoded value of X'B8000000FFFFFFFFFFFFFF' in LIMITKEY column of SYSINDEXPART table and how to decode it?
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Dec 08, 2010 9:56 am    Post subject:
Reply with quote

Shankar,

What is the data type of that partition column ? Because for data type other than CHAR or VARCHAR DB2 tries to store it in some internal format.

Like for example, the index INEXAGTC has 10 partition and following are the column specifications,
Code:
DSTO_NO        CHAR              10
DSTR_NO        CHAR              10
CASE_POL_NO     CHAR              15
AGTC_UPD_TS    TIMESTAMP   


When i look-up in the SYSINDEXPART, i get the following values for the column limitkey.

Code:
LSW       5500010003714492X        .. . ..Î..
LSW       5500010077595344X        .... .....
LSW       5500031488653117X        .... . ø..
LSW       5500071139703858X        .... . .Ëè
LSW       5500077590758546X        .... èãØçë
021       38286     AMF NW A       .... ê  Îñ
111       32097     AMF CWGI C     .... ..Ã`ñ
318       47550     L0190470       .......Ø.é
6AC       44755     704980900      .. .  .. I
996       55956     N5024469       .. ..ñ.o..


CHAR datatypes are visible but timestamp values are not visible.

But, when i see it in hex, timestamp values are visible,

Code:
9F2E7404040404040404020100128012830762112
4F4E7404040404040404020091231013011141813
1F7E7404040404040404020100605021404703633
5F8E7404040404040404020100811013803277354
4F6E7404040404040404020100730015446804853
5E640C14040404040404020091210015202047649
3E6C7C940C3404040404020100610021423667949
0F4F7F04040404040404020101116053606802251
8F0F9F0F040404040404020100219030418370489
4F4F6F94040404040404020100105054905961709


Without knowing the internal format, its pretty hard to convert it manually. But, DB2 tools like Platinum or others can help you with that.

Sushanth
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Wed Dec 08, 2010 7:09 pm    Post subject:
Reply with quote

Per the DB2 Manual, the LIMITKEY is stored in INTERNAL-format in the SYSINDEXPART table:

"LIMITKEY VARCHAR(512) NOT NULL WITH DEFAULT FOR BIT DATA

The high value of the limit key of the partition in an internal format. An empty string if the index is not partitioned or for a data-partitioned secondary index (DPSI). If any column of the key has a field procedure, the internal format is the encoded form of the value.""

To see the EXTERNAL-format, see LIMITKEY in the SYSTABLEPART table:

"LIMITKEY VARCHAR(765) NOT NULL

The high value of the partition in external format. If the table space was converted from index-controlled partitioning to table-controlled partitioning, the value is the highest possible value for an ascending key, or the lowest possible value for a descending key. If the table space is not partitioned, the value is an empty string."
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Dec 08, 2010 7:47 pm    Post subject:
Reply with quote

Ronald Burr, that works.

Thank You.
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Dec 10, 2010 3:59 pm    Post subject:
Reply with quote

Thank you icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us