When the IBM_SORT_MSGFILE environment variable is set to a path or file name, SORT messages are written to the specified file, for example:
export IBM_SORT_MSGFILE=./msg.txt
These messages are internal SORT error messages, which provide more information about the problem.