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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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