How do you sort in a COBOL program? Give sort file
definition, sort statement syntax and meaning.
Answers were Sorted based on User's Feedback
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 |
Answer / 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 |
Answer / subhashini
we can sort a cobol program define SD SORT-FILE in
FILE SECTION
THE SYNTAX IS
SORT SORT-FILE IN ASCENDING/DESCENDING KEY USING
INPUT-FILE GIVING OUTPUT-FILE.
| Is This Answer Correct ? | 8 Yes | 5 No |
Answer / 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 |
Answer / bhaskar reddy
This is the exam for the sort command:
SORT SORTFILE ON ASCENDING/DESCENDING KEY USING FILE1,FILE2
GIVING FILE3.
| Is This Answer Correct ? | 2 Yes | 3 No |
how to resolve the file status 47.......
Explain how to differentiate call by context by comparing it to other calls?
88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above
if you give cylinder(1,1)how many cylinders it will be allocate?
which of the following can be used as a check protection symbol a.Z b.S c.* d.+
What are the pertinent COBOL commands?
wht is the difference between goto and perform stmts
how we can edit records in vsam data set and non vsam data sets
i want to enter the name 'pandu' into ur table how?
s9(18) comp-3:: What is the size of memory it takes internally?
how can we get current dat and time thru cobol pgm
Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.