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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 - order of the data loaded into table get rearranged ??
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    Post subject:
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    Post subject: Reply to: DB2 - order of the data loaded into table get rear
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: 6968
Location: porcelain throne

PostPosted: Thu Nov 25, 2010 3:46 pm    Post subject:
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    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 6 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 18 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