Skip to main content

Problem:

Customer has a script written in-house that uses the 'rebuild' command to rebuild some data files.  Since upgrading their version of COBOL, the script has begun failing with:

build.rad1

/v1/hosp/seqrad/RAD0.dat,/v1/h1/rad/RAD0 -o:seq,ind -k:1 41 -r:f72 -i -e

***Error during sort operation - status 9-037

Resolution:

File status 9-037 means a permission problem.   I notice the script changes directories to $COBDIR/bin and invokes rebuild with "dot-slash":  ./rebuild.   The rebuild input and output files are specified by full path and are located elsewhere, but at the time rebuild is running, the current working directory is $COBDIR/bin.

The Server Express install script sets permissions such that a common user cannot disturb official files and directories.  The user running this script does not have permission to write in $COBDIR/bin -- this is intentional.

Although the rebuild input and output files are specified by full path and are located elsewhere, rebuild tries to create temporary "scratch" work files in the current directory (or in $TMPDIR if TMPDIR were set).

The reason the script fails is that rebuild does not have permission to create its temporary work files in $COBDIR/bin.

Do not run rebuild from $COBDIR/bin.  Instead, make sure the PATH environment variable contains $COBDIR/bin.  Then the rebuild command (and other commands in $COBDIR/bin) will be accessible from any current working directory.  It should not be necessary to cd to $COBDIR/bin and run rebuild with "dot-slash".

Old KB# 2145

#RMCOBOL
#netexpress
#AcuCobol
#ServerExpress
#COBOL