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

Issue with LOADING data into Partitioned tablespace


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
Reply with quote

hello,

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

Superior Member


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

PostPosted: Sat Oct 04, 2008 2:10 pm
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

Moderator Emeritus


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

PostPosted: Sat Oct 04, 2008 8:04 pm
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
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: 1020
Location: India

PostPosted: Mon Oct 06, 2008 2:05 pm
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
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: 1020
Location: India

PostPosted: Mon Oct 06, 2008 4:28 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top