View previous topic :: View next topic
|
Author |
Message |
ms0033436
New User
Joined: 20 Nov 2008 Posts: 15 Location: Pune
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
ms0033436
New User
Joined: 20 Nov 2008 Posts: 15 Location: Pune
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|