A subschema is a program's view of the database; it typically defines a subset of the records and record elements contained in the schema. The following rules apply to subschema usage:
Comparing Subschema and Schema
The table below compares the features and characteristics of subschemas and schemas.
Subschema |
Schema |
---|---|
One or more per database |
One per database |
A program's view of the database (subset of records and record elements) |
Complete database description (all records and record elements) |
Source description resides in the DDLDML area of the dictionary |
Source description resides in the DDLDML area of the dictionary |
Source description used at DML program compile time |
Source description not used at DML program compile time |
A load module resides in the DDLDCLOD area of the dictionary or in a load (core-image) library |
No load module |
Load module used at run time |
Not used at run time |
Subschema Access Restrictions
The subschema may place restrictions on the DML statements that can be used to access database records. For example, you may be able to retrieve a record but not modify or erase it.
DBA-designated access restrictions, defined in the subschema, control program access to the database. Restrictions can be placed on:
For example, a subschema with an update access restriction on the ORG-DEMO-REGION area can prevent programs from readying that area in any update mode.
For example, ERASE IS NOT ALLOWED for the OFFICE record type prohibits a program using the subschema from erasing OFFICE record occurrences.
Note: The DML OBTAIN statement is a combination of FIND and GET; access restrictions on either FIND or GET will affect the use of OBTAIN.
For example, DISCONNECT IS NOT ALLOWED for the JOB-EMPOSITION set prohibits a program from disconnecting EMPOSITION occurrences from the JOB-EMPOSITION set.
If your program issues a DML statement that is prohibited in the subschema, the DBMS returns a status of nn10 in the ERROR-STATUS field in the IDMS communications block. The IDMSRPTS utility (discussed below) produces listings of any access restrictions that apply to a given subschema.
Program Registration
The DBA can specify in the subschema that each program that is to use the subschema must be defined in the dictionary before compilation under one of the precompilers. If program registration is in effect, you should ensure that the name listed in the PROGRAM-ID statement (for COBOL) matches the program name registered with IDD.
IDMSRPTS Utility
The IDMSRPTS utility produces listings that describe the database definition (that is, the schema and all associated subschemas). These reports are useful in all phases of program development; they provide the following information:
IDMSRPTS Parameters
The table below lists the parameters of the IDMSRPTS utility that are most useful to applications programmers.
Parameter |
Requested information |
---|---|
RECDES |
All records and record elements defined in the schema |
SETDES |
Set name, owner, membership options, and linkage options for all sets defined in the schema |
SUBREC |
All records and record elements defined in the subschema; access restrictions placed on records |
SUBSET |
Set name, owner, membership options, and linkage options for all sets defined in the subschema; access restrictions placed on sets |
SUBAREA |
Usage modes applicable to subschema areas, default usage modes; access restrictions placed on areas |
For more information on the IDMSRPTS utility, see CA IDMS Utilities Guide.
Copyright © 2013 CA.
All rights reserved.
|
|