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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm


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