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
 

 

SORT verb in COBOL

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

New User


Joined: 29 Apr 2008
Posts: 6
Location: mysore

PostPosted: Fri Jun 13, 2008 4:21 pm    Post subject: SORT verb in COBOL
Reply with quote

Hi,
I want to use the SORT verb in APS-COBOL program. For e.g:
SORT SORT-FILE
... ON ASCENDING KEY SORT-APPL-SEQ-NO
... INPUT PROCEDURE IS 2000-GENERATE-FILE-REQ
... OUTPUT PROCEDURE IS 5000-RETURN-SORTED-RECS

1. Is it mandatory that 2000-GENERATE-FILE-REQ and 5000-RETURN-SORTED-RECS should be SECTIONs?
2. Can I use this SORT statement inside a REPEAT loop?
3. Any other restrictions with the use of SORT verb?[/Search]
Back to top
View user's profile Send private message

itdsen

New User


Joined: 20 Sep 2006
Posts: 23
Location: Chennai

PostPosted: Fri Jun 13, 2008 5:40 pm    Post subject: Reply to: SORT verb in COBOL
Reply with quote

1. yes it should be sections (mandatory)
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 13, 2008 5:51 pm    Post subject: Re: SORT verb in COBOL
Reply with quote

arunkrishnac wrote:
Hi,
I want to use the SORT verb in APS-COBOL program. For e.g:
SORT SORT-FILE
... ON ASCENDING KEY SORT-APPL-SEQ-NO
... INPUT PROCEDURE IS 2000-GENERATE-FILE-REQ
... OUTPUT PROCEDURE IS 5000-RETURN-SORTED-RECS

1. Is it mandatory that 2000-GENERATE-FILE-REQ and 5000-RETURN-SORTED-RECS should be SECTIONs?
2. Can I use this SORT statement inside a REPEAT loop?
3. Any other restrictions with the use of SORT verb?[/Search]


1. Depends on the version of COBOL you are using.
2. Never tried it, sounds like a rather stupid idea.
3. Check the manual for your version of COBOL.
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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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