2.3.3 Creating a work file output directory

Executor: HiRDB administrator

You can create a directory to serve as the output destination of work files output by HiRDB. You can then specify that directory as the output destination for the various work files that are generated when commands or utilities are executed. Since there will consequently be only one output destination for each unit, the difficult job of administering work files becomes easier. HiRDB can be operated without creating a work file output directory, but work files are then output to a variety of destinations and it is impossible to delete work files using the pdcspool command. For this reason, we recommend that you create a work file output directory.

Organization of this subsection
(1) Calculating the size of the work file output directory
(2) Specifying the work file output directory
(3) Deleting work files

(1) Calculating the size of the work file output directory

Set the free space in the work file output directory to be at least the value shown below. When HiRDB or a command terminates abnormally while a work file is being output, the work file is not deleted. For this reason, before executing the pdcspool command, set a value that ensures sufficient space in the work file output directory so that disk space does not run short.

Work file output directory size (kilobytes) =
178,224 + a + b + c + e + f + g + h
VariableDescriptionFormula reference site
aSpace for the process results file when pdconstck is executed19.1.10 File sizes required for execution of the integrity check utility (pdconstck)
bSpace for the following files when pddbst is executed
  • Work files
  • Work files for sorting
19.1.4 File sizes required for the execution of the database condition analysis utility (pddbst)
cSpace for the following files when pdload is executed
  • Index information file
  • Error information file
  • Temporary file for creating an error information file
  • LOB middle file
  • Work file for sorting
19.1.1 File sizes required for the execution of the database load utility (pdload)
eSpace for the following files when pdrbal is executed
  • Index information file
  • Work file for sorting
19.1.9 File sizes required for execution of the rebalancing utility (pdrbal)
fSpace for the following files when pdrorg is executed
  • Index information file
  • Work file for sorting
19.1.2 File sizes required for the execution of the database reorganization utility (pdrorg)
gSpace for a work directory for sorting when pdrstr -w is executedThe manual HiRDB Version 9 Command Reference
hSpace for the following files when pdstedit is executed
  • Work files
  • Work file for sorting
  • DAT-format files
19.1.3 File sizes required for the execution of the statistics analysis utility (pdstedit)

(2) Specifying the work file output directory

To create a single output destination for work files, specify the created directory in the pd_tmp_directory operand.

If the pd_tmp_directory operand is not specified, HiRDB outputs work files to the directories determined by individual commands or utilities. The work file output destination when a command or utility is executed is the following:

  1. The output destination specified in the command option or utility control statement
  2. If not specified as in location 1, the output destination specified by the pd_tmp_directory operand
  3. If not specified as in location 2, the output destination specified by the system environment variable TMP
  4. If not specified as in location 3, %PDDIR%\tmp

(3) Deleting work files

HiRDB normally deletes work files every 24 hours. This deletion interval can be changed with the pd_spool_cleanup_interval operand. You can also specify deletion of only those files output prior to the date specified by the pd_spool_cleanup_interval_level operand. In this case, files in the work file output directory specified in the pd_tmp_directory operand are deleted.

Those work files output by commands and utilities that are not deleted by HiRDB must be deleted periodically using the pdcspool command. In this case as well, files in the work file output directory specified in the pd_tmp_directory operand are deleted.

For details about deleting work files, see 2.3.2 Deleting files from the HiRDB directory.