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
 

 

Issue with LOADING data into Partitioned tablespace

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

New User


Joined: 10 Aug 2008
Posts: 45
Location: India

PostPosted: Fri Sep 19, 2008 10:23 am    Post subject: Issue with LOADING data into Partitioned tablespace
Reply with quote

Hi,

I have a table that is partitioned in 90 parts based on DATE(as requirement is to have data for latest 3 months). The source data comes from a dataset. The data is loaded into the table using COBOL-DB2 program and an associated JCL using IBMLOAD everyday. The program checks for the partition number, increments the counter and creates the files that are needed for loading data. The counter is set to 1 (so that it points to PART 1), once partition number reaches 90.

My question here is, if the table is to be loaded for 91st partition (in general,every (90*n+1)th partition), how the data can be loaded as the partition key is different from that of the data in the file.

Eg: If PART 1--->'2008-06-18' and PART 90--->'2008-09-15'
When the data for 91st day i.e '2008-09-16' day needs to be loaded, the counter in the program will be rolled over to 1 so that it points PART 1, but the key still point to '2008-06-18'

Can someone help me solving this issue.

Thanks,
Krithika J
Back to top
View user's profile Send private message

Jerine_Cao Xiaojie

New User


Joined: 07 Sep 2008
Posts: 2
Location: Nanchang

PostPosted: Sat Oct 04, 2008 12:10 pm    Post subject:
Reply with quote

hello,

I believe you can go for GDG.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Oct 04, 2008 2:10 pm    Post subject:
Reply with quote

Quote:
but the key still point to '2008-06-18'
and what key do you want ?
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: Sat Oct 04, 2008 8:04 pm    Post subject:
Reply with quote

Hello,

Quote:
I believe you can go for GDG.
Please explain how a gdg would address the posted question. I see no connection, but that may be because there is something i do not understand.

Quote:
so that it points PART 1, but the key still point to '2008-06-18'
You may have to remove the "old key" and implement the "new key".

Have you talked with your dba?
Back to top
View user's profile Send private message
krithikaj

New User


Joined: 10 Aug 2008
Posts: 45
Location: India

PostPosted: Mon Oct 06, 2008 11:11 am    Post subject: Issue with LOADING data into Partitioned tablespace
Reply with quote

Hi,

Even I do not understand the concept and advantage behind using GDG. Its all about the data, and particularly the DATE, that is important here.

Could you please let me know if it possible to re-create only one key for a table partition without deleting the data that other partitions already have.

For eg:
After 90 days, DATE on 1st PART (91st partition) to be changed to '2008-09-16' and leaving other partitions unaltered (along with the data).

Thanks,
KJ
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Oct 06, 2008 2:05 pm    Post subject:
Reply with quote

Hi Krithi,

There is something called ROTATING PARTITIONS. Here is the link check it out....
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.admin/db2z_rotatepartitions.htm

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

New User


Joined: 10 Aug 2008
Posts: 45
Location: India

PostPosted: Mon Oct 06, 2008 4:06 pm    Post subject: Issue with LOADING data into Partitioned tablespace
Reply with quote

Hi,

Actually the program that i was talking about is the ones which you referred to. I would like to know if it serves my requirement.

Thanks,
KJ
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Oct 06, 2008 4:28 pm    Post subject:
Reply with quote

Krithi,

You have 90 partitions for 90 days(3 months) and you are using counter in COBOL program to choose your partition to store data. After 90 days you don't need DAY 1. If this your requirement...

Rotating Partitions is what you are looking for.

Can i know what DB2 version your shop is using...

Before doing anything consult with your DBA,
Sushanth Bobby
Back to top
View user's profile Send private message
krithikaj

New User


Joined: 10 Aug 2008
Posts: 45
Location: India

PostPosted: Mon Oct 06, 2008 4:35 pm    Post subject: Issue with LOADING data into Partitioned tablespace
Reply with quote

I have V7 Db2 Version.

Thanks a lot for this information.

Regards,
KJ
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 copying data without knowing location arunsoods DFSORT/ICETOOL 5 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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