Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

13.22.3 Standardizing space characters in a table

The procedure for standardizing space characters is explained below.

Procedure
To standardize space characters:
  1. Standardize the codes used to represent space characters in the existing data, as explained in (1) below.
  2. Specify pd_space_level=1 in the system common definition.
    This specification standardizes the space characters in the data to be stored from now on (by means of data loading or INSERT).
  3. Retrieve data by specifying PDSPACELVL=3 in the client environment definition as needed.
Organization of this subsection
(1) Standardizing space characters in existing data
(2) Standardizing space characters in new data
(3) Migrating table data to another system
(4) Using data unloaded with the -W option specified in a UAP

(1) Standardizing space characters in existing data

The following figure illustrates the procedure for standardizing the space characters in existing data.

Figure 13-95 Procedure for standardizing space characters in existing data

[Figure]

Explanation
To standardize the space characters in existing data, use the database reorganization utility (pdrorg command) to reorganize the table. Specify spacelvl=1 in the option statement of the pdrorg command.
For details on reorganizing a table, see 13.2 Reorganizing a table and 13.3 Reorganizing a table (examples).

(2) Standardizing space characters in new data

The following figure illustrates the procedure for standardizing the space characters in new data.

Figure 13-96 Procedure for standardizing space characters in new data

[Figure]

Explanation
To standardize the space characters in new data, specify spacelvl=1 in the option statement when the data is loaded with the database load utility (pdload command). If the spacelvl operand in the option statement is omitted, the value specified in the pd_space_level operand in the system common definition will be assumed.
For details on loading data, see the manual HiRDB Version 9 Command Reference.

(3) Migrating table data to another system

The following figure illustrates the procedure for standardizing the space characters when table data is migrated to another system.

Figure 13-97 Procedure for standardizing space characters when table data is migrated to another system

[Figure]

Explanation
For table data migrated to another system, specify spacelvl=1 in the option statement of the database load utility (pdload command) when the data is loaded at the migration destination system.
For details on migrating table data to another system, see 12.1 Migrating a table to another HiRDB system.

(4) Using data unloaded with the -W option specified in a UAP

The following figure illustrates the procedure for converting space characters when data unloaded with the -W option specified is used by a UAP (in other words, when this UAP performs comparison processing). In this case, the space characters in the table must already be standardized.

Figure 13-98 Using data unloaded with the -W option specified in a UAP

[Figure]

Explanation
  • When the data is unloaded, specify spacelvl=3 in the option statement of the database reorganization utility (pdrorg command). Each double-byte space in the national character data is converted into two single-byte spaces.
  • The comparison processing of national character data by the UAP is carried out in units of single-byte spaces.