24.3.1 Creating the configuration files

Table 24-6 lists and explains the configuration files that are to be created for the HiRDB/Single Server; Table 24-7 lists and explains the configuration files that are to be created for the HiRDB/Parallel Server.

To use these files, they must be copied under $PDDIR/conf, then appropriate changes must be made to them according to the notes provided in Table 23-6 or 23-7.

Specify the HiRDB directory path in the PDDIR environment variable.

Organization of this subsection
(1) Allocating and initializing HiRDB file system areas
(2) Creating the initialization control statement file
(3) Starting HiRDB
(4) Table definition
(5) Data loading
(6) Creating a shell script for executing operation commands under aliases

(1) Allocating and initializing HiRDB file system areas

(a) Creating a HiRDB file system area for the database

The following instruction must be executed to create the HiRDB file system areas:

HiRDB/Single Server
Execute the following shell script:
$PDDIR/sample/sampleconf/fmkfile
Note
Be sure to set the PDDIR environment variable.
HiRDB/Parallel Server
Execute the following shell script at each host (host1 and host2):
$PDDIR/sample/sampleconf/fmkfile
Note
Be sure to set the PDDIR environment variable.
(b) Allocating files such as system log files

The following instruction must be executed to allocate files such as system log files:

HiRDB/Single Server
Execute the following shell script:
$PDDIR/sample/sampleconf/sysfmkfs
Note
Be sure to set the PDDIR environment variable.
HiRDB/Parallel Server
Execute the following shell script at host1:
$PDDIR/sample/sampleconf/sysfmkfs1
Note
Be sure to set the PDDIR environment variable.
Execute the following shell script at host2:
$PDDIR/sample/sampleconf/sysfmkfs2
Note
Be sure to set the PDDIR environment variable.
(c) Initializing files such as system log files

The following instruction must be executed to initialize files such as system log files:

HiRDB/Single Server
Execute the following shell script:
$PDDIR/sample/sampleconf/sysfint
Note
Be sure to set the PDDIR environment variable.
HiRDB/Parallel Server
Execute the following shell script at the host where the system manager is defined (host1):
$PDDIR/sample/sampleconf/sysfint
Note
Be sure to set the PDDIR environment variable.

(2) Creating the initialization control statement file

The instruction shown as follows must be executed to create the initialization control statement file.

The name of the initialization control statement file is $PDDIR/sample/sampleconf/rdinit01.

HiRDB/Single Server
Execute the following shell script:
$PDDIR/sample/sampleconf/mkinit
Note
Be sure to set the PDDIR environment variable.
HiRDB/Parallel Server
Execute the following shell script at the dictionary server:
$PDDIR/sample/sampleconf/mkinit
Note
Be sure to set the PDDIR environment variable.

(3) Starting HiRDB

Use the pdstart command to start HiRDB.

(4) Table definition

The database definition utility (pddef) is executed shown as follows:

$PDDIR/bin/pddef < $PDDIR/sample/sampleDB/tblecreate_e
Note
Set appropriate values in the PDUSER, PDDIR, PDNAMEPORT, and PDHOST environment variables.

(5) Data loading

Execute the following shell script to load data using the database load utility (pdload). For details about data loading, see the manual HiRDB Version 8 Command Reference.

$PDDIR/sample/sampleDB/loadinf_e

(6) Creating a shell script for executing operation commands under aliases

It may not be possible to execute a HiRDB operation command because it has the same name as an OS command or a command provided by another program. In this case, the following actions can be taken:

If neither of these actions can be taken, there is a way to execute a HiRDB operation command under a user-defined name. HiRDB provides a sample shell script for this purpose.

(a) Names of sample files for shell script provided by HiRDB

HiRDB provides a sample shell script file appropriate to each platform. These files are listed in Table 24-8; they are stored in the following directory:

(b) Procedure for creating an alias for a command

To create an alias for an operation command:

  1. Copy the shell script sample file into a desired directory. To create aliases for multiple commands, copy it once for each of the commands. Do not copy it into the bin or lib directory under the HiRDB directory.
  2. Set the copy target directory for the sample file in the PATH environment variable, or set path as the search path.
  3. Rename the file copied in step 1 to the alias of the HiRDB operation command. For example, command name pdmod might be changed to hirmod.
  4. Open the copied sample file and change cc...cc to the name of the HiRDB operation command to be executed under the alias, as shown in Figures 24-4 and 24-5.

    Figure 24-4 Sample file for Bourne shell

    [Figure]

    Figure 24-5 Sample file for C shell

    [Figure]

This procedure enables a HiRDB operation command to be executed under any desired name. Options can be specified in the alias command in the same manner as with the normal HiRDB operation command.

(c) Notes
  1. A name other than the HiRDB operation command name must be assigned to a copy of the sample file.
  2. It is possible that the $PDDIR/bin and $PDDIR/lib directories under the HiRDB directory will be deleted in their entirety when the pdsetup -d command is executed. For this reason, sample files must not be copied into these directories.
  3. The contents of the sample files must not be changed, except for setting a HiRDB operation command name.
  4. To cancel execution of a created alias command during command processing, the HiRDB command process must be terminated at an extension of the alias process. Terminating the alias process does not automatically terminate the HiRDB command process.
  5. If a created alias command is executed and another process is terminated while the HiRDB command is waiting for a response to be entered, HiRDB command execution may result in an error or the response entry wait status may still be in effect. If the response entry wait status is still in effect, the HiRDB command process must be terminated.