Previous Topic: Identifying the Operating ModeNext Topic: Including Data Descriptions


Identifying the Subschema

A subschema is a program's view of the database and typically includes a subset of the records, record elements, sets, and areas defined in the schema describing the database to be accessed. A subschema can also limit the types of DML functions that can be issued by programs that use it.

The subschema to be used by the program is identified through a precompiler-directive statement that varies based on the language in which the program is written. COBOL programs identify the subschema in a special section of the DATA DIVISION called the SCHEMA SECTION, as illustrated below:

SCHEMA SECTION.
DB EMPSS01 WITHIN EMPSCHM VERSION 100.

In this example, EMPSS01 is the name of the subschema. Version 100 of EMPSCHM is the schema under which it is defined.