IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding SORT


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

PostPosted: Thu Nov 29, 2007 1:55 pm
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: 6966
Location: porcelain throne

PostPosted: Thu Nov 29, 2007 2:26 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top