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
What is a report item?
What is inspect in cobol ?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
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
What is rmode(any) ?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Name some of the examples of COBOl 11?
How can you get the ksds file records into your cobol program?
What is static and dynamic call in cobol?
how do you reference the rrds file formats from cobol programs
Are you comfortable in cobol or jcl?
what is amode(24), amode(31), rmode(24) and rmode(any)?