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

Explain the configuration section of a cobol program with examples of syntax.

661


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1525


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1908


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6836


What is amode(24)?

684






What is rmode(any) ?

686


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1657


Write a program that uses move corresponding.

673


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2724


Differentiate between structured cobol programming and object-oriented cobol programming.

669


What is the problem of ordered sequential files access?

703


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697


Define cobol?

866


explain sorting techniques in cobol program?

692


What is report-item in COBOL?

711