A file can be sorted internally (i.e. by using the COBOL program) or externally (i.e. by using JCL). Most of the time designer prefer exteranl sort becasue it is faster than internal cobol sort.
The Sort statement controls the processing in a program that uses an internal sort. It specifies the name of the sort file, the sequence that the records are to be sorted into, the input file or input processing, and the output file or output processing.
We will discuss two very important feature which can be used for pre and post processing of file records using SORT clause. Refer below flow:
- INPUT PROCEDURE: They are used to process file records before it actually sort.
- OUTPUT PROCEDURE : They are used to process file records after file is sorted.
Format :
No comments:
Post a Comment