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
 

 

How to make sure the order of UNLOADed data?

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

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Dec 20, 2013 10:16 am    Post subject: How to make sure the order of UNLOADed data?
Reply with quote

I'm using DB2 utility to unload data from table, and the generated sequenced file will be later be used by DFsort.

I'm not sure whether the UNLOADed data will keep the same ascending oreder as specified by PK when the table was defined.

If the unloaded data is already sorted by PK, there will be no need for another SORT.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1722
Location: UK

PostPosted: Fri Dec 20, 2013 3:23 pm    Post subject:
Reply with quote

So what did you see when you unloaded a similar, test, table and looked at the unloaded data?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Dec 20, 2013 5:11 pm    Post subject:
Reply with quote

I can see data is basically the same order as the PK.
but from job log, I cannot see SORT processing during the unload.
I cannot find such description from DB2 Utility reference either, so, I'm not sure about my suspect.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Dec 20, 2013 5:42 pm    Post subject:
Reply with quote

if there is no sort process during the unload,
and the rows are in PK order,
then the table has been recently reorgd and no inserts have been made
to disrupt the 'order'.

unless you request a sort (ORDER BY) during any db2 selection process,
the order of the selected rows is unpredictable.
it would be an error to assume anything else.
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 Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm


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