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: 1755
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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