Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query on Sorting TSQ Data

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

New User


Joined: 17 Mar 2005
Posts: 3

PostPosted: Fri Jul 08, 2005 10:01 pm    Post subject: Query on Sorting TSQ Data
Reply with quote

have a TSQ which is populated from the database, want to give user the option to sort the TSQ and re-display the data.

One option is re-fetch the data from the database and display the screen, then I am doing lot of IO's when I have all the information in the TSQ.

Don't want to bubble sort, can not use sort-in and sort-out as this is not a batch module.

Can not use indexed option as I have to populate the data into an array in ascending or descending.

Cannot use temporary db2 tables as it will go away after each session.

Any ideas?
Back to top
View user's profile Send private message

parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Sun Jul 10, 2005 2:58 am    Post subject:
Reply with quote

I think,

The best option would be to write your own sort routine.
Heapsort or Quicksort can be a good choice.

Let me know if you have any better options in this case.
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 query to fetch record which has only ... maxsubrat DB2 11 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us