IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Decode the value in LIMITKEY column of SYSINDEXPART table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1020
Location: India

PostPosted: Wed Dec 08, 2010 9:56 am
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
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: 1020
Location: India

PostPosted: Wed Dec 08, 2010 7:47 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top