AcuSort Environment Variables

The following environment variables affect AcuSort behavior:

A_TMPDIR, TMPDIR These variables control the location of any temporary AcuSort files. A_TMPDIR is checked first, and then TMPDIR. Temporary files created by AcuSort are placed in this directory. The default value is the current working directory.
ACUSORT_FILE_MEMORY This variable allows you to set the maximum amount of memory in megabytes to be used for buffering I/O data with the temporary file. The default value is "1".

The default value should be adequate for most situations. However, if very large records are in use, you may want to increase this value in order to hold several records. The higher setting allows the buffer layer to avoid doing I/O for record comparisons during a SORT/MERGE process.

Tip: The number of file buffer blocks is controlled by the ACUSORT_FILE_MEMORY environment variable. It is set in units of megabytes. The buffer block size is 4096 bytes; therefore, for each MB, you get 256 buffer blocks. One buffer block will be reserved for each sorted region in the temporary file. The number of sorted regions in the temporary file will depend on the size of the records being operated on and the amount of memory allocated for sorting with the ACUSORT_MEMORY environment variable. Buffers remaining after this reservation may be used for read-ahead. Up to eight buffers per region will be used for read ahead.
ACUSORT_MEMORY This variable sets the number of megabytes of memory allowed for sorting records. Sort performance may improve as more memory is allocated for this purpose. The default value is "2".
ACUSORT_TRACE This variable controls the type of information written to the AcuSort log file. The following values determine which sets of log messages appear:
  • 1 -- general program
  • 2 -- record import/export
  • 4 -- numeric values comparison
  • 8 -- numeric values conversion
  • 16 -- temporary file buffer
  • 32 -- command structure
  • 64 -- modes
  • 128 -- parser
  • 256 -- lexer

Set ACUSORT_TRACE to the sum of the numbers corresponding to the sets of information you want written to the log file.

Please note that much of this information is intended only for diagnostic use. You should not rely on the content of the information written to the log file, as it is subject to change without notice.

Tip: For time-critical SORTs, examine the AcuSort trace output (specifically the buffer and import/export categories) to see various statistics about sorted region counts and buffer usage. Adjust the memory configuration variables as appropriate.
dd_SYSOUT This configuration variable specifies the name of the AcuSort log file. Various information about AcuSort functions is written to this file. The default value is SYSOUT.
USE_LARGE_FILE_API On UNIX systems, setting this variable to 1 causes AcuSort to use the large file API. The default value of 0 uses the normal file API, which cannot access files larger than 2GB. This variable applies to both the USE and GIVE files, and the temporary AcuSort file. If the total size of input records is less than 2GB, leave this variable set to the default of 0. Otherwise, set it to 1. (Note that the system must support the large file API in order for this variable to have any effect.) Windows versions of AcuSort can always access large files, so it is not necessary to set this variable on Windows platforms.