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
what is the difference between JES3 and JES2?
Can I share my data with other jobs? How?
What is the purpose of dd dummy statement?
How does jcl act on a cobol code?
How to pass data to a program that is coded in an exec statement?
How is a type of file defined in the jcl that executes the cobol program?
which parameter is used to check the syntax of a jcl without executing it?
write a jcl to execute a job by 7:00 am on jan 20,1986?
How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?
Explain the function of a dd statement?
How can a stopped job be started again?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
Can we use DISP=SHR in output file in JCL
How to alter the parameters for the existing gdg?
What is Cataloged Procedures?