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

Answer Posted / kavya

As he told above we need to specify the sort-file in sd
entry.
But syntax is as follows,

SORT SORT-FILE ON ASCENDING/DESCENDING KEY
USING INPUT-FILE
GIVING OUTPUT-FILE.

We have to specifies the key to sort.
INPUT-FILE is the file to sorted.The sorted OUTPUT is sent
to the OUTPUT-FILE.

Is This Answer Correct ?    34 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reference the fixed block file formats from cobol programs

713


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2665


What are the different data types in cobol?

801


What is amode(31)

732


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

685






Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2064


How do you define a variable of comp-1 and comp-2?

711


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1621


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

835


What is the difference between PIC 9.99 and PIC9v99?

790


How to know whether the module is dynamical or statistical?

666


What kind of error is trapped by on size error option?

749


What is the difference between Call and a Link?

707


What is length is cobol?

656


What type of SDLC u followed? Why?

1534