When a program executes a sort on a large file it gets a disk-full error.
By default the runtime uses the current directory for the temporary files used in the sort.
Specify another directory with the SORT_DIR runtime configuration variable. Set it to a directory large enough to accomodate the sort, roughly twice the size of the data to be sorted. Make sure that permissions allow users to create files in the specified directory.
Avoid using a network drive as latency can cause the sort to be very slow.