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

DB2 - order of the data loaded into table get rearranged ??


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ms0033436

New User


Joined: 20 Nov 2008
Posts: 15
Location: Pune

PostPosted: Thu Nov 25, 2010 1:40 pm
Reply with quote

Hello,

This is regarding loading the data in to db2 table.
My requirement is like this:
Input file has more than 7000 rows.
case-1:

ABC ABC ----- -------
ABC XYZ 12.0 15.0
ABC RST 54.0 25.0
........................

When i am trying to load the DB2 table using this input file the first row in the file is loaded as the last row in the table (i.e. the order is getting changed.) It looks like below:
case-2:

ABC XYZ 12.0 15.0
ABC RST 54.0 25.0
............................

ABC ABC ----- -------

But i want order of the loaded data in the table to look exactly like CASE-1. Could anyone please help me out in this case?
columns 1 & 2 are Primary keys. I have tried load this data using a load job like below:
LOAD DATA RESUME YES
INDDN(SYSREC) LOG NO
WORKDDN (SYSUT1X,SORTOUTX)
SORTDEVT SYSDA SORTNUM 96
NOCOPYPEND
KEEPDICTIONARY
ENFORCE NO
INTO table name
But the ouput looks as like in CASE-2.Even i have written one cobol program for loading the data in DB2 table. But the output looks like CASE-2. Can any body suggest something for this issue?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Nov 25, 2010 3:10 pm
Reply with quote

you should look at the "clustering" index .

or you could "ALTER TABLE APPEND ON " before the load.

besides it's idiotic to rely on the physical order of rows in a DB2-table.
Back to top
View user's profile Send private message
ms0033436

New User


Joined: 20 Nov 2008
Posts: 15
Location: Pune

PostPosted: Thu Nov 25, 2010 3:37 pm
Reply with quote

Guyc,

We dont have access to alter the table....Any way i will check with our DBA. Is there any alternative .. that without touching the DB2 structure
or vsam file
can we make changes possible ??
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 25, 2010 3:46 pm
Reply with quote

Quote:
besides it's idiotic to rely on the physical order of rows in a DB2-table


maybe the TS just does not know anything about db2?
and does not realize that the physical positioning in the table means nothing.
besides, how does he know what the physical order is?


the order may or may not change after the first re-org.


this thread should be relegated to the juniors/students forum.
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top