Stopping a sort or merge operation prematurely
To stop a sort or merge operation,
move the integer 16 into the SORT-RETURN special register.
About this task
Move 16 into the register in either of the following ways:
- Use
MOVEin an input or output procedure.Sort or merge processing will be stopped immediately after the next
RELEASEorRETURNstatement is performed. - Reset the register in a declarative section entered during
processing of a
USINGorGIVINGfile.Sort or merge processing will be stopped immediately after the next implicit
RELEASEorRETURNis performed, which will occur after a record has been read from or written to theUSINGorGIVINGfile.
Control then returns to the statement following the SORT or MERGE statement.