DB2 Catalog query assistance

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
BMW83
Member
Posts: 4
Joined: Mon Mar 10, 2014 6:09 pm

DB2 Catalog query assistance

Post by BMW83 » Sat Feb 27, 2016 1:26 am

We have a partitioned DB2 table and I want to know if I can query the catalog tables to find out what column(s) are being used for the partitioning.
When I run a query against SYSIBM.SYSTABLEPART, I can find the below for the TSNAME.
TSNAME PARTITION IXNAME ROWS LIMITKEY
---------+---------+---------+---------+---------+--
BATT1S 1 BATT1SX2 45207 0
BATT1S 2 BATT1SX2 45160 1
BATT1S 3 BATT1SX2 46285 2
BATT1S 4 BATT1SX2 46770 3
BATT1S 5 BATT1SX2 47079 4
BATT1S 6 BATT1SX2 48837 5
BATT1S 7 BATT1SX2 46109 6
BATT1S 8 BATT1SX2 49172 7
BATT1S 9 BATT1SX2 45916 8
BATT1S 10 BATT1SX2 45392 9

SYSKEYS for index BATT1SX2 contains the following info
CLSTING CLSTED UNQ COLNAME COLSEQ ORDER IXTYP
--+---------+---------+---------+---------+---------+-
Y Y D BAT_PART_N 1 A 2
Y Y D MER_NUM 2 A 2
Y Y D BAT_PROC_D 3 A 2
Y Y D BAT_MER_TO 4 A 2

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