Created On:  24 September 2010

Problem:

When sorting large files, or sorting in an environment that is short on available disk space, MFJSORT (running as a batch job step under Enterprise Server) may run out of disk space.

If this happens, the sort step will terminate with a return code 16, and give the message:

SORT020U: SORT(EXTSM) failed - sort engine status = 9/007

Resolution:

If the error was raised while writing to the SORTOUT file, you will also see the messages:-
SORT013U: I/O error on dataset 'SORTOUT'
SORT014U: Status = 9/007             

In the case of a problem with SORTOUT, the file location can be found in the JES messages:
MFSLV.JUNK.SORTOUT                                                SORTOUT
 /boot/stevev/sortout.dat                                          RETAINED

In the case of a problem with the work files used by MFJSORT, then the location will either be:

1) The folder pointed to by the TMPDIR environment variable
2) The first folder in the CAS_BATCH_PATH concatenation

N.B. If a folder name is specified in TMPDIR, it must exist - the folder will not be created "on the fly",
      and if it does not exist, the work files will be created in location (2).

The following lines from a CTF log show the messages created when allocation of a work file fails
because TMPDIR points to a non-existent folder:

MF.RTS 56 1  17 "/boot/stevev/temp/M$FST000.TMP" 3 16 0   <- Attempt to create the file at TMPDIR
MF.RTS 52 1  6 5 "/boot/stevev/temp"
MF.RTS 53 1  6 0X00000000 19
MF.RTS 57 1  17 14601                                     <- Failed, return code 9/009 (hex 3909)


MF.RTS 56 1  17 "M$FST000.TMP" 3 16 0                     <- Attempt to create the file at default
MF.RTS 52 1  6 34571 "M$FST000.TMP"
MF.RTS 52 1  11 0X09036D88 9223372036854775804 3 18
MF.RTS 53 1  11 0 0
MF.RTS 53 1  6 0X09036D88 0
MF.RTS 52 1  13 0X09036D88
MF.RTS 53 1  13 0 1 1 0
MF.RTS 57 1  17 0 151035280 0                             <- Succeeded, return code zero


You can use the command "df -h" to display the space available on all devices mounted on your system, and then point TMPDIR at a pre-defined folder on a device that has sufficient space (between 2 and 5 times the size of your input dataset, depending on the file attributes and sort options used).

Incident #2476553