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
 

 

Regarding SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sujan_mf

New User


Joined: 09 Mar 2005
Posts: 7

PostPosted: Thu Nov 29, 2007 12:24 pm    Post subject: Regarding SORT
Reply with quote

Hi All,

Can we use the same SORT file for two SORT operations in the same program.

like, if am using the sort verb to sort all the records in a file in ascending order,now my requirement is like first i have to sort all the records in descending order then i have to make them in ascending order.
my question is like can we use the same sort file for these two sort operations.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Nov 29, 2007 1:55 pm    Post subject:
Reply with quote

Sujan,

Quote:
now my requirement is like first i have to sort all the records in descending order then i have to make them in ascending order.

Is this a homework?

Any reason for sorting same file twice, first in descending order followed by ascending (which effective is an ASCENDING order process).
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 29, 2007 2:26 pm    Post subject:
Reply with quote

how would you designate a second sort file?

answer to your question is yes. the sort file is closed (empty) when the return code for the cobol SORT RETURN .... command indicates eof. you can then start another sort definition.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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