How do you sort in a COBOL program? Give sort file
definition, sort statement syntax and meaning.

Answer Posted / mftech

Need to define the SORT-FILE in SD in file section.

Sort SORT-FILE
Using Input-File
Giving Output-File

Can also use inout procedure and output ptocedure inplace
of input fiile and output files.

Is This Answer Correct ?    14 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a SSRANGE and NOSSRANGE?

824


What are the different types of condition in cobol and write their forms.

660


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


What is the difference between perform … with test after and perform … with test before?

885


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065






what is s000 u4087 error? please give the all error codes in cobol,jcl.

17048


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2734


How to remove 2 duplicate records and copy only one using job control language?

755


what is search and searchall?what is the diffrence between them?give an best example?

5563


What are the cobol coding sheets?

666


What is an in line perform? When would you use it? Anything else you wish to say about it.

649


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1808


i want a program using by if, evaluate , string, unstring, perform, occurs?

4062


In COBOL programming, what is PERFORM? What is VARYING?

672