Created On:  24 January 2012


COBOL application batch programs which is processing a high volume of detail records and after several hours they abort with a COBOL File error 34 on SORTWK1.


The runtime SORT temporary files were limited to 2GB of data each on UNIX ports.  Since all the data is eventually merged into one temporary file, this meant that the total amount of data that could be sorted was limited to less than 2GB.  An error 34 during the SORT was the usual indication that this limit had been reached. In version 7.1.1 it was a change that enables large file support on those UNIX systems which support it.   

The USE_LARGE_FILE_API configuration variable controls this support, just as it does for relative and sequential files.

On UNIX systems, this variable allows you to turn on or off file system API support for very large files (greater than 2 gigabytes). Support for large files is enabled when USE_LARGE_FILE_API is set to "1" (on, true, yes). Some UNIX systems do not support files greater than 2 gigabytes in size. In those situations, setting this variable to the default of "0" (off, false, no) causes the runtime to use the standard 32-bit file system API. This variable has no effect on Windows platforms.

The operating system kernel, file system, and C library must all support large file access in order to use this feature. The only workaround in case that the operating system doesn’t support large files is to Limit the total amount of data to be sorted to less than 2GB.

Incident #2556016