8.11.2 Relationships between options and control statements

Organization of this subsection
(1) Options and control statements that are specified during reorganization using a UOC
(2) Option specification rules for reorganization using a UOC
(3) Control statement specification rules for reorganization using a UOC
(4) Relationship between the host and the server that calls the UOC
(5) Data that is passed to the UOC and pdrorg's data conversion timing

(1) Options and control statements that are specified during reorganization using a UOC

The table below shows the options and control statements that are specified during reorganization using a UOC.

Table 8-29 Options and control statements that are specified during reorganization using UOC

TypeOptionControl statementOutput to file
-k-Wunload statementunlduoc statementpdrorgUOC
Deleting unneeded data#1Table reorganizationrorgNY#3YOutputOptional
Table unload + reload operationUnload operationunld--Y#3YOutputOptional
Reload operationreld--Y#3------
Updating data for use by applications#2File output by pdrorgunldYY#3YOutputOptional
File output by UOCunldNY#4YNot applicableRequired
Legend:
Y: Specify.
N: Cannot be specified (results in an error if specified).
--: Ignored, if specified.
#1: If the table contains columns of an abstract data type, data is passed to the UOC only for the abstract data type columns for which the constructor parameter reverse creation function has been specified in the unld_func statement. In this case, the null value is passed to the UOC, but the retrieved data is stored in the unload data file. Therefore, the UOC cannot determine whether or not the data is needed.
#2: If the table contains columns of an abstract data type, specify the unld_func statement for all such abstract data type columns. If the unld_func statement is not specified, an error results.
#3: Specify the name of the unload data file in the unload statement.
#4: Specify (uoc) in the unload statement.

(2) Option specification rules for reorganization using a UOC

The following are the option specification rules for reorganization using a UOC:

  1. You can use a UOC for reorganization during table reorganization (-k rorg) or a table unload operation (-k unld).
  2. If the table contains a column of large object data type or an abstract data type with the large object data attribute, you must specify the -j option. An error results if the -j option is omitted.
  3. dic (data dictionary table is to be processed) cannot be specified in the -c option. Specifying dic results in an error.
  4. If you specify (uoc) in the unload statement, you cannot specify the -W option. Specifying the -W option results in an error.
  5. If you specify (uoc) in the unload statement, specifying the -f option results in an error.

(3) Control statement specification rules for reorganization using a UOC

The following are the control statement specification rules for reorganization using a UOC:

  1. To use a UOC for reorganization, you must always specify the following two control statements:
    • unlduoc statement
    • unload statement
  2. The lobunld statement cannot be specified.

(4) Relationship between the host and the server that calls the UOC

Table 8-28 describes the relationship between the host and the server that calls the UOC. You must provide the shared library that contains the applicable UOC on the appropriate host, as indicated in the table below.

Table 8-30 Relationship between the host and the server that calls the UOC

Execution environmentServerHost
HiRDB single server configuration-g omittedSingle serverHost where the single server is located
-g specifiedUtility server (pdrorgm)Host specified in the unload statement
HiRDB parallel server configuration-g omittedIn units of tablesNon-partitioned tableBack-end serverHost where the server containing the table is located
Partitioned tableAll hosts where the servers specified in the unload statement are located
In units of RDAREAsHost where the server containing the specified RDAREA is located
-g specifiedUtility server (pdrorgm)Host specified in the unload statement

(5) Data that is passed to the UOC and pdrorg's data conversion timing

pdrorg provides a function for converting the data according to specified options and control statements. Reorganization using a UOC can also use this function. This data conversion function passes unconverted data to the UOC and converts data before saving the data in the unload data file. The table below describes the data to be passed to the UOC and pdrorg's data conversion timing.

Table 8-31 Data that is passed to the UOC and pdrorg's data conversion timing

TypeOption or control statement available for data conversionData passed to UOCData conversion timing
Deleting unneeded data (table reorganization)-SData with spacesWhen unload data file is output
-W----
-W dat,sup or
-W extdat,sup
----
spacelvl in option statementData without space conversionWhen table is reloaded
blobtovarchar statement----
Deleting unneeded data (table unload + reload operations)-SData with spacesWhen unload data file is output
-W----
-W dat,sup or
-W extdat,sup
----
spacelvl in option statementData without space conversionWhen table is reloaded
blobtovarchar statement----
Updating data for use by applications (file output by pdrorg)-S----
-WData before being converted to DAT or binary formatWhen unload data file is output#
-W dat,sup or
-W extdat,sup
Data with spacesWhen unload data file is output#
spacelvl in option statementData without space conversionWhen unload data file is output#
blobtovarchar statementData in the BLOB formatWhen unload data file is output#
Updating data for use by applications (file output by UOC)-SData with spaces--
-W----
-W dat,sup or
-W extdat,sup
----
spacelvl in option statementData without space conversion--
blobtovarchar statement----
Converting character codescharset in the option statementData converted to the specified character codesWhen unload data is acquired (before the UOC is called)
Legend:
--: Not applicable
Note
If the table contains a column of DECIMAL type for which SUPPRESS was specified in the table definition, the data obtained after expansion is passed to the UOC. The data is converted when the table is reloaded.
#: The data obtained after editing by the UOC is converted.