Previous Topic: AREA StatementNext Topic: SUBSCHEMA Statement


SCHEMA Statement

The generator SCHEMA statement describes the schema, files, and areas for CA IDMS/DB. This information is used to generate the CA IDMS/DB DDL SCHEMA, FILE, and AREA statements.

Note: For more information about CA IDMS logical DDL, see the CA IDMS Database Administration Guide.

Composed of Substatements

The generator SCHEMA statement is composed of these substatements:

Using the information included in the SCHEMA statement and (if provided) in the SYNONYMS and AREA statements the generator produces a CA IDMS/DB schema description that reflects the definition of the Total database defined in the input Total DDL. The schema that is produced includes complete definitions of the CA IDMS/DB record types that correspond to the Total files and describes the CA IDMS/DB sets that correspond to relationships among Total files.

The generator automatically generates the schema RECORD DESCRIPTION and SET DESCRIPTION components, converting Total file definitions to CA IDMS/DB record descriptions and Total master file-variable file relationships to CA IDMS/DB set descriptions. Any entries in the SYNONYMS control statement are applied to the appropriate record, element, and set descriptions. Any entries in the AREA statement are applied to the appropriate record descriptions.

Syntax

The following is the syntax for the SCHEMA statement. You must specify the keyword SCHEMA in column 1. All other clauses must begin between columns 8 and 11.

►►── SCHEMA ──────────────────────────────────────────────────────────────────►

 ►── SCHema name is schema-name ──────────────────────────────────────────────►

 ►──┬───────────────────────────────────────┬─────────────────────────────────►
    └─ Version is ─┬─ version-number ─────┬─┘
                   └─ NEXt ─┬─ HIGhest ─┬─┘
                            └─ LOWest ──┘
 ►──┬──────────────────────────────┬──────────────────────────────────────────►
    └─┬─ PREPared ─┬─ by user-id ──┘
      └─ REVised ──┘

 ►──┬──────────────────────────────────────────┬──────────────────────────────►
    └─ schema DEScription is description-text ─┘

 ►──┬─────────────────────────┬─ . ───────────────────────────────────────────►
    └─ MEMO DATe is mm/dd/yy ─┘

 ►── ADD AREa name is idms-area-name . ───────────────────────────────────────►◄

Parameters

SCHEMA

Required keyword; must occupy a line by itself and begin in column 1.

SCHEMA NAME IS schema-name

Specifies the name of the schema produced by the generator. Schema-name must be a 1- to 8-character value. The first character must be #, $, @, or A through Z. The remaining characters can be #, $, @, A through Z, 0 through 9, or the hyphen (except as the last character or following another hyphen).

VERSION

Qualifies the schema with a version number. Version numbers must fall within the range 1 through 9999, whether specified explicitly or specified in relation to existing versions.

version-number

Specifies an explicit version number and must be an unsigned integer in the range 1 through 9999.

NEXT HIGHEST

Specifies the highest version number assigned to schema-name plus one. For example, if versions 3, 5, and 8 of schema ETOTSCHM exist in the dictionary, the following statement would result in version 9 of ETOTSCHM being added to the dictionary:

SCHEMA NAME IS ETOTSCHM VERSION IS NEXT HIGHEST.

Note: If NEXT is specified without HIGHEST or LOWEST, the schema compiler assumes NEXT HIGHEST.

NEXT LOWEST

Specifies the lowest version number assigned to schema-name minus one. For example, if versions 3, 5, and 8 of schema ETOTSCHM exist in the dictionary, the following statement would result in version 2 of ETOTSCHM being added to the dictionary:

SCHEMA NAME IS ETOTSCHM VERSION IS NEXT LOWEST.

Note: If NEXT is specified without HIGHEST or LOWEST, the schema compiler assumes NEXT HIGHEST.

PREPARED/REVISED BY user-name

Identifies the schema author. User-name can be any 1- to 32-character value. If the value includes spaces or delimiters, it must be enclosed in quotation marks. PREPARED/REVISED BY is informational only.

SCHEMA DESCRIPTION IS description-text

Specifies remarks concerning the schema. Description-text is a 1- to 40-character alphanumeric value. If it contains spaces or delimiters, it must be enclosed in quotation marks. SCHEMA DESCRIPTION is informational only.

MEMO DATE IS mm/dd/yy

Specifies the date on which the schema was created. MEMO DATE is informational only.

ADD AREA NAME IS idms-area-name

Specifies the name of a CA IDMS/DB database area. Idms-area-name must be a 1- to 16-character value. The characters can be #, $, @, A through Z, 0 through 9, or the hyphen (except as the first or last character or following another hyphen). At least one alphabetic or international symbol (#, $, @) is required.

Idms-area-name must not be the same as the schema name or the name of any other component (including synonyms) within the schema.

Idms-area-name is copied into DML programs and the DMCL, so do not use a keyword known to either the DMCL or the DML compiler. For a list of these keywords, see the CA IDMS Database Administration Guide.

Example

The following is an example of the SCHEMA control statement.

SCHEMA
       SCHEMA NAME IS ETOTSCHM VERSION IS 1
       MEMO DATE IS 10/19/91.

       ADD
       AREA NAME IS CUSTOMER-REGION.