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 |
In INITIALIZE what is Repalcing Word will do
what is the maximum error code in mainframe
in real time what is the suitable exp where in-stream procedure is better then catalog procedure.
In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)
How you can read the file from bottom?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
where will we code call by content and call by reference dude pls reply soon ?
how we can edit records in vsam data set and non vsam data sets
What are the steps you go through while creating a COBOL program executable?
can you declare redefine in level 01?
if we have a 10 steps how to override the 4th step in jcl?
How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.