This topic lists environment variables that relate to the sorting functionality.
Syntax
Windows:
SET MFJSENGINE=value
UNIX:
MFJSENGINE=value
export MFJSENGINE
Example
Default
The default is DFSORT.
For a COBOL sort not running under mainframe emulation, setting the environment variable MFJSTATS to ON creates a report containing statistics for the SORT that is displayed to SYSOUT. If a report file already exists for a previous SORT, the new statistics are appended to the end of the previous one.
If you are performing a COBOL sort using mainframe emulation, you can create a statistics report by modifying the JCL statement.
Syntax
Windows:
SET MFJSTATS=switch
UNIX:
MFJSTATS=switch
export MFJSTATS
Parameters
switch Switches report creation ON or OFF. The default is OFF.
Syntax
Windows:
SET SORTCOMPRESS=n
UNIX:
SORTCOMPRESS=n
export SORTCOMPRESS
Parameters
n - An integer that indicates if compression is enabled or not. 0 (zero, the default) indicates not enabled; any positive integer indicates enabled. When enabled, it allows for run-length encoding of sort records, resulting in much better performance when records contain multiple repeated characters.
Comments
This variable is recommended if the sort records contain many single repeated characters, for example, multiple spaces, as it can be very effective in improving memory usage and therefore sort performance.
Example
Windows:
SET SORTCOMPRESS=5
UNIX:
SORTCOMPRESS=5
export SORTCOMPRESS
Syntax
Windows:
SET SORTSCHEME=1
UNIX:
SORTSCHEME=1
export SORTSCHEME
Syntax
Windows:
SET SORTSPACE=n[K|k|M|m|G|g]
UNIX:
SORTSPACE=n[K|k|M|m|G|g]
export SORTSPACE
Parameters
n[K|k|M|m|G|g The amount of memory to be allocated to internal workspace for SORT operations. K or k indicates kilobytes, M or m indicates megabytes and G or g indicates gigabytes. No letter indicates bytes. Defaults to 1 megabyte.
Comments
A larger value for SORTSPACE will generally result in a faster sort. However, if you specify a value that exceeds the capacity of main memory in your computer, such that the operating system has to page memory in and out, performance will be degraded.
Example
Windows:
SET SORTSPACE=1024K
UNIX:
SORTSPACE=1024K
export SORTSPACE
Syntax
Windows:
SET SORTTEMPSPACE=n[K|k|M|m|G|g]
UNIX:
SORTTEMPSPACE=n[K|k|M|m|G|g]
export SORTTEMPSPACE
Parameters
n[K|k|M|m|G|g] The amount of memory to be allocated to temporary workspace for SORT operations. K or k indicates kilobytes, M or m indicates megabytes and G or g indicates gigabytes. No letter indicates bytes. 32 megabytes is the lowest amount of memory that can be allocated.
Comments
The memory allocation strategy used by SORT can be adjusted through use of SORTTEMPSPACE, which generally improves performance in systems suffering from memory fragmentation.
Example
Windows:
SET SORTTEMPSPACE=250MB
UNIX:
SORTTEMPSPACE=250MB
export SORTTEMPSPACE
Syntax
Windows:
SET SORTTYPE=2
UNIX:
SORTTYPE=2
export SORTTYPE