The EQUALS parameter insures that equal-keyed records are merged in the order of their respective files. Equal-keyed records from the lowest numbered SORTINnn file are written before those from the second input file, etc. NOEQUALS, the default, specifies that equal-keyed records from different files be written in random order.
The order of equal-keyed records within each input file is always preserved during a merge, whether or not the EQUALS parameter is specified.
When the EQUALS parameter is used with the SUM or DUPKEYS control statement, the first of the equal-keyed records is retained with the sum or DUPKEYS function value; all other records are deleted after the specified field(s) have been calculated.
EQUALS/NOEQUALS can also be specified as a PARM option on the EXEC statement. If this option is specified both on the MERGE control statement and as a PARM option, the MERGE specification takes precedence.