View previous topic :: View next topic
|
Author |
Message |
sujan_mf
New User
Joined: 09 Mar 2005 Posts: 7
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|