When your output is a file, the file is closed and purged, and SORT attempts to remerge the desired string. If the output is a procedure and error recovery is specified, SORT repositions itself to remerge the desired string and subsequently terminates with SORT ERROR #19. When SORT is restarted, it remerges the desired string and starts user output with the first output record.