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 |
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?
What R 2 of the common forms of the EVALUATE STATEMENT ?
How do you reference the following file formats from cobol programs?
I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?
what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.
what happens if we dont close cursor in db2-cobol pgm?
how to transfer the file from pc to mainframe??
can we print comp 3 stmts how ?
Difference between next and continue clause
what are the limitations of Inline Perform?
BY seeing a program how can we say that it is static call or dynamic call
What is the utilization of copybook in cobol?