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

Answer Posted / nagaraju

SORT SORT-FILE
ON ASCENDING/DESCENDING KEY key-value
USING input-file
GIVING output-file.

we can use input procedure and output procedure as fallow
SORT SORT-FILE
ON ASCENDING/DESCENDING KEY key-value
INPUT PROCEDURE IS --------
OUTPUT PROCEDURE IS -------.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to access the file from prodution from changeman tool and to submit a file to production

7077


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

5082


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2591


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

1742


What is the difference between PIC 9.99 and 9v99 in COBOL?

972


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

2115


Explain how you can characterize tables in cobol?

815


What is the difference between PIC 9.99 and PIC9v99?

1036


What is the use of intialize verb?

966


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

846


How you can characterize tables in cobol?

917


how do you reference the printer file formats from cobol programs

889


what are decleratives in cobol?

1997


What is amode(24)?

882


In which area will you utilize 88 level items in cobol?

887