HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide

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

8.2.2 Column data editing UOC routine creation procedure (UNIX)

This section explains the procedure for creating a column data editing UOC routine with the UNIX Datareplicator. The following figure shows the execution procedure for a column data editing UOC routine.

Figure 8-11 Column data editing UOC routine's execution procedure

[Figure]

Organization of this subsection
(1) Creation
(2) Compiling and linking
(3) Notes

(1) Creation

To create a shared library for the column data editing UOC routine interface:

  1. Select a target column that is to use the column data editing UOC routine interface.
  2. Create the function for the column data editing UOC routine interface.
  3. Compile and link the function for the column data editing UOC routine interface.

(2) Compiling and linking

The compiling and linking procedures are explained for each OS.

If an unresolved link error occurs, specify all libraries required during linking.

(a) HP-UX Datareplicator

UOC routine compilation
cc -c +z -I/opt/hirdbds/include
     UOC-routine-source-filename[UOC-routine-source-filename]...

Compilation of a UOC routine in an environment for the IPF version
   cc -c +DD64 +z -Y -I/opt/hirdbds/include UOC-source-file-name[UOC-source-file-name]...
-c: Object creation option.
+z: Position-independent code creation option.
-I: Directory that stores the header files provided by Datareplicator (always /opt/hirdbds/include). You can specify multiple directories if the UOC routine requires other header files.

UOC routine linkage
ld -b -o libhdscuoc.sl UOC-routine-object-filename[UOC-routine-object-filename]...

Linkage of a UOC routine in an environment for the IPF version
   ld -b -o libhdscuoc.so  UOC-object-file-name[UOC-object-file-name]...
(b) Solaris Datareplicator

UOC routine compilation
/opt/SUNWspro/bin/cc -c -KPIC -I/opt/hirdbds/include
     UOC-routine-source-filename[UOC-routine-source-filename]...
-c: Object creation option.
-KPIC: Position-independent code creation option.
-I: Directory that stores the header files provided by Datareplicator (always /opt/hirdbds/include). You can specify multiple directories if the UOC routine requires other header files.

UOC routine linkage
/opt/SUNWspro/bin/cc -G -o libhdscuoc.so
UOC-routine-object-filename[UOC-routine-object-filename]...
(c) AIX Datareplicator

UOC routine compilation
xlc -c -I /opt/hirdbds/include
UOC-routine-source-file-name[UOC-routine-source-file-name]...

-c: Object creation option

-I: Directory that stores the header files provided by Datareplicator (always /opt/hirdbds/include). You can specify multiple directories if the UOC routine requires other header files.

UOC routine linkage
xlc -bM:SRE -bnoentry
    -bE:/opt/hirdbds/lib/libhdscuoc.exp -o libhdscuoc.a
      UOC-routine-object-file-name[UOC-routine-object-file-name]...
(d) Linux Datareplicator

Compilation of a UOC routine in an environment for the 32-bit or IPF version
gcc -c -fPIC -I/opt/hirdbds/include
     UOC-routine-source-filename[UOC-routine-source-filename]...

Compilation of a UOC routine in an environment for the EM64T version
   gcc -c -m32 -fPIC -I/opt/hirdbds/include UOC-source-file-name[UOC-source-file-name]...
-c: Object creation option.
-fPIC: Position-independent code creation option.
-I: Directory that stores the header files provided by Datareplicator (always /opt/hirdbds/include). You can specify multiple directories if the UOC routine requires other header files.

Linkage of a UOC routine in an environment for the 32-bit edition
ld -G -o libhdscuoc.so UOC-routine-object-filename[UOC-routine-object-filename]...

Linkage of a UOC routine in an environment for the IPF version
   gcc -shared -o libhdscuoc.so  UOC-object-file-name[UOC-object-file-name]...

Linkage of a UOC routine in an environment for the EM64T version
   gcc -m32 -shared -o libhdscuoc.so  UOC-object-file-name[UOC-object-file-name]...

(3) Notes

You can store a created send data UOC routine library in any directory. However, do not replace libhdscuoc.sl (libhdscuoc.so for the Solaris, Linux, or HP-UX (IPF) Datareplicator and libhdscuoc.a for AIX Datareplicator) under /opt/hirdbds/lib.