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
 

 

DB2 v8 for z/OS - creating a partitioned table

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

New User


Joined: 08 Aug 2008
Posts: 17
Location: Boulder Colorado

PostPosted: Thu Dec 11, 2008 4:47 am    Post subject: DB2 v8 for z/OS - creating a partitioned table
Reply with quote

I am trying to execute the following DDL but continue to receive a -636. I know where the error is but my question is why does this DDL not execute successfully? Thanks.

CREATE TABLE DB2DBA.CMSTSTT8
( "COLA" CHAR(6) NOT NULL ,
"COLB" CHAR(4) NOT NULL)
PARTITION BY
( COLA ASC,
COLB ASC)
(PARTITION 1 ENDING AT('15047 OE46')
,PARTITION 2 ENDING AT('15047 OE50'))
IN "CMSDBT04"."CMSTSTS8"

ENDING AT (constant or MAXVALUE, ...)

# Defines the limit key for a partition boundary. Specify at
# least one value (constant or MAXVALUE) after ENDING AT in each
# PARTITION clause. You can use as many values as there are
# columns in the key. The concatenation of all values is the
# highest value of the key for ascending and the lowest for
# descending

After reading this excerpt from the IBM manual I assume the DDL statement should work. Is there an existing APAR I missed to fix this? Thanks for any help.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 11, 2008 5:47 am    Post subject:
Reply with quote

Hello,

Suggest you post the CREATE INDEX for the partitioning keys for this as well. . .

Also from IBM:
Quote:
-636 THE PARTITIONING KEYS FOR PARTITION part-num ARE NOT SPECIFIED IN
ASCENDING OR DESCENDING ORDER


Explanation: In the CREATE INDEX statement for the CLUSTER index for a partitioned table (that is, a table residing in a partitioned table space), the partitioning key values specified in the limit key value specifications were not in either ascending or descending order.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Dec 11, 2008 12:10 pm    Post subject:
Reply with quote

Hi Dave,

You tried to create a table-controlled partitioning. Only reason you got that error is due to few quotes & commas missing.

You were partitioning the table by using 2 columns PARTITION BY, and in the ENDING AT, there has to be 2 columns not 1. Values in 2 columns doesn't stick together.

I tried this in my SHOP, it worked.
Code:
CREATE TABLE shandb.testing               
( "COLA" CHAR(6) NOT NULL ,               
"COLB" CHAR(4) NOT NULL)                 
PARTITION BY                             
( COLA ASC,                               
COLB ASC)                                 
(PARTITION 1 ENDING AT('15047','OE46')   
,PARTITION 2 ENDING AT('15047','OE50'))   
IN shandb.parts



Sushanth Bobby
Back to top
View user's profile Send private message
David Joyce

New User


Joined: 08 Aug 2008
Posts: 17
Location: Boulder Colorado

PostPosted: Fri Dec 12, 2008 8:07 pm    Post subject: Reply to: DB2 v8 for z/OS - creating a partitioned table
Reply with quote

Sushanth,
Thank you. I am using a tool to create the limit keys and there is no defined differentiation between values for one or two columns.
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 5 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
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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