This topic lists environment variables that relate to the sorting functionality.
MFJSENGINE={DFSORT|SYNCSORT}
Default: | MFJSENGINE=DFSORT |
MFJSDCBOUTFIL={ON|OFF}
MFJSDCBOUTFIL=OFF
MFJSDCBOUTFIL=ON
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
SET MFJSTATS=switch
Parameters
switch Switches report creation ON or OFF. The default is OFF.
Syntax
SET SORTCOMPRESS=n
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
SET SORTCOMPRESS=5
Syntax
SET SORTSCHEME=1
Syntax
SET SORTSPACE=n[K|k|M|m|G|g]
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
SET SORTSPACE=1024K
Syntax
SET SORTTEMPSPACE=n[K|k|M|m|G|g]
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
SET SORTTEMPSPACE=250MB
Syntax
SET SORTTYPE=2