The input files to be merged through the MERGE statements which are specified in the USING phrase. These files should be sequential files and should be sorted on the merge keys. The SORT statement rules in respect of the ASCENDING/DECENDING KEY phrase are also applicable in this situation.
Let us suppose that there are three zones and as such three sales files are to be merged. The Three files are named as ZONE-FILE-1, ZONE-FILE-2 and ZONE-FILE-3.
It has been supposed that all the three input files and the last merged file termed as MERGED-FILE are the tape files.