This article describes how to overcome the following error produced by the rebuild command: “***Error during sort operation - status 9-037”.
Problem:
While rebuilding data files with the ‘rebuild’ command, the following error appears: “***Error during sort operation - status 9-037”. What is it and how can it be resolved?
Resolution:
File status 9-037 indicates a permission problem. It means rebuild does not have permission to create a particular file. Check that the user has write permissions on the output file specified on the "rebuild" command.
The rebuild command also creates temporary work files while it runs. By default it tries to create these temporary files in the current directory, so the user must have write permissions in the current directory. If the TMPDIR environment variable is set, rebuild will create its temporary files there, so the user must have write permissions there.
In one historical case, an end user script was changing directories to $COBDIR/bin and invoking rebuild there with "dot-slash", that is,
$> cd $COBDIR/bin
$> ./rebuild <arguments>
Files and directories in $COBDIR are owned by root and protected such that a regular user cannot disturb them; this is intentional. A regular user does not have permission to write in $COBDIR/bin so the rebuild command cannot create its temporary files there.
As a solution to this problem, do not invoke rebuild from $COBDIR/bin. Instead, make sure the PATH environment variable contains $COBDIR/bin, then invoke rebuild from a directory in which the user has write permissions, or set TMPDIR to a location where the user has write permissions.
Incident Number: