Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us