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
 

 

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 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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 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


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