To stop a sort or merge operation, move the integer 16 into the SORT-RETURN special register.
Move 16 into the register in either of the following ways:
Sort or merge processing will be stopped immediately after the next RELEASE or RETURN statement is performed.
Sort or merge processing will be stopped immediately after the next implicit RELEASE or RETURN is performed, which will occur after a record has been read from or written to the USING or GIVING file.
Control then returns to the statement following the SORT or MERGE statement.