Previous Topic: Defining New Catalog ComponentsNext Topic: Defining New System Dictionaries


Defining New Application Dictionaries

Steps

To create a new application dictionary, follow these steps:

Action

Steps

Start a session in the command facility

CONNECT TO SYSTEM

Define segments for the base definition and the catalog components of the dictionary

Note that you need the catalog component only if the SQL option is installed at your site.

CREATE SEGMENT

Add the new segment(s) to the DMCL used at runtime

ALTER DMCL with the ADD SEGMENT clause

If you created two segments, define a new database name in the database name table

CREATE DBNAME

Generate, punch, and linkedit the new DMCL

See Chapter 27, “Modifying Physical Database Definitions”

If you created a new database name, generate, punch, and linkedit the new database name table

See Chapter 28, “Modifying Database Name Tables”

Create and format new dictionary files

See Chapter 17, “Allocating and Formatting Files”

Make the DMCL available to the runtime system

See Chapter 27, “Modifying Physical Database Definitions”

Populate the dictionary with CA-supplied definitions

Use IDD DDDL statements to add entity, class, and attribute definitions, protocols, and standard error routines

If you created a new catalog component:

  • Populate it with the system table and view definitions
  • Execute UPDATE STATISTICS for the DDLCAT area of the new dictionary
  • Grant appropriate authorities to define schemas in the new dictionary

 

Example

The following example illustrates how to define a new application dictionary. It consists of a new definition component in segment TESTDICT, a new catalog component in segment TESTCAT, and the system message component.

The database name for the dictionary is TESTDICT.

  1. Define the new TESTDICT and TESTCAT segments and their areas and files.
    create segment testdict
      for nonsql
      page group 0
      maximum records per page 255;
    
    add file testdml
      assign to testdml
      dsname 'test.ddldml';
    
    add file testlod
      assign to testlod
      dsname 'test.ddldclod';
    
    add area ddldml
      primary space 10000 pages
        from page 5000001
      maximum space 20000 pages
      page size 4276
      within file testdml
        from 1 for all blocks;
    
    add area ddldclod
      primary space 1000 pages
        from page 5020001
      maximum space 5000
      page size 8196
      within file testlod
        from 1 for all blocks;
    
    create segment testcat
      for sql
      page group 0
      maximum records per page 255
      stamp by area;
    
    add file testcat
      assign to testcat
      dsname 'test.testcat';
    
    add file testcatx
      assign to testcats
      dsname 'test.testcatx';
    
    add file testcatl
      assign to testcatl
      dsname 'test.testcatl';
    
    add area ddlcat
      primary space 5000 pages
        from page 5030001
      maximum space 10000 pages
      page size 8196
      within file testcat;
    
    add area ddlcatx
      primary space 1000 pages
        from page 5040001
      maximum space 3000 pages
      page size 8196
      within file testcatx;
    
    add area ddlcatlod
      primary space 500 pages
        from page 5045001
      maximum space 5000 pages
      page size 8196
      within file testcatl;
    
  2. Modify the DMCL
  3. Generate, punch, and linkedit the new DMCL:
    generate dmcl idmsdmcl;
    
  4. Define a new database name for the dictionary
    add dbname alldbs.testdict
      segment testdict
      segment testcat
      segment sysmsg;
    
  5. Generate, punch, and link the database name table:
    generate table dbtable alldbs;
    
  6. Create and format new dictionary files:
    format segment testdict;
    format segment testcat;
    
  7. Populate the dictionary using the appropriate source from the installation source library.
  8. Execute UPDATE STATISTICS for the new DDLCAT area:
    update statistics for area testcat.ddlcat;
    
  9. Assign appropriate authorities within the new dictionary.