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: 6966
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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