Answer Posted / dimpy19
SORT work-file ON ASCENDING KEY rec-key1
[ON DESCENDING KEY rec-key2]
USING input-file GIVING output-file.
Input file - is the file which we have to sort either in ascending or descending order.
Work file - is used to hold records while the sort process is in progress.
Input file records are transferred to the work file for the sorting process.
This file should be defined in the File-Section under SD entry.
Output file - is the file which we get after the sorting process.
It is the final output of the Sort verb.
SORT performs the following operations -
1. Opens work-file in I-O mode, input-file in the INPUT mode and output-file in the OUTPUT mode.
2. Transfers the records present in the input-file to the work-file.
3. Sorts the SORT-FILE in ascending/descending sequence by rec-key.
4. Transfers the sorted records from the work-file to the output-file.
5. Closes the input-file and the output-file and deletes the work-file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
what is use of disp parameter in dd statement?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
Which dd parameters are required?
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
how to do automated restart when a job abends?
when can a job time-out occur? How to overcome that?
what is the purpose of coding notify parameter in job statement?
How dummy is used in jcl?
Differentiate between addressing mode and run mode.
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
Explain the function of the dd dcb keyword?
Name the statement which can be used to send data to another mvs jes3 node?
Explain about LMFREE�free data set from its association with data ID