8.9.7 idxwork statement (specification of directory for index information file)

The idxwork statement specifies the name of the directory to which the index information files created by the utility are to be output when the index or idxname statement is omitted.

Criterion
If you have specified neither the pd_tmp_directory operand in the system definition nor the TMPDIR environment variable, you must specify the idxwork statement, if possible, in order to avoid a shortage of space in the /tmp directory.
Rules
  1. If the index and idxwork statements are both omitted, the index information file is created in the directory shown in Table 8-42 Directory to which pdrorg outputs files on the server where the index RDAREA is located.
  2. You can specify as many idxwork statements as follows:
    HiRDB single server configuration:
    Specify only one idxwork statement.
    HiRDB parallel server configuration:
    For an index of a partitioned table, specify as many idxwork statements as there are servers that contain the table partitions. For a non-partitioned table or when reorganizing a partitioned table in units of RDAREAs, specify only one idxwork statement. You must specify the name of the server where the index RDAREA is located.
  3. If both idxwork and index statements are specified, the index statement takes effect, in which case the idxwork statement is ignored.
Organization of this subsection
(1) Format
(2) Explanation
(3) Notes

(1) Format

idxwork [server-name] directory-name

(2) Explanation

(a) server-name

~<identifier> ((1-8))

Specifies the name of the server used to create index information files.

HiRDB single server configuration
Do not specify this option. A single server name will be ignored, if specified.
HiRDB parallel server configuration
Specify the name of the server used to create index information files.
(b) directory-name

~<path name> ((1-255))

Specifies the absolute path name of the directory in which index information files are to be created.

(3) Notes

The following shows the name of the index information file that is created automatically.

(a) When the inner replica facility is not used

directory-name/INDEX-index-name-name-of-index-storage-RDAREA
-unique-character-string

Example:

If the idxwork statement specifies /hd400 as the directory name, IDX1 as the index name, and USER01 as the name of the index storage RDAREA, the created index information file will have the following name:

/hd0400/INDEX-IDX1-USER01-aaaa00001

(b) When the inner replica facility is used

directory-name/INDEX-index-name
-name-of-index-storage-RDAREA-GNgeneration-number-unique-character-string

Example:

If the idxwork statement specifies /hd400 as the directory name, IDX2 as the index name, USER01 as the name of the original index storage RDAREA, and 2 as the generation number of the RDAREA to be processed, the created index information file will have the following name:

/hd0400/INDEX-IDX2-USER01-GN2-aaaa00002