20.5 Examples

Example 1 shows how to use the registry facility initialization utility.

Example 1
Create the following RDAREAs:
  • PDREG (registry RDAREA)
  • PDREGLOB (registry LOB RDAREA)
Assume that the following HiRDB file system areas are already created:
  • /dbarea/area1 (regular file)
  • /dbarea/area2 (regular file)
Overview
[Figure]
Example of command execution

pdreginit -a /usr/seifile/regcont

Contents of the control statement file (/usr/seifile/regcont)

/* Defining registry RDAREA */
create rdarea PDREG globalbuffer gb1   ..................1
              for registry   ............................2
              page 4096 characters   ....................3
              storage control segment 50 pages   ........4
              file name "/dbarea/area1/rdreg01"
                  initial 50 segments ;   ...............5

/* Defining registry LOB RDAREA */
create rdarea PDREGLOB globalbuffer gb2   ...............6
              for LOB used by HiRDB(SQL_REGISTRY)   .....7
              page 8192 characters   ....................8
              storage control segment 1 pages   .........9
              file name "/dbarea/area2/rdreglob01"
                  initial 1000 segments ;   .............10

Explanation
  1. Name of the RDAREA: PDREG
  2. Type of the RDAREA: registry RDAREA (stores registry management information)
  3. Page length: 4096 characters
  4. Segment size: 50 pages
  5. Specification of the HiRDB file comprising the RDAREA:
    Name: /dbarea/area1/rdreg01
    Number of segments: 50
  6. Name of the RDAREA: PDREGLOB
  7. Type of RDAREA: registry LOB RDAREA
  8. Page length: 8192 characters
  9. Segment size: 1 page
  10. Specification of the HiRDB file comprising the RDAREA:
    Name: /dbarea/area2/rdreglob01
    Number of segments: 1000