Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us