Cyber_Database_Control_System_Ver_2_Data_Administration_Ref_Man_60485200E_May86 Cyber Database Control System Ver 2 Data Administration Ref Man 60485200E May86

Cyber_Database_Control_System_Ver_2_Data_Administration_Ref_Man_60485200E_May86 Cyber_Database_Control_System_Ver_2_Data_Administration_Ref_Man_60485200E_May86

User Manual: Pdf Cyber_Database_Control_System_Ver_2_Data_Administration_Ref_Man_60485200E_May86

Open the PDF directly: View PDF PDF.
Page Count: 412

DownloadCyber_Database_Control_System_Ver_2_Data_Administration_Ref_Man_60485200E_May86 Cyber Database Control System Ver 2 Data Administration Ref Man 60485200E May86
Open PDF In BrowserView PDF
60485200

CONTRPL DATA

DMS-170
CYBER DATABASE
CONTROL SYSTEM
VERSION 2
DATA ADMINISTRATION
REFERENCE MANUAL

CDC® OPERATING SYSTEMS:
NOS 2
NOS/BE 1

REVISION RECORD

Revision

Des c r ipt ion

A (05/14/82)

Initial release under NOS 2 and NOS/BE 1; PSR level 564. This manual represents a
complete reorganization according to audience of documentation for CDCS, DDL, and FDBF
(with FDBF separated into components of DDL and DML). This manual contains documentation
intended for a data administrator, and supersedes the following manuals for users of the
NOS 2 and NOS/BE operating systems: the CDCS 2 reference manual (Pub. No. 60491800); the
DDL Version 3 reference manuals, volumes 1 and 2 (Pub. No. 60481900 and 60482000); and
the FDBF 1 reference manual (Pub. No. 60482200). New features of CDCS 2.3 are also
documented in this revision; the features include automatic recovery, data base
transaction processing, data base versions, the basic recovery utility (DBREC), and
extensions to the master directory and to the operator interface.

B (08/26/83)

Released at PSR level 587. This revision documents improved duration loading
capabilities of CDCS and miscellaneous technical corrections.

C (09/22/83)

Released at PSR level 596. This revision documents a change to the procedure that
initializes CDCS under NOS 2.2.

D (02/20/84)

Released at PSR level 599. This revision documents support of concatenated keys for the
FORTRAN Interface and includes miscellaneous technical corrections.

E (05/13/86)

Released at PSR level 647. This revision removes references to FORTRAN 4 and
incorporates miscellaneous technical and editorial changes.

REVISION LETTERS I, 0, Q, AND X ARE NOT USED

©COPYRIGHT CONTROL DATA CORPORATION
1982, 1983, 1984, 1986
All Rights Reserved
Printed in the United States of America

Address comments concerning this manual to:
CONTROL DATA CORPORATION
Publications and Graphics Division
P.O. Box 3492
SUNNYVALE, CALIFORNIA 94088-3492
or use Comment Sheet in the back of this manual

60485200 E

LIST OF EFFECTIVE PAGES

New features, as well as changes, deletions, and additions to information in this manual are indicated by bars
in the margins or by a dot near the page number if the entire page is affected. A bar by the page number
indicates pagination rather than content has changed.

Page

J^N

Front Cover
Title Page
i i
iii/iv
v
vi
vii
viii thru xii
xiii
1-1 thru 1-3
1-4
1-5 thru 1-12
2-1 thru 2-21
2-22
2-23
2-24 thru 2-30
2-31
2-32
2-33
2-34
2-35
2-36
2-37
3-1 thru 3-8
3-9 thru 3-11
3-12 thru 3-33
3-34
3-35 thru 3-37
3-38
3-39
4-1 thru 4-20
5-1
5-2 thru 5-4
6-1
6-2
6-3
6-4
6-4.1/6-4.2
6-5 thru 6-18
7-1 thru 7-9
8-1
8-2
8-3
8-4
8-4.1/8-4.2
8-5
8-6
8-7 thru 8-21
9-1 thru 9-3
9-4
9-4.1/9-4.2
9-6
9-7
9-8
9-8.1/9-8.2
9-9
9-10
9-11

60485200 E

Revision

E
E
D
A
B
E
A
A
E
A
A
B
D
A
B
B
A
A
B
B
A
A
B
A
E
A
B
A
E
A
E
A
A
D
D
D
A
A
A
D
E
E
E
E
D
A
A
E
E
A
A
E
E
A
A
E

Revision
9-12
9-13
9-14
9-15
9-16
9-17
9-18
9-19 thru 9-27
10-1 thru 10-3
10-4 thru 10-8
10-8.1
10-8.2
10-9
10-10 thru 10-17
11-1
11-2 thru 11-5
11-6 thru 11-11
A-l thru A-4
B-l
B-2
B-3
B-4
B-4.1/B-4.2
B-5
B-6
B-7
B-8
B-9
B-10 thru B-16
B-16.1
B-16.2
B-17 thru B-22
B-23
B-24
B-24.1/B-24.2
B-25 thru B-54
B-55
B-56 thru B-60
B-61
B-62 thru B-97
B-98
B-99
B-l 00
C-l
C-2
C-3 thru C-5
C-6 thru C-9
D-l thru D-3
E-l
E-2
E-3
E-4
E-5
E-6
E-7 thru E-9
E-10 thru E-13
F-l
F-2

A
A
E
A
A
E
B
A
A
E
E
E
C
A
E
A
E
A
A
A
E
E
E
A
B
A
E
B
E
E
E
A
B
C
C
A
C
A
C
A
D
A
A
A
A
B
A
A
A
A
B
B
A
A
E
A
A
A

Page

Revision

G-l
G-2
G-3
H-l thru H-4

H-5
H-6
1-1
1-2
J-l
J-2
J-3

Index-1 thru Index-■10
Comment Sheet/Mailer
Back Cover

iii/iv

(^%

PREFACE

This manual describes both the definition phase of
a DMS-170 data base and the execution phase of
CONTROL DATA® CYBER Database Control System (CDCS)
Ve r s i o n 2 . A d a t a b a s e i s d e fi n e d b y t h e u s e o f
the Data Description Language (DDL) and is control
led by CDCS, which monitors all access by applica
tion programs. Several products are involved in
the definition and execution phases; these products
are CDCS Version 2.3, DDL Version 3.2, and the DDL
portion of the FORTRAN Data Base Facility (FDBF)
Ve r s i o n 1 . 3 . A s d e s c r i b e d i n t h i s p u b l i c a t i o n ,
these products operate under control of the follow
ing operating systems:
NOS/2 for the CONTROL DATA CYBER 180 Computer
Systems; CYBER 170 Computer Systems; CYBER 70
Computer System Models 71, 72, 73, and 74; and
6000 Computer Systems
NOS/BE 1 for the CDC® CYBER 180 Computer Sys
tems; CYBER 170 Computer Systems; CYBER 70
Computer System Models 71, 72, 73, and 74; and
6000 Computer Systems
This manual is designed for the data administrator.
The data administrator is the programming or man
a g e r i a l p e r s o n o r g r o u p r e s p o n s i b l e f o r d e fi n i n g ,
creating, controlling, and monitoring data bases.
It is assumed that the data administrator is knowl

edgeable in both systems and application program
ming, has some familiarity with data management
concepts and terminology, and has used previously
Control Data computers and software.
Detailed information for application programmers
using CDCS is contained in the CDCS 2 Application
Programming reference manual. Related material is
contained in the publications listed below.
The NOS Manual Abstracts and the NOS/BE Manual
Abstracts are instant-sized manuals containing
brief descriptions of the contents and intended
audience of all NOS and NOS product set manuals,
and NOS/BE and NOS/BE product set manuals, respec
t i v e l y. T h e a b s t r a c t s m a n u a l s c a n b e u s e f u l i n
determining which manuals are of greatest interest
t o a p a r t i c u l a r u s e r. T h e S o f t w a r e P u b l i c a t i o n s
Release History serves as a guide in determining
which revision level of software documentation
corresponds to the Programming System Report (PSR)
level of installed site software. The abstracts
manuals are included in the list of publications of
secondary interest.
Manuals are listed alphabetically within groupings
that indicate relative importance to readers of
this manual.

The following manuals are of primary interest:
Publication

Publication
Number

CYBER Record Manager
Advanced Access Methods Version 2
Reference Manual

60499300

DMS-170
CYBER Database Control System Version 2
Application Programming Reference Manual

60485300

The following manuals are of secondary interest:

60485200 D

Publication

Publication
Number

CYBER Loader Version 1
Reference Manual

60429800

CYBER Record Manager
Basic Access Methods Version 1.5
Reference Manual

60495700

FORM Version 1 Reference Manual

60496200

Networks Products
Transaction Facility Version 1
Reference Manual

60459500

NOS Version 2 Manual Abstracts

60485500

NOS Version 2 Reference Set, Volume 3
System
Commands

60459680

NOS/BE Version 1 Manual Abstracts 84000470
NOS/BE Version 1 Reference Manual 60493800
Software Publications Release History 60481000

CDC manuals can be ordered from Control Data Corporation, Litera
ture and Distribution Servicesj 308 North Dale Street, St. Paul,
Minnesota 55103.
This product is intended for use only as
described in this document. Control Data canriot be responsible for the proper functioning
of undescribed features or parameters.

vi

60485200

A

)

CONTENTS

NOTATIONS

1.

0^\

INTRODUCTION TO DATA BASE PROCESSING WITH
DMS-170

xiii

1-1

Data Base Definition
Schema Definition
Subschema Definitions
COBOL Subschemas
FORTRAN Subschemas
Query Update Subschemas
M a s t e r D i r e c t o r y D e fi n i t i o n
Data Base Processing
Application Languages
COBOL Processing
FORTRAN Processing
Query Update Processing
Concurrency
Data Validation
Record Mapping
File Privacy
Relations
Constraints
Data Base Versions
Data Base Procedures
Input/Output Processing
File Org a n i za ti o n
Multiple-Index Processing
Data Base Recovery
Automatic Recovery
Data Base Transaction
Manual Recovery Utilities
Logging
Other Data Base Utilities
Processing Through TAF
CDCS Processing Flow
CDCS Loading and Execution
CDCS Batch Testing

1-1
1-1
1-2
1-3
1-3
1-3
1-4
1-4
1-4
1-4
1-4
1-6
1-6
1-6
1-6
1-6
1-6
1-7
1-7
1-7
1-7
1-7
1-9
1-9
1-9
1-9
1-9
1-9
1-10
1-10
1-11
1-11
1-11

2. SCHEMA DEFINITION

2-1

Schema Structuring Conventions
Data Description
Data Organization
Areas
Records
Repeating Data Items
Data Size and Class
Schema/Subschema Compatibility
Data Conversion
Coded Arithmetic to Numeric Picture
Numeric Picture to Coded Arithmetic
Coded Arithmetic to Coded Arithmetic
Numeric Picture to Numeric Picture
Record Mapping
Schema Programming Conventions
Language Elements
Reserved Words
User-Defined Names
Literals
Data Reference
I d e n t i fi e r
DDL Character Set
Punctuation

2-1
2-1
2-1
2-1
2-2
2-3
2-3
2-4
2-4
2-5
2-5
2-5
2-5
2-5
2-5
2-5
2-5
2-6
2-6
2-6
2-7
2-7
2-7

60485200 B

DDL Coding
DDL Statements
Sequence Numbers
Comment Lines
Schema Syntax
Schema Identification Entry
SCHEMA NAME Clause
Other Clauses
Area Description Entry
AREA NAME Clause
CALL Clause (Area Description Entry)
ACCESS-CONTROL Clause
Record Description Entry
RECORD NAME Clause
WITHIN Clause
CALL Clause (Record Description Entry)
Data Description Entry (Record Description
Entry)
PICTURE Clause
TYPE Clause
OCCURS Clause
RESULT Clause
CHECK Clause
ENCODING/DECODING Clause
CALL Clause (Data Description Entry)
Data Control Entry
Area Control Entry (Data Control Entry)
AREA NAME Clause
COMPRESSION/DECOMPRESSION Clause
KEY Clause
SEQUENCE Clause
RECORD CODE Clause
Constraint Entry
CONSTRAINT NAME Clause
DEPENDS ON Clause
Relation Entry
RELATION NAME Clause
JOIN Clause
Schema Compilation and Maintenance Facilities
DDL3 Control Statement
Schema Compilation
DDL3 Control Statement for Compilation
FILE Control Statement
Schema Compilation Example
Schema Compilation Output
Recompilation Guidelines
Exhibit Facility
Control Statement Format
EXHIBIT Directive Format
3.

COBOL AND QUERY UPDATE SUBSCHEMA
DEFINITION

Subschema Structuring Conventions
Data Description
Data Organization
Group Items
Elementary Items
Schema/Subschema Compatibility
Omission of Data Items
Ordering of Data Items
Definition of Data Items
Data Size and Class
Repeating Data Items
Subschema Programming Conventions

2-8
2-8
2-8
2-8
2-8
2-9
2-9
2-9
2-9
2-9
2-9
2-10
2-10
2-11
2-U
2-11
2-12
2-12
2-14
2-16
2-16
2-18
2-19
2-19
2-21
2-21
2-21
2-22
2-22
2-23
2-24
2-24
2-26
2-27
2-27
2-28
2-28
2-29
2-29
2-30
2-31
2-31
2-32
2-32
2-35
2-36
2-36
2-36

3-1
3-1
3-1
3-2
J-2
J-2
3-2
3-2
3-2
J-2
J-3
J-4
J-8

Language Elements
Reserved Words
User-Defined Names
Literals
Data Reference
DDL Character Set
Punctuation
DDL Coding
Coding DDL Statements
Sequence Numbers
Continuation Lines
Comment Lines
COBOL and Query Update Subschema Syntax
Ti t l e D i v i s i o n
SS Clause
Other Clauses
Alias Division
AD Clause
Other Clauses
Realm Division
RD Clause
Other Clauses
Record Division, COBOL Subschema
JUSTIFIED Clause
OCCURS Clause
PICTURE Clause
REDEFINES Clause
SYNCHRONIZED Clause
USAGE Clause
RENAMES Clause
VALUE Clause
Record Division, Query Update Subschema
JUSTIFIED Clause
OCCURS Clause
PICTURE Clause
REDEFINES Clause
SYNCHRONIZED Clause
USAGE Clause
RENAMES Clause
Relation Division
RN Clause
RESTRICT Clause
Subschema Compilation and Subschema Library
Maintenance
Subschema Library
DDL3 Control Statement
Subschema Compilation and Library
Maintenance Operations
Compiling a Subschema
Creating a Subschema Library
Compiling Multiple Subschemas
Compiling a Subschema and Adding to
a Subschema Library
Replacing a Subschema
Deleting a Subschema
Auditing a Subschema Library
Compacting a Subschema Library
Compilation Output
Recompilation Guidelines

3-9
3-9
3-9
3-9
3-9
3-10
3-10
3-10
3-10
3-11
3-11
3-11
3-11
3-11
3-11
3-11
3-11
3-12
3-12
3-12
3-12
3-13
3-13
3-13
3-14
3-15
3-17
3-18
3-18
3-19
3-20
3-22
3-23
3-23
3-24
3-28
3-28
3-28
3-30
3-30
3-30
3-30

Concatenated Key
Subschema Programming Conventions
Language Elements
Keywords
User-Defined Names
Constants
FORTRAN DDL Statement Format
Character Set
Blanks
Continuation
Statement Labels
Comment Lines
Blank Lines
FORTRAN Subschema Syntax
SUBSCHEMA Statement
ALIAS Statement
REALM Statement
Record Definition
RECORD Statement
Type Statements
R e l a t i o n D e fi n i t i o n
RELATION Statement
RESTRICT Statement
END Statement
Subschema Compilation and Subschema Library
Maintenance
Subschema Library
DDLF Control Statement
Subschema Compilation and Library
Maintenance Operations
Compiling a Subschema
Creating a Subschema Library
Compiling Multiple Subschemas
Compiling a Subschema and Adding to
a Subschema Library
Replacing a Subschema
Deleting a Subschema
Auditing a Subschema Library
Compacting a Subschema Library
Compilation Output
Recompilation Guidelines

4-o
4-6
4-6
4-6
4-7
4-7
4-7
4-8
4-8
4-8
4-8
4-8
4-8
4-8
4-9
4-9
4-10
4-1U
4-10
4-11
4-12
4-12
4-12
4-1J

3-32
3-32
3-32

5. SCHEMA AND SUBSCHEMA MAPPING

D-l

Structuring Restrictions
Data Conversion
Data Class
Omission of Data Items

3-1
5-1
5-1
5-2

6. DATA STRUCTURES

b-1

4. FORTRAN SUBSCHEMA DEFINITION

4-1

6-1
6-1
b-1
6-1
b-2
6-2
6-2
6-2
6-4
b-4.1
6-4.1

Subschema Structuring Requirements
Data Description
Variables
Arrays
Schema/Subschema Correspondence
Omission of Data Items
Ordering of Data Items
Definition of Data Items
Data Size and Type
Array Declaration

4-1
4-1
4-2
4-2
4-2
4-2
4-2
4-2
4-3
4-5

Data Base Files
CDCS and CRM Communication
Data Base File Definition
CRM Record Types
File Control
Multiple-Index Files
Multiple Record Descriptions
Key Definitions
Data Base Versions
Defining Data Base Versions
Access Control Locks
Examples of Environments for Data Base
Versions
Te s t i n g S i t u a t i o n
Branch Situation
Relations
Joining Files
Hierarchical Tree Structure
Ranks of a Relation
Parent/Child Relationship
Record Qualification

viii

3-34
3-34
3-34
3-35
3-35
3-35
3-36
3-36
3-37
3-38
3-38

4-13
4-14
4-14
4-15
4-16
4-16
4-lb
4-17
4-17
4-17
4-18
4-18
4-iy
4-19

6-4.1
6-4.1
b-5
6-5
6-6
b-6
b-7
6-8
b-8

60485200 E

/p^sy

CDCS
Relation
Processing
S o u r c e a n d T a r g e t I d e n t i fi e r s
Relation
Positioning
Relation
Read
Order of Record Retrieval
Informative
Conditions
Effect of Versions on Relation
Retrieval
Collating
Sequences
Constraints
D e fi n i n g
Constraints
Two-File
Constraints
Single-File
Constraints
C D C S Tw o - F i l e C o n s t r a i n t P r o c e s s i n g
Guidelines for File Creation
Controlling Insertion Operations
Controlling Deletion Operations
C o n t r o l l i n g M o d i fi c a t i o n O p e r a t i o n s
CDCS Single-File Constraint Processing
Guidelines for File Creation
Controlling Insertion Operations
Controlling Deletion Operations
C o n t r o l l i n g M o d i fi c a t i o n O p e r a t i o n s
R e s t r i c t i o n s f o r D a t a B a s e Ve r s i o n s

6-12
6-13
6-13
6-13
6-13
6-15
6-15
6-16
6-16
6-16
6-16
6-17
6-17
6-17
6-17
6-17
6-18

7.

7-1

D ATA

BASE

PROCEDURES

6-9
6-9
6-9
6-9
6-10
6-10

Describing Data Base Procedure Use
Loading of Data Base Procedures
Writing
Data
Base
Procedures
Linkage
and
Communication
Parameter
List
Entry Codes and Return Codes
Interpretation of Parameters
Data Base Procedures for Input/Output
Functions
READ
Statement
WRITE and REWRITE Statements
D E L E T E a n d S TA RT S t a t e m e n t s
Relation
READ
Statement
Error
Processing
Nonfatal
Errors
Fatal
Errors
Return
Codes
Procedure
Library
Preparation
Sample
Data
Base
Procedures
COBOL Data Base Procedures
FORTRAN Data Base Procedures
C O M PA S S D a t a B a s e P r o c e d u r e s

7-5
7-5
7-5
7-6
7-6
7-6
7-6
7-6
7-7
7-7
7-8
7-8
7-8
7-8

8.

8-1

MASTER

DIRECTORY

7-1
7-2
7-2
7-2
7-2
7-3
7-5

Master
Directory
Syntax
8-1
Permanent File Information Subentry 8-1
PFN
Clause
8-2
UN/ID
Clause
8-2
PW
Clause
8-2
FA M I LY
NAME
Clause
8-2
PA C K
NAME
Clause
8-2
SET
NAME
Clause
8-2
VSN
Clause
8-2
DEVICE
TYPE
Clause
8-2
Syntax
for
the
Creation
Run
8-3
Schema
Subentry
8-3
SCHEMA
NAME
Clause
8-3
FILE NAME Clause (Schema Subentry) 8-4
PROCEDURE LIBRARY Clause 8-4
TRANSACTION RECOVERY FILE Clause 8-4
R E S TA R T I D E N T I F I E R F I L E C l a u s e 8 - 4
JOURNAL LOG FILE Clause 8-4
QUICK RECOVERY FILE Clause 8-4.1
JOB C O N T R O L I N F O R M AT I O N C l a u s e 8 - 4 . 1

60485200 E

Master
Version
Subentry
8-5
A r e a S u b e n t r y ( M a s t e r Ve r s i o n S u b e n t r y ) 8 - 6
AREA NAME Clause (Area Subentry) 8-6
Permanent File Information Subentry
(Area
Subentry)
8-6
LOG Clause (Area Subentry) 8-7
INDEX FILE Clause (Area Subentry) 8-7
Alternate
Version
Subentry
8-7
VERSION NAME Clause (Alternate
Version
Subentry)
8-7
AREA NAME SAME AS MASTER Clause
(Alternate Version Subentry) 8-7
Area Subentry (Alternate Version
Subentry)
8-8
Subschema
Subentry
8-8
SUBSCHEMA NAME Clause (Subschema
Subentry)
8-8
FILE NAME Clause (Subschema Subentry) 8-8
Syntax
For
M o d i fi c a t i o n
Run
8-8
Add
Schema
Entry
8-9
Delete
Schema
Entry
8-9
Modify
Schema
Entry
8-9
MODIFY SCHEMA NAME Clause 8-9
FILE NAME Clause (Modify Schema
Subentry)
8-9
END
Clause
8-10
Change Procedure Library Subentry 8-10
Change Transaction Recovery File
Subentry
8-10
C h a n g e R e s t a r t I d e n t i fi e r F i l e
Subentry
8 - 11
Change Journal Log File Subentry 8-12
Change Quick Recovery File Subentry 8-12
Change Job Control Information
Subentry
8-12
Change
Area
Subentry
8-13
Delete
Version
Subentry
8-15
Add
Version
Subentry
8-15
Delete Subschema Subentry 8-15
Add
Subschema
Subentry
8-15
Master
Directory
Generation
8-16
DBMSTRD
Control
Statement
8-16
Creation
Run
8-17
M o d i fi c a t i o n
Run
8-17
DBMSTRD
Output
8-17
9.

D ATA

BASE

RECOVERY

9-1

Automatic
Recovery
9-2
Data
Base
Transaction
9-3
Data Base Recovery From Application
Program
Failure
9-3
Recovery From System Failure 9-4
Recovery of a Single Data Base File 9-4 |
Automatic Journal Log Maintenance 9-4
Data Administrator's Role in Automatic
Recovery
9-4
Data
Base
Utilities
9-4.1
|
DBREC
Utility
9-6
Schema
Entry
9-6
SCHEMA
NAME
Clause
9-6
DUMP
Clause
9-b
A L L O C AT E
Clause
9-6
DBREC
Control
Statement
9-7
Execution of DBREC for Allocation 9-8
DBREC Execution to Dump the Journal
Log
File
9-8
DBQRFA
Utility
9-9
DBQRFI
Utility
9-10
DBRCN
Utility
9 - 11
F o r m a t o f I n p u t f o r D B R C N U t i l i t y 9 - 11
DBRCN
Control
Statement
9-12
Execution of the DBRCN Utility 9-13

ix

DBRST
Utility
9-14
Format of Input for DBRST Utility 9-14
DBRST
Control
Statement
9-14
Execution of the DBRST Utility 9-14
Recovery Example Using DBRST Utility 9-15
Logging
9-15
Journal
Log
File
9-15
Journal Log File Logging Options 9-15
Maintenance of the Journal Log File 9-17
Journal Log File Structure 9-17
Journal Log Record Structure 9-17
Quick
Recovery
File
9-22
Restart
I d e n t i fi e r
File
9-23
Transaction
Recovery
File
9-24
Journal Log File Report Generation 9-24
Recovery
Considerations
9-24
Recovery
Points
9-25
Quick Recovery File Recovery Points 9-25
Journal Log File Recovery Point 9-25
Recovery Point Processing With No Log
Files
9-25
Logging
Options
9-25
Logging to the Transaction Recovery
File
9-25
L o g g i n g t o t h e R e s t a r t I d e n t i fi e r F i l e 9 - 2 5
Logging to the Quick Recovery File 9-25
Logging After-image Records to a
Journal
Log
File
9-26
Logging Before-Image Records to a
Journal
Log
File
9-26
Manual
Data
Base
Recovery
9-26
Recovery
Conditions
9-27
Physical Storage or Software Failure 9-27
Cascade
Effect
9-27
Program
Logic
Error
9-27
System
Failure
9-27
Recovery From Recovery Failures 9-27
10. DATA ADMINISTRATOR AND OPERATING SYSTEM
PROCEDURES

10-1

Data Administrator's Responsibilities 10-1
System
Limitations
10-1
Data
Privacy
10-1
Privacy (Access Control) Checking 10-1
Operating System File Security 10-3
Application Programming Interface 10-3
CDCS
Control
Statement
10-4
Directive
File
10-4
Parameters
10-4
Accounting
Statistics
10-8
|
Duration
Loading
10-8.1
CDCS Loading of Overlay Capsules 10-8.1
CDCS Loading of CRM Capsules 10-8.1
C l a s s i fi c a t i o n a n d E f f e c t o f C R M E r r o r s 1 0 - 8 . 1
I C D CC SR M
E r r o r L i s tFi inl ge
Use
System
Operator
Guidelines
CDCS
Initialization
NOS System Procedure File
NOS/BE System Procedure File
Operator
Interface
Programmable Display Usage
Operator
Commands
Sample Operator Interface
CDCS
Te r m i n a t i o n
11 .
Sample
Sample
COBOL

EXAMPLES
Schema
Subschemas
Subschema

1
10
0 -- 8
8 .. 2
2
10-8.2
10-8.2
10-9
10-9
10-10
10-10
1 0 - 11
10-16
10-16
11 - 1
11 - 1
11 - 1
11 - 1

11-b
11-8
11-9
11-10
11-10

FORTRAN 5 Subschema
Query Update Subschema
Sample Master Directory Creation Run
Sample Master Directory Modification Run
Sample DBREC Utility Run

APPENDIXES
Standard Character Sets
Diagnostics
Glossary

Reserved Words and FORTRAN DDL Keywords
Summary Syntax for the Schema, Subschemas,
Master Directory, and Data Base
Utilities
Future System Migration Guidelines
Field Length Requirements
Data Conversion Rules
Collating Sequences for Data Base Files
Summary of Data Definition in DMS-170

A-l
B-l
C-l
D-l
E-l
F-l
G-l
H-l
1-1
J-l

INDEX
FIGURES
1 - 1 D a t a B a s e D e fi n i t i o n
1-2 Subschema Describing a Portion of the
Data Base
1-3 Data Base Processing With CDCS
1-4 Processing Using Data Base Versions
1-5 CDCS/TAF interface
1-6 Data Base Environment Under Operating
System
2 - 1 I d e n t i fi e r F o r m a t
2-2 General Format, Schema
2-3 SCHEMA NAME Clause Format
2-4 Area Description Entry Format
2-5 AREA NAME Clause Format
2-6 CALL Clause Format (Area Description
Entry)
2-7 ACCESS-CONTROL Clause Format
2-8 Record Description Entry Format
2-9 RECORD NAME Clause Format
2-10 WITHIN Clause Format
2-11 CALL Clause Format (Record Description
Entry)
2-12 Data Description Entry Format
2-13 PICTURE Clause Format
2-14 PICTURE Clause Character Data Items
2-15 Sign Representation in Rightmost Digit
2-16 PICTURE Clause Numeric Data Items
2-17 TYPE Clause Format
2-18 TYPE Clause Numeric Data Items
2-19 TYPE Clause Character Data Items
2-20 OCCURS Clause Format
2-21 OCCURS Clause Examples
2-22 RESULT Clause Format
2-23 Virtual Data Item Processing
2-24 CHECK Clause Format
2-25 Examples of Valid Literals in the CHECK
VALUE Clause
2-26 ENCODING/DECODING Clause Format
2-27 CALL Clause Format (Data Description
Entry)
2-28 Data Control Entry Format
2-29 Area Control Entry Format
2-30 AREA NAME Clause Format
2-31 COMPRESSION/DECOMPRESSION Clause Format
2-32 Examples of the COMPRESSION/
DECOMPRESSION Clause
2-33 KEY Clause Format

1-2
1-3
1-5
1-8
1-10
1-12
2-7
2-8
2-9
2-9
2-9
2-10
2-10
2-11
2-11
2-11
2-11
2-12
2-12
2-13
2-14
2-14
2-14
2-15
2-15
2-16
2-17
2-17
2-18
2-18
2-20
2-20
2-20
2-21
2-21
2-21
2-22
2-22
2-23

60485200 E

2-34 SEQUENCE Clause Format
2-35 RECORD CODE Clause Format
2-36 Examples of the RECORD CODE Clause
2-37 Dependency Conditions Established by
Constraints
2-38 Constraint Entry Format
2-39 Constraint Entry Within a Schema
2-40 Relation Direction Example
2-41 Relation Entry Format
2-42 Alignment Example
2-43 Data Name Example
2-44 DDL Control Statement Format for Schema
Compilation and Maintenance
2-45 FILE Control Statement Format
2-46 Schema Compilation Example
2-47 Sample Schema Compilation Output Listing
2-48 Recompilation List Example
2-49 EXHIBIT Directive Format
2-50 EXHIBIT Examples
2-51 Executing the EXHIBIT Utility, Example 1
2-52 Sample EXHIBIT Utility Output, Example 1
2-53 Executing the EXHIBIT Utility, Example 2
2-54 Sample EXHIBIT Utility Output, Example 2
3-1 Omitting Schema Items From the Subschema
3-2 Reordering Data Items
3-3 Size Discrepancies of Data Items
3-4 Examples of Repeating Data Items
3-5 Insertion of Nonrepeating Group Items
3-6 Concatenated Key Declaration
3 - 7 I d e n t i fi e r F o r m a t
3-8 COBOL Subschema Qualification and
Subscripting Example
3-9 General Format, COBOL and Query Update
Subs chema
3-10 SS Clause Format
3-11 AD Clause Format
3-12 Assigning Aliases
3-13 RD Clause Format
3-14 Formats of Data Description Entries,
COBOL Subschema
3-15 JUSTIFIED Clause Format, COBOL Subschema
3-16 Character Positioning
3-17 OCCURS Clause Format, COBOL Subschema
3-18 PICTURE Clause Format, COBOL Subschema
3-19 Alphabetic Data Items
3-20 Minus Sign Representation
3-21 Numeric Data Items
3-22 Alphanumeric Data Items
3-23 REDEFINES Clause Format, COBOL Subschema
3-24 Redefining Data Items
3-25 SYNCHRONIZED Clause Format, COBOL
Subschema
3-26 USAGE Clause Format, COBOL Subschema
3-27 RENAMES Clause Format, COBOL Subschema
3-28 Renaming Data Items
3-29 VALUE Clause Format, COBOL Subschema
3-30 Examples of Valid Level 88 Literals
3-31 Examples of Valid Level 88 Figurative
Constants
3-32 Formats of Data Description Entries,
Query Update Subschema
3-33 JUSTIFIED Clause Format, Query Update
Subschema
3-34 OCCURS Clause Format, Query Update
Subs chema
3-35 PICTURE Clause Format, Query Update
Subschema
3-36 Examples of Insertion Characters
3-37 Examples of Replacement Characters
3-38 Examples of Picture Editing
3-39 REDEFINES Clause Format, Query Update
Subschema
3-40 SYNCHRONIZED Clause Format, Query
Update Subschema

60485200 E

2-23
2-24
2-25

3-41

2-26
2-26
2-27
2-28
2-28
2-29
2-29

3-43
3-44
3-45

2-29
2-31
2-33
2-33
2-35
2-36
2-36
2-37
2-37
2-37
2-37
3-3
3-3
3-4
3-7
3-8
3-8
3-10
3-10
3-11
3-11
3-12
3-12
3-13
3-13
3-13
3-14
3-14
3-15
3-16
3-16
3-17
3-17
3-17
3-18
3-18
3-19
3-19
3-20
3-20
3-21

3-42

3-46
3-47
3-48
3-49
3-50
3-51
3-52
3-53
3-54
4-1
4-2
4-3
4-4
4-5
4-6
4-7
4-8
4-9
4-10
4-11
4-12
4-13
4-14
4-15
4-16
4-17
4-18
4-19
4-20
4-21
4-22
4-23
4-24
4-25
4-26
6-1
6-2
6-3
6-4
6-5
6-6

3-22

6-7

3-23

6-8

3-23

6-9

3-23

6-10
6-11

3-24
3-26
3-27
3-27
3-28
3-28

6-12
6-13
6-14
6-15
6-16

USAGE Clause Format, Query Update
Subschema
3-29
RENAMES Clause Format, Query Update
Subschema
3-30
RN
Clause
Format
3-30
RESTRICT
Clause
Format
3-31
DDL3 Control Statement Format for
COBOL and Query Update Subschemas 3-32
Compiling
a
Subschema
3-34
Creating a Subschema Library 3-35
Compiling a Subschema and Adding to a
Subschema
Library
J-35
Replacing a Subschema Library 3-36
Deleting Subschemas From the Library 3-36
Auditing a Subschema Library 3-37
Audit Listing of the Subschema Library 3-37
Compacting a Subschema Library 3-37
Sample COBOL Subschema Compilation
Output
Listing
3-38
Fixed Occurrence Elementary Items 4-5
Schema/Subschema Differences in Array
Size
and
Dimension
4-5
Variable Arrays in Schema and Subschema 4-5
Declaring a Concatenated Key 4-6
General Format, FORTRAN Subschema 4-9
SUBSCHEMA Statement Format 4-9
ALIAS
Statement
Format
4-9
Assigning
Aliases
4-10
REALM
Statement
Format
4-10
RECORD
Statement
Format
4-10
Type
Statement
Formats
4 - 11
D e fi n i n g
Records
4-12
R E L AT I O N
Statement
Format
4-12
RESTRICT Statement Format 4-13
Examples of Logical Expressions 4-13
END
Statement
Format
4-13
DDLF Control Statement Format for
FORTRAN
Subschemas
4-14
Compiling
a
Subschema
4-16
Creating a Subschema Library 4-16
Compiling a Subschema and Adding to a
Subschema
Library
4-17
Replacing a Subschema Library 4-17
Deleting Subschemas From the Library 4-18
Auditing a Subschema Library 4-18
Audit Listing of the Subschema Library 4-19
Compacting a Subschema Library 4-19
Sample FORTRAN Subschema Compilation
Output
Listing
4-20
Concatenated
Key
D e fi n i t i o n
6-4
Key Definitions for Areas With Multiple
Record
Types
6-4
Example of Version Definitions in
Master
Directory
Input
b-5
Two-File Relationship Example 6-6
Three-File Relationship Example 6-7
Tree Structure of CONTRACTS-PRODUCTSEMPLOYEES
Relationship
6-7
Complex Tree Structure for CONTRACTSPRODUCTS-EMPLOYEES Relationship b-8
Record Occurrences for Three Related
Files
6-10
Record Occurrences in User's Work Areas
After
Reading
6-10
N u l l R e c o r d O c c u r r e n c e E x a m p l e s b - 11
Example of Null Occurrence and Control
Break
Conditions
b-12
Example of Files Joined by a Relation
and
Grouped
by
Version
b-12
Two-File
Constraint
Example
6-13
Three-File Constraint Example 6-14
Single-File Constraint Example 6-15
Example of Constraint Restrictions on
Data
Base
Versions
6-18

xi

7-1 Procedure Library Generation
7-2 ENCODING/DECODING Description for COBOL
Data Base Procedure
7-3 Sample COBOL Data Base Procedure
8-1 Permanent File Information Subentry
Format
8-2 General Format, Creation Run
8-3 General Format, Creation Entry
8-4 Schema Subentry Format
8-5 Master Version Subentry Format
8-6 Area Subentry Format
8-7 Alternate Version Subentry Format
8-8 Subschema Subentry Format
8-9 General Format, Modification Run
8-10 Add Schema Entry Format
8-11 Delete Schema Entry Format
8-12 Modify Schema Entry Format
8-13 Change Procedure Library Subentry Format
8-14 Change Transaction Recovery File
Subentry Format
8-15 Change Restart Identifier File Subentry
Format
8-16 Change Journal Log File Subentry Format
8-17 Change Quick Recovery File Subentry
Format
8-18 Change Job Control Information Subentry
Format
8-19 Change Area Subentry Format
8-20 Delete Version Subentry Format
8-21 Add Version Subentry Format
8-22 Delete Subschema Subentry Format
8-23 Add Subschema Subentry Format
8-24 DBMSTRD Utility Control Statement
8-25 Sample First Section of DBMSTRD Output
8-26 Sample Second Section of DBMSTRD Output
(Master Directory Contents)
9-1 Automatic Recovery Environment
9-2 Manual Recovery Environment
9-3 Schema Entry Format (DBREC Utility)
9-4 DBREC Control Statement
9-5 Sample Off-line Execution of DBREC
Utility to Dump the Journal Log File
9-6 DBQRFA Utility Control Statement
9-7 DBQRFI Utility Control Statement
9-8 Format of Input for DBRCN and DBRST
Utilities
9-9 DBRCN Utility Control Statement
9-10 DBRST Utility Control Statement
9-11 DBRST Example
9-12 Log Record Header
9-13 Transaction Log Record
9-14 Invoke and Version Change Log Record
9-15 Open Log Record
9-16 Privacy Breach Log Record
9-17 Before Image and After Image Log Records
9-18 Close Log Record
9-19 Terminate Log Record
9-20 Recovery Point Log Record
9-21 Restart Identifier File Record Format
10-1 Sequence of Operations to Establish
an Active Data Base Environment
10-2 CDCS Control Statement
10-3 Sample NOS System Procedure File
10-4 Sample NOS/BE System Procedure File
10-5 DOWN Command

xii

7-7
7-8
7-9
8-1
8-3
8-3
8-3
8-6
8-6
8-7
8-8
8-8
8-9
8-9
8-9
8-10

10-6
10-7
10-8
10-9
10-10
10-11
11-1
11-2
11-3
11-4
11-5
11-6

8-10

11-7

8-11
8-12

TAB

8-12
8-13
8-13
8-15
8-15
8-15
8-15
8-16
8-18
8-21
9-1
9-2
9-6
9-7
9-10
9-10
9-10
9-11
9-12
9-14
9-16
9-17
9-19
9-19
9-20
9-20
9-21
9-21
9-22
9-22
9-23

2-1
2-2
2-3
3-1
3-2
3-3
3-4
3-5
4-1
4-2
4-3
4-4
4-5
5-1
5-2
5-3
5-4
5-5
7-1
7-2
7-3
7-4
9-1
9-2
10-1

10-2
10-4
10-9
10-9
10-11

10-2
10-3

IDLE
Command
10-12
R E TA I N
Command
10-13
RETURN
Command
10-13
S TAT U S
Command
10-14
UP
Command
10-15
Sample Series of Operator Commands 10-16
Sample Schema Named MANUFACTURING-DB 11-2
Sample COBOL Subschema Named C5SSPR0DUCT-PERS0NNEL and Subschema
Library
Creation
11 - 5
Sample FORTRAN 5 Subschema Named
F5SS-PR0DUCT-EVALUATI0N and
S u b s c h e m a L i b r a r y C r e a t i o n 11 - 7
Adding Sample Query Update Subschema
Named QUPRODMGT to the Subschema
Library
I1-8
Sample Master Directory Creation Run 11-9
Sample Master Directory Modification
Run
11 - 1 0
S a m p l e D B R E C U t i l i t y R u n 11 - 11

Va l i d
Clause
Combinations
2-2
Valid Schema/Subschema Class
Conversions
2-4
File Control Statement Parameters 2-J2
Valid Schema to Subschema Class
Conversions
3-4
Data Class Representation in the Schema J-5
Data Class Representation in the COBOL
Subschema
3-5
Data Class Representation in the Query
Update
Subschema
J-b
Va l i d I d e n t i fi e r a n d L i t e r a l
Combinations
J-31
Ordering of Subschema Statements 4-1
Schema/Subschema
Mapping
4-4
D a t a Ty p e s f o r C o n c a t e n a t e d K e y s 4 - 5
Names of Variables and Common Blocks
Generated by the DML Preprocessor 4-7
Column Usage in FORTRAN DDL Statements 4-8
Data
Classes
5-2
Va l i d
Data
Conversions
5-2
Data Class Representation in the Schema 5-3
Data Class Representation in the
Subs
chema
5-3
N u l l Va l u e s f o r D a t a C l a s s e s 5 - 4
Parameter
List
Formats
7-3
Applicable Parameters for Type of Call 7-3
E n t r y C o d e s a n d Va l i d R e t u r n C o d e s 7 - 4
Data Base Procedure Time of Execution 7-6
Summary of Requirements of Data Base
Definition for Features of Automatic
Recovery
9-5
Summary of Permanent File Name
S p e c i fi c a t i o n s f o r A l l o c a t i o n o f
Files
by
DBREC
Utility
9-9
Options Used With Parameters of the
Operator
Commands
10-12
Information Returned by the STATUS
Command
10-15
Paging and Recycling Commands 10-16

60485200 E

NOTATIONS

Reference formats are presented throughout the
manual to illustrate essential elements of syntax.
The notations used in the reference formats follow
two conventions: the COBOL convention and the
FORTRAN convention. The COBOL convention is used
in formats that describe syntax for the schema,
COBOL and Query Update subschemas, master directory,
and data base recovery utilities. The FORTRAN
convention is used in formats that describe syntax
for the FORTRAN subschema and for all control
statements. The differences in the conventions are
in the interpretation of uppercase words, the
omission of underlined uppercase words from the
FORTRAN convention, and the use of punctuation.

NOTATION USED IN
REFERENCE FORMATS
UPPERCASE COBOL convention. Uppercase words
are reserved words and must appear
exactly as shown. Reserved words
c a n b e u s e d o n l y a s s p e c i fi e d i n
the reference formats. If not
underlined, they are optional.
FORTRAN convention. Uppercase
words are keywords and must appear
exactly as shown. Keywords can be
u s e d o n l y a s s p e c i fi e d i n t h e
reference formats.
UNDERLINED COBOL convention. Underlined upperUPPERCASE case words are required when the
format in which they appear is used.
FORTRAN convention. Underlined
uppercase words are not used.
Lowercase

[1

60485200 A

Lowercase words are generic terms
that represent the words or symbols
supplied by the user. When generic
terms are repeated in a format, a
number is appended to the term for
i d e n t i fi c a t i o n .
Brackets enclose optional portions
of a reference format. All of the
format within the brackets can be
omitted or included at the user's
option. If items are stacked
vertically within brackets, only
one of the stacked items can be
used.

{ } Braces enclose one item or several
vertically stacked items in a
reference format. When one item is
enclosed in braces and followed by
ellipsis, the item can be repeated
at the user's option. When several
items are enclosed in braces, one
of the enclosed items must be used.
|| || Vertical bars enclose two or more
vertically stacked items in a
reference format when at least one
of the enclosed items must be
used. Each of the vertically
stacked items can be used once.
••• Ellipses immediately follow a pair
of brackets or braces to indicate
that the enclosed material can be
repeated at the user's option.
Punctuation use differs for the conventions as
follows:
COBOL convention
Punctuation symbols shown within the for
mats are required unless enclosed in brac
k e t s a n d s p e c i fi c a l l y n o t e d a s o p t i o n a l .
In general, commas and semicolons are
optional. One or more spaces separate the
elements in a reference format.
FORTRAN convention
Punctuation symbols shown within formats
are required unless enclosed in brackets
and specifically noted as optional.
Numbers shown within formats are decimal unless
o t h e r w i s e s p e c i fi e d .

NOTATION USED IN EXAMPLES
T indicates the position of an assumed decimal
point in an item.
A plus or minus sign above a numeric character (n)
indicates an operational sign is stored in combina
tion with the numeric character.
Character positions in storage are shown by boxes.
A

B

C

D

A indicates a space (blank)

xiii

INTRODUCTION TO DATA BASE PROCESSING WITH DMS-170 1

The DMS-170 software package functions as a data
management system for Control Data computer systems.
Through this data management system, a data base
c a n b e d e fi n e d , m a i n t a i n e d , a n d c o n t r o l l e d i n a n
environment independent of the applications that
a r e a c c e s s i n g i t . C o n v e n t i o n a l fi l e s o t h e r w i s e
owned and processed by a number of distinct appli
cations can be described through the data descrip
tion language facilities of DMS-170. Consequently,
the responsibility for tasks such as data descrip
tion, data conversion, and validity checking is
transferred from the application programmer to the
d a t a a d m i n i s t r a t o r.
The DMS-170 data management system is composed of
the following elements:
Data Description Language (DDL), which creates
the schema definition, as well as the COBOL,
FORTRAN and Query Update subschema definitions.
CDC CYBER Database Control System (CDCS), which
controls, monitors, and interprets data base
requests from COBOL, FORTRAN, and Query Update
application programs.
CDC CYBER Record Manager (CRM), which handles
all input/output processing requests on a data
base from an application program.
Data Manipulation Languages (DML), which pro
vide for data base access through the COBOL and
FORTRAN programming languages. The COBOL DML
consists of features within the COBOL language.
The FORTRAN DML consists of DML statements that
are used within a FORTRAN-coded program and
processed by a DML preprocessor before FORTRAN
compilation.
Query Update language, which provides for data
base access in both interactive and batch
modes. Query Update is a language that enables
individuals with varying levels of technical
expertise to access and manipulate the data
base and to produce special-purpose reports.
Each element of the DMS-170 system is used either
i n t h e d e fi n i t i o n o r i n t h e p r o c e s s i n g o f a d a t a
b a s e . T h e d e fi n i t i o n o f t h e d a t a b a s e i s a c c o m
plished through the capabilities of DDL and the
m a s t e r d i r e c t o r y u t i l i t y. P r o c e s s i n g o f t h e d a t a
base involves retrieval and updating of the data by
application programs through the facilities of CDCS.
T h e D M S - 1 7 0 e n v i r o n m e n t d e fi n e s t w o r o l e s : t h e
data administrator and the application programmer.
The data administrator is responsible for the
d e fi n i t i o n o f a d a t a b a s e . T h e d a t a a d m i n i s t r a t o r
is a person or group of persons who develop and
define the data base as well as monitor and control
the day-to-day processing of that data base. The
application programmer uses interface capabilities
of COBOL, FORTRAN, and Query Update in developing
applications for data base processing.

60485200 A

C D C offers gui del i nes for the use of the software
described in this manual. These guidelines appear
in appendix F. Before using the software described
in this manual, the reader is strongly urged to
review this appendix. The guidelines recommend use
of this software in a manner that reduces the
e ff o r t r e q u i r e d t o m i g r a t e a p p l i c a t i o n p r o g r a m s t o
future hardware or software systems.

DATA BASE DEFINITION
To define a data base, the data administrator uses
the Data Description Language (DDL). Through this
language, four types of data descriptions can be
created: the schema, the COBOL subschema, the
FORTRAN subschema, and the Query Update subschema.
E a c h o f t h e s e d a t a d e s c r i p t i o n s f o l l o w s s p e c i fi c
structuring conventions, includes unique clauses
a n d s ta te m e n ts , a n d c o n fo r m s to a n individual set
of rules. Once the schema and COBOL, FORTRAN, and
Query Update subschema descriptions have been
created and compiled, the data administrator
creates the master directory through one of the
data base utility routines provided as a part of
CDCS.
The relationship of the elements involved in defin
ing a data base is shown in figure 1-1. The figure
Indicates that the schema directory must be avail
able to the DDL compiler to generate subschema
directories. Both the schema directory and sub
schema directories must be available to generate
t h e m a s t e r d i r e c t o r y.
The data descriptions In the schema and subschema
a r e o r g a n i z e d i n t o fi l e - l i k e s t r u c t u r e s . B y c o n
vention, the following terms are used when refer
ring to these structures:
Area in the schema
Realm in the subschema
The schema description of an area applies to all
data within the structure. The subschema definition
of a realm usually applies to a portion of data
within the structure but can apply to all the data.
The area provides the actual description of the
data. The realm provides the description of data
from the viewpoint of the application programmer.
The term file is used in this manual to refer to an
area or realm.

SCHEMA DEFINITION
The schema is a detailed English-like description
of the data in a data base. A user site can have
many data bases, but only one schema is allowed for
each data base.

1-1

DDL
Schema

jL

Input

z.

^s"^!\

DDL Subschema
Input

Master Directory
Input

(COBOL, FORTRAN,

Query Update)

DDL
Compiler
DDL
Compiler

Schema
Directory
Subschema
( Directories
I (COBOL. FORTRAN,
\ Query Update)

Master
Directory
Utility

Master
Directory

Figure 1-1. Data Base Definition

The schema provides the logical description of the
data base. A schema can be associated and used
with several physical data bases. A physical data
base is a set of files associated with the areas of
the schema. This association Is described later in
t h e M a s t e r D i r e c t o r y D e fi n i t i o n s u b s e c t i o n a n d i n
the Data Base Versions subsection.
The schema description is created by DDL statements
that name the schema, organize the schema into
areas, describe each record type with characteris
tics of the data, and describe relationships and
constraints among areas. The schema also includes
a c c e s s c o n t r o l l o c k s t h a t p r o v i d e a r e a p r i v a c y.
The DDL source statements describing the data are
used as input to the DDL compiler and are compiled
i n t o a n o b j e c t s c h e m a , o r s c h e m a d i r e c t o r y. T h e
data administrator then uses the schema to define
any number of subschemas.

1-2

SUBSCHEMA DEFINITIONS
A subschema is a detailed description of selected
portions of data described by a schema. The sub
schema defines the portion of the data base avail
able to the application program; the application
program uses the subschema descriptions to access
the data base. The subschema is based on the
schema.
The data descriptions in the subschema are orga
nized into realms that correspond to areas in the
schema. The realms included in a subschema can be
a subset of the areas in the schema. The data
items within the realm in a subschema can be a
subset of the data items described for the corre
sponding area in the schema. Figure 1-2 illustrates
the situation in which a subschema describes a
portion of a data base.

60485200 A

Physical Data Base
(Data Base Files)

Logical Data Base
(Description)
Shows schema
description.

Schema Areas
A, B, C, D

A schema describes all
data base files with
area descriptions.

Shows schema and
subschema descriptions.

Subschema
Realms
A, C, D

A subschema describes
portions of data base
fi l e s w i t h r e a l m
descriptions.

Figure 1-2. Subschema Describing a Portion of the Data Base
Although only one schema is allowed for each data
base, any number of subschemas can be defined to
m e e t t h e n e e d s o f d i ff e r e n t t y p e s o f a p p l i c a t i o n s .
S u b s c h e m a s a r e d e fi n e d b y t h e d a t a a d m i n i s t r a t o r
for use by application programs written in the
COBOL, FORTRAN, and Query Update languages.
/S^*V

COBOL Subschemas
A COBOL subschema is defined through the capabili
ties of the DDL language. COBOL subschemas describe
in COBOL-like syntax the parts of a data base that
can be accessed by a COBOL program. Data descrip
tions in COBOL subschema source statements are
written to correspond to data descriptions in the
s c h e m a . C e r t a i n d i ff e r e n c e s a r e a l l o w e d t o e x i s t ;
these differences are resolved by DDL and CDCS.
The COBOL subschema is generated by DDL source
statements that identify the schema and subschema,
specify realms and the content and structure of
records, identify relations among realms to be
u s e d , s p e c i f y r e c o r d q u a l i fi c a t i o n f o r r e l a t i o n
processing, and indicate any changes in data format
required by the application program.
The DDL source statements describing the subschema
are compiled by the DDL compiler into an object
s u b s c h e m a , o r C O B O L s u b s c h e m a d i r e c t o r y. T h e
schema must be compiled, however, before any sub
schemas using it can be compiled. A COBOL program
mer then uses a listing of the subschema to learn
the names and descriptions of the data to be refer
enced in the COBOL program. Data descriptions from
the subschema are automatically included in the
COBOL program when it is compiled.

FORTRAN Subschemas
A FORTRAN subschema is defined through the facili
ties of the DDL language. FORTRAN subschemas use
statements similar to FORTRAN specification state
ments to describe the parts of a data base that can

60485200 A

be accessed by a FORTRAN program. Data descrip
tions in FORTRAN subschema source statements are
written to correspond to data descriptions in the
s c h e m a . C e r t a i n d i ff e r e n c e s a r e a l l o w e d t o e x i s t ;
these differences are resolved by DDL and CDCS.
The FORTRAN subschema is generated by DDL source
statements that identify the schema and subschema,
specify realms and the content and structure of
records, indicate changes in data format required
by the application program, identify relations
among realms to be used, and specify record quali
fi c a t i o n f o r r e l a t i o n p r o c e s s i n g .
FORTRAN subschemas, like COBOL subschemas, cannot
be compiled until the schema being used has been
compiled. Once the schema has been compiled, the
DDL source statements describing each subschema are
compiled by the DDL compiler into an object sub
schema, or FORTRAN subschema directory. A listing
of the subschema is used by the FORTRAN programmer
to obtain the names and descriptions of the data to
be referenced in the FORTRAN program.

Query Update Subschemas
Q u e r y U p d a t e s u b s c h e m a s a r e d e fi n e d t h r o u g h t h e
capabilities of the DDL language. Query Update
subschemas describe in COBOL-like syntax the parts
of a data base that can be accessed through Query
Update directives. The data descriptions in Query
Update subschemas are written to correspond to data
descriptions in the schema. Certain differences
between the subschema and schema data descriptions
are allowed to exist; these differences are
resolved by DDL and CDCS. For each subschema, the
DDL source statements used as input to the DDL
compiler name the schema and subschema, specify
needed realms and the content and structure of
records, identify relations among realms to be
u s e d , s p e c i f y r e c o r d q u a l i fi c a t i o n f o r r e l a t i o n
processing, and indicate any changes in data format
required by the Query Update program.

1-3

After the schema has been compiled, the DDL source
statements describing the subschema are compiled by
the DDL compiler into an object subschema, or
subschema directory. The names and descriptions of
data to be referenced in a Query Update program are
obtained from a listing of the subschema.
Through facilities of DMS-170, a CDCS-controlled
data base can be accessed through Query Update
directly by CRM. Refer to appendix J for Informa
tion about this interface. This manual discusses
only Query Update data base access through CDCS.

MASTER DIRECTORY DEFINITION
The master directory must be created by the data
administrator before any application programs
a c c e s s i n g d a t a b a s e fi l e s c a n b e e x e c u t e d . T h e
master directory contains all information about the
data base known to CDCS. This includes information
about schemas and subschemas as previously
described in this section. This also includes
information about the following elements, which are
described later in this section: data base proce
d u r e l i b r a r i e s , l o g g i n g s p e c i fi c a t i o n s f o r d a t a
b a s e fi l e s , l o g fi l e s , a n d d a t a b a s e v e r s i o n s . I n
addition, the master directory functions as the
source of all data base and media descriptions for
CDCS.
If a data base has versions, these data base ver
s i o n s a r e d e fi n e d i n t h e m a s t e r d i r e c t o r y. A d a t a
base version is a set of permanent files for areas
d e s c r i b e d b y a s c h e m a . T h r o u g h d e fi n i t i o n o f
versions in the master directory a single schema
can be associated with more than one set of perma
n e n t fi l e s .
To create or update the master directory, the data
a d m i n i s t r a t o r u s e s t h e D B M S T R D u t i l i t y. I n p u t f o r
the utility contains information that associates
subschemas, a data base procedure library, log and
r e c o v e r y fi l e s , a n d d a t a b a s e v e r s i o n s w i t h a
schema. Input can also associate areas of particu
l a r d a t a b a s e v e r s i o n s w i t h p e r m a n e n t fi l e s a n d
l o g g i n g s p e c i fi c a t i o n s . T h e i n f o r m a t i o n a b o u t
p e r m a n e n t fi l e s t h a t i s s p e c i fi e d i n t h e m a s t e r
directory provides CDCS the information required to
a t t a c h t h e p e r m a n e n t fi l e s , i n c l u d i n g t h e a c t u a l
p e r m a n e n t fi l e a s s o c i a t e d w i t h a p a r t i c u l a r a r e a
a n d v e r s i o n , i n d e x fi l e s , l o g a n d r e c o v e r y fi l e s ,
a n d p r o c e d u r e l i b r a r y fi l e s . A f t e r t h e m a s t e r
directory has been generated, it must be stored as
a permanent file.
In the process of maintaining a data base environ
ment, the data administrator might want to add
information for one or more new schema definitions,
delete or modify existing schema information, or
m o d i f y p e r m a n e n t fi l e i n f o r m a t i o n f o r d a t a b a s e
fi l e s a n d p r o c e d u r e l i b r a r y fi l e s . U n d e r a n y o f
these circumstances, appropriate changes must be
made to the master directory through a modification
run. A new data base cannot be accessed by appli
cation programs until the appropriate information
from the correspondin g s c h e m a a n d s u b s c h e m a i s

1-4

a d d e d t o t h e m a s t e r d i r e c t o r y. S i m i l a r l y, w h e n
information pertaining to a schema is deleted from
t h e m a s t e r d i r e c t o r y, s u b s c h e m a s a s s o c i a t e d w i t h
the schema can no longer be used by application
p r o g r a m s . O n e o t h e r f o r m o f m o d i fi c a t i o n a l l o w s
the addition or deletion of information pertaining
to subschemas. No subschema can be referenced by a
user during execution unless information about that
subschema exists in the master directory.

DATA BASE PROCESSING
O n c e a d a t a b a s e h a s b e e n d e fi n e d b y t h e d a t a
a d m i n i s t r a t o r, t t c a n b e a c c e s s e d a n d m o d i fi e d b y
users of the COBOL, FORTRAN, and Query Update
application programming languages. The relation
ship of the elements involved in processing a data
base is shown in figure 1-3.
The following subsections introduce the processing
facilities of CDCS.

APPLICATION LANGUAGES
The data in a data base can be accessed by the
following application languages: COBOL 5, FORTRAN |
5, and Query Update. Processing of the data base
by COBOL, FORTRAN, and Query Update programs is
controlled and monitored by CDCS. These
application languages can be used in either batch
or interactive mode.

COBOL Processing
A COBOL program accesses data base files through
c o n v e n t i o n a l i n p u t / o u t p u t s t a t e m e n t s . T h e fi l e s
are opened and closed and records are read, writ
ten, deleted, and updated using the same means as
f o r fi l e s t h a t a r e n o t p a r t o f a d a t a b a s e . R e l a
tion processing is also accomplished by conventional
COBOL statements. Data retrieved by the program is
accessed in accordance with the way it is described
in the COBOL subschema.
When a COBOL program using CDCS is to be compiled,
t h e fi l e c o n t a i n i n g t h e s u b s c h e m a d i r e c t o r y m u s t
fi r s t b e a t t a c h e d . O n c e t h e p r o g r a m i s c o m p i l e d
using the subschema, it can be executed later
without reattaching the subschema directory.
Execution of an input/output statement for a data
base file in a COBOL program causes the COBOL
object-time routines to route input/output calls to
CDCS. CDCS controls all processing of data base
fi l e s .

FORTRAN Processing
A FORTRAN program accesses data base files through
DML statements coded within the FORTRAN program.
The DML consists of FORTRAN-like statements. These
statements allow the FORTRAN user to access and
modify data base files.

60485200 E

X-»3«%k

/*U^w

COBOL
Program

Recovery
Utilities Input

FORTRAN/
DML
Program

Query Update
Directives

— — data administrator

FORTRAN
Subschema
Directory

DML
Preprocessor

Query Update,
Subschema
Directory

Recovery
Utilities

Files p^
HLog
L

Query
Update

COBOL
Subschema
Directory

COBOL
Compiler

FORTRAN
Compiler

Master
Directory

COBOL Object
Program

FORTRAN
Object
Program

CDCS

CRM

Data Bases

Figure 1-3. Data Base Processing With CDCS

000®^

60485200 A

1-5

Before a program containing FORTRAN DML statements
is compiled, the DML preprocessor is called via a
control statement to translate the DML statements
i n t o F O RT R A N s p e c i fi c a t i o n s t a t e m e n t s a n d C A L L
statements. Data descriptions are obtained from
the FORTRAN subschema directory, which must be
attached during the preprocessing phase. Following
the preprocessing, compilation of the FORTRAN
program proceeds as for a conventional FORTRAN
program; the translated DML statements are compiled
like other FORTRAN statements. Once the program is
preprocessed using the subschema, it can be com
piled and executed later without reattaching the
subschema directory.

The immediate return feature of CDCS provides COBOL
and FORTRAN application programs with the ability
to receive an immediate response from CDCS when
e i t h e r a r e s o u r c e c o n fl i c t o r a f a t a l e r r o r
occurs. When this feature is used, CDCS returns
c o n t r o l t o t h e a p p l i c a t i o n . N o r m a l l y, t h e a p p l i c a
tion program waits for CDCS to gain access to these
r e s o u r c e s . H o w e v e r, w h e n t h e i m m e d i a t e r e t u r n
feature is enabled, the application program can
contain logic to determine the action taken in this
situation.
For further information about CDCS locking, dead
lock, and immediate return, refer to the CDCS 2
Application Programming reference manual.

When a FORTRAN program using the FORTRAN DML is
executed, CDCS controls all processing of data base
fi l e s .

DATA VALIDATION
Query Update Processing
Query Update functions within the data base envi
ronment whenever a Query Update subschema is speci
fi e d b y a Q u e r y U p d a t e u s e r. T h e Q u e r y U p d a t e
language, which is a special nonprocedural, inter
active language, can be used by both programmers
and nonprogramming personnel to perform several
functions. Through simple directives, search,
retrieval, update, and display operations can be
performed on data base files as well as on conven
t i o n a l fi l e s . I n a d d i t i o n , a s i n g l e Q u e r y U p d a t e
directive can be used in relation processing to
display to the user data from more than one file.
A comprehensive report writing capability is an
integral part of Query Update.
When a Query Update program accesses data base
fi l e s , C D C S c o n t r o l s a l l p r o c e s s i n g o f d a t a b a s e
fi l e s . T h e c o n c u r r e n c y, a c c e s s c o n t r o l , l o g g i n g ,
and recovery features of CDCS are used by Query
Update.

CONCURRENCY
An important feature provided by CDCS is the con
currency feature. Concurrency means that two or
more application programs can access the same data
base files at the same time. Programs can access a
fi l e c o n c u r r e n t l y f o r r e t r i e v a l o r u p d a t e p u r p o s e s .
During concurrent update operations, CDCS provides
a l o c k i n g m e c h a n i s m b y w h i c h r e s o u r c e s ( fi l e s o r
records) can be locked and unlocked at appropriate
times. Automatic locking and unlocking are per
formed by CDCS when certain input/output operations
a r e s p e c i fi e d . I n a d d i t i o n , e x p l i c i t l o c k a n d
unlock requests can be issued from an application
program.
The CDCS locking mechanism provides two kinds of
locks: protected and exclusive. A protected lock
allows the user holding the lock to update the
resource and other u s e r s t o r e a d i t . A n e x c l u s i v e
lock allows the user holding the lock to update the
resource and allows no other user to access it.
A deadlock situation can occur when two programs
attempt to access resources that have been locked
by CDCS or by other programs. When this situation
occurs, CDCS selects one of the contending programs
and releases all locked resources held by that
program. Appropriate code to handle recovery from
a deadlock should be included in application
programs.

1-6

D a t a v a l i d a t i o n b a s e d o n c r i t e r i a s p e c i fi e d i n t h e
schema is performed by CDCS. Through value range
c h e c k i n g , C D C S v e r i fi e s t h a t t h e v a l u e o f a p a r
t i c u l a r d a t a i t e m f a l l s w i t h i n a s p e c i fi e d r a n g e .
CDCS can also call data base procedures to perform
data validation.

RECORD MAPPING
Record mapping between the schema and subschema is
performed by CDCS. CDCS performs data conversions
and structural reformatting so that requested data
in the data base is delivered to the application
p r o g r a m a c c o r d i n g t o t h e f o r m a t s p e c i fi e d i n t h e
subschema.

FILE PRIVACY
Another valuable function provided by CDCS is the
access control (privacy checking) mechanism.
Through this mechanism, access to data base files
can be controlled on the basis of criteria speci
fi e d i n a d a t a b a s e p r o c e d u r e o r o n t h e b a s i s of
access control locks declared in the schema.
When a data base procedure is used for privacy
checking, the procedure decides whether to allow
the use of a data base area. The decision is based
on the access control key supplied by the applica
tion program and on the job name of the program.
When access control
checking, a clause in
that apply to the use
programs must specify
trol key (privacy key)
time to the data base

locks are used for privacy
a schema specifies the locks
of an area. The application
the appropriate access con
to gain access at execution
file controlled by the lock.

RELATIONS
The relation facility of CDCS allows an application
p r o g r a m t o a c c e s s d a t a f r o m fi l e s r e l a t e d b y t h e
r e l a t i o n d e fi n i t i o n w i t h a s i n g l e r e a d r e q u e s t ( a
display request for Query Update). In the schema,
the data administrator links areas together into a
logical, meaningful relationship, called a rela
t i o n , b y s p e c i f y i n g a r e l a t i o n e n t r y. T h e r e l a t i o n
entry assigns a name to the relation and specifies
the data items to be used to link the files.
60485200 A

The COBOL, FORTRAN, and Query Update users access
relations based upon the particular relations
included in the respective subschemas. The rela
tions in the COBOL and FORTRAN subschemas are based
o n t h e r e l a t i o n s d e fi n e d i n t h e s c h e m a . I n t h e
s u b s c h e m a , r e l a t i o n s c a n b e q u a l i fi e d ( c a l l e d a
r e s t r i c t i o n ) . I f a r e s t r i c t i o n i s d e fi n e d f o r a
relation, CDCS retrieves only records from the
fi l e s j o i n e d i n t h e r e l a t i o n t h a t m e e t t h e q u a l i fi
cation criteria.
During relation processing, data can be retrieved
fr o m e a c h fi l e j o i n e d i n t h e r e l a t i o n . A C O B O L o r
FORTRAN application program accesses a relation by
specifying a single read request with the name of
the relation that is to be read. CDCS processes
the requests and returns a record occurrence from
e a c h fi l e i n t h e r e l a t i o n t o t h e u s e r ' s w o r k a r e a
f o r t h e fi l e . Q u e r y U p d a t e p r o g r a m s a c c e s s r e l a
tions by specifying in a DISPLAY or EXTRACT direc
t i v e t h e d a t a n a m e s o f d a t a d e fi n e d w i t h i n t h e
areas that are joined in a relation.

CONSTRAINTS
The constraint facility of CDCS is an independent
feature that provides a means of protecting the
integrity of data in a data base. Use of the
facility prevents the possible introduction of
inconsistent data into a data base as a result of
update operations by application programs on
r e c o r d s i n l o g i c a l l y r e l a t e d fi l e s , o r o n i t e m s
w i t h i n a s i n g l e fi l e .
In the schema, the data administrator establishes a
dependency condition between two areas or between
items within an area by specifying a constraint
entry. The constraint entry assigns a name to the
constraint and specifies the data items involved in
the dependent relationship. The areas involved in
a two-area constraint must each contain a descrip
tion of a common data item, which is used to define
the constraint. During data base processing, a
dominant record occurrence corresponds to a depen
dent record occurrence if both records contain the
same value for the common item.
When a COBOL, FORTRAN, or Query Update application
program updating a data base is executed, CDCS
enforces the constraints established in the
schema. A write (store), delete (remove), or
rewrite (modify) request is permitted or rejected
by CDCS on the basis of the effect of the proposed
operation on the dependency condition in the
applicable constraint.

DATA BASE VERSIONS
The data base version facility of CDCS allows an
application program to use the same schema and
subschema to access a specific group of files when
a n u m b e r o f g r o u p s a r e d e fi n e d a s d a t a b a s e
v e r s i o n s . D a t a b a s e v e r s i o n s a r e d e fi n e d b y t h e
d a t a a d m i n i s t r a t o r i n t h e m a s t e r d i r e c t o r y. I f n o
d a t a b a s e v e r s i o n s a r e d e fi n e d , a v e r s i o n n a m e d
MASTER is assumed by default. If alternate data
base versions are defined, one version named MASTER
exists along with the other data base versions.
Data base versions are referenced in application
programs by specifying the version name. By speci

60485200 A

fying different version names, an application
program can perform operations on different sets of
fi l e s .
Figure 1-4 illustrates the use of data base ver
s i o n s . W h e n t h e a p p l i c a t i o n p r o g r a m s p e c i fi e s a
version name, CDCS makes available to the program
a l l t h e p e r m a n e n t fi l e s o f t h a t d a t a b a s e v e r s i o n
that are associated with the realms included in the
s u b s c h e m a b e i n g u s e d . T h e i l l u s t r a t i o n s h o w s fi l e
Ml being shared by the versions MASTER and TEST.
Permanent files can be shared by versions in only
o n e w a y : a n y p a r t i c u l a r p e r m a n e n t fi l e d e fi n e d f o r
version MASTER can also be defined for the same
area in any alternate version.

DATA BASE PROCEDURES
Data base procedures are special subprograms writ
ten by the data administrator to perform a variety
of supplemental operations not otherwise performed
by CDCS. The procedures are called at execution
t i m e w h e n s p e c i fi c s i t u a t i o n s o c c u r d u r i n g C D C S
processing. The conditions under which data base
procedures are to be executed are specified in the
schema. The order of execution of the procedures
and the names of the data base procedures are also
indicated in the schema. When the schema is
compiled, an alphabetic list of the data base
procedures is printed at the end of the source
program listing.
Some of the functions that can be performed by data
base procedures are: data validation; data con
version not supported by CDCS; calculation of
v a l u e s f o r a c t u a l o r v i r t u a l d a t a i t e ms; hashing to
determine the primary key value for direct access
fi l e s ; c o m p r e s s i o n a n d d e c o m p r e s s i o n o f d a t a ;
additional processing on creation, retrieval, or
update of data base records; privacy checking; and
special handling of error conditions detected
within CDCS. The use of data base procedures to
p e r f o r m t h e s e f u n c t i o n s p r o v i d e s a w e l l - d e fi n e d
method of tailoring the CDCS system to meet the
needs of a particular installation.

INPUT/OUTPUT PROCESSING
The input/output capabilities of CRM handle all
operations concerning the physical storage and
access of data in a data base. When an application
program requests execution-time processing of
i n p u t / o u t p u t s t a t e m e n t s f o r d a t a b a s e fi l e s , C D C S
directs the request to CYBER Record Manager Advanced
Access Methods (AAM). AAM processes the requests
according to the requirements and restrictions for
c o n v e n t i o n a l fi l e s .
All data base files supported by CDCS are conven
tional extended AAM files.

File Organization
F i l e o r g a n i z a t i o n o f d a t a b a s e fi l e s i s s p e c i fi e d
in the operating system FILE control statement when
t h e s c h e m a i s c o m p i l e d . T h e fi l e o r g a n i z a t i o n
i n f o r m a t i o n i s s t o r e d i n t h e s c h e m a d i r e c t o r y. T h e
o n l y fi l e o r g a n i z a t i o n s a l l o w e d f o r d a t a b a s e fi l e s
that are to be accessed through CDCS are indexed
sequential, direct access, and actual key.

1-7

/se%s
Example 1. Application Program AP1
Using Version MASTER

Data Base Files

M
1
AP1

T2

Subschema SS

M2

CDCS

Version
HASTER

T2
Master
Directory
with Version
D e fi n i t i o n s t

Example 2. Application Program AP1
Using Version TEST

N3

Data Base Files

Master
Directory
with Version
. D e fi n i t i o n s !

' Ve r s i o n D e fi n i t i o n s :

Version

Area A

Area B

Area C

MASTER

File M1

File M2

File M3

TEST

File M1

File T2

File T3

Figure 1-4. Processing Using Data Base Versions

I n fi l e s o f t h e s e o r g a n i z a t i o n s , r e c o r d s a r e s t o r e d
by value of a data item within the record that is
defined in the schema as the primary key. During
i n p u t / o u t p u t o p e r a t i o n s o n fi l e s , A A M e n f o r c e s t h e
following rule: the value of the primary key
cannot be duplicated within a file.

1-8

R e c o r d s i n i n d e x e d s e q u e n t i a l fi l e s a r e s t o r e d i n
a s c e n d i n g o r d e r b y v a l u e o f t h e p r i m a r y k e y. T h e
records can be accessed either randomly by key or
s e q u e n t i a l l y b y p o s i t i o n . T h i s fi l e o r g a n i z a t i o n
s h o u l d b e u s e d f o r fi l e s t h a t a r e t o b e a c c e s s e d
both randomly and sequentially.

60485200 A

Records for direct access files are stored randomly
in fixed length blocks. The number of the block to
receive a record is determined by a calculation
performed by the system on the record key. Records
c a n b e a c c e s s e d r a n d o m l y b y k e y o r s e r i a l l y.
Direct access file organization is used most effec
tively when rapid random access is required.

The use of automatic recovery features for data
b a s e fi l e s i s o p t i o n a l . T h e d a t a a d m i n i s t r a t o r
selects the features by specifying clauses in the
m a s t e r d i r e c t o r y.

Actual key files contain records whose primary key
values are assigned by the system. The primary key
value (also called the actual key) is a number that
i d e n t i fi e s t h e b l o c k a n d t h e p o s i t i o n w i t h i n t h e
block in which the record is stored. Records can
be accessed randomly by actual key; records also
c a n b e a c c e s s e d s e r i a l l y. A c t u a l k e y fi l e o r g a n i
zation is used most effectively when alternate keys
are needed and when performance and file growth
characteristics are of primary concern. It is also
used when no unique key exists so that a systemdefined key must be designated.

The data base transaction feature is the applica
t i o n p r o g r a m m i n g i n t e r f a c e t o a u t o m a t i c r e c o v e r y.
A d a t a b a s e t r a n s a c t i o n ( c a l l e d , s i m p l y, a t r a n s
action) is a sequence of one or more updates that
u s u a l l y i n v o l v e r e l a t e d fi l e s . A n a p p l i c a t i o n
program must use data base transactions for CDCS to
perform automatic recovery.

NOTE
Refer to appendix F for recommendations on
access methods.

Multiple-Index Processing
Multiple-index processing is performed when alter
n a t e k e y s a r e d e fi n e d f o r i n d e x e d s e q u e n t i a l ,
d i r e c t a c c e s s , a n d a c t u a l k e y fi l e s . A n i n d e x i s
created for each alternate key in a data file when
t h e fi l e i s c r e a t e d . T h e i n d e x e s a r e u p d a t e d
a u t o m a t i c a l l y w h e n e v e r t h e d a t a fi l e i s u p d a t e d .
Records can then be retrieved by the primary key or
b y a n a l t e r n a t e k e y. F o r d e t a i l e d i n f o r m a t i o n
refer to the CYBER Record Manager Advanced Access
Methods reference manual.

Data Base Transaction

The application program specifies the beginning of
the transaction, performs the update operations,
and specifies the end of the transaction, which can
be either a commit or a drop. When a commit trans
action is specified, CDCS makes the updates perma
n e n t . W h e n a d r o p t r a n s a c t i o n i s s p e c i fi e d , a l l
the updates performed within the transaction are
reversed by CDCS; therefore the data base is
restored to its state before the beginning of the
transaction. If the application program fails to
commit a transaction because of a system or program
failure, automatic recovery is performed and the
data base is restored to its state before the
beginning of the transaction.
The data base transaction feature is available to
COBOL and FORTRAN application programs. It is not
available to Query Update users.
The data base transaction feature also provides a
restart capability for application programs after a
system failure. Using this feature, the applica
tion program can determine the last transaction
that was committed by the program before a failure
occurred.

DATA BASE RECOVERY

Manual Recovery Utilities

The recovery facilities of CDCS provide ways to
deal with the following situations:

Manual recovery utilities supplement the capabili
t i e s o f a u t o m a t i c r e c o v e r y. T h e m a n u a l r e c o v e r y
utilities allow the data administrator to recon
struct a destroyed data base or to restore an
invalid data base.

Recovery of a data base from a system failure
Recovery of a data base from a program failure
Restarting a program after a system failure

Logging

Recovery of a lost, partially destroyed, or
invalid data base

CDCS performs logging at execution time. Log files
provide information necessary for automatic
r e c o v e r y, f o r m a n u a l r e c o v e r y, a n d f o r r e s t a r t i n g
an application program.

T h e f a c i l i t i e s o f a u t o m a t i c r e c o v e r y, t r a n s a c t i o n
processing, manual recovery, and logging deal with
recovery situations.

Automatic Recovery
Automatic recovery provides for data base recovery
from a system or program failure. After a system
failure occurs, CDCS automatically performs recovery
operations at CDCS-initialization time before CDCS
becomes available to application programs. After a
program failure, CDCS automatically performs the
r e c o v e r y o p e r a t i o n s w i t h n o e ff e c t o n o t h e r a p p l i
cations.

60485200 A

F o u r t y p e s o f l o g fi l e s c a n b e u s e d i n d a t a b a s e
r e c o v e r y o p e r a t i o n s . T h e fi r s t , t h e j o u r n a l l o g
fi l e , c o n t a i n s a r e c o r d o f e a c h o c c u r r e n c e o f a n
update or write operation on a data base. In
addition, a record is maintained on the journal log
fi l e o f c e r t a i n u s e r r e q u e s t s a n d p r i v a c y b r e a c h
a t t e m p t s . T h e s e c o n d , t h e q u i c k r e c o v e r y l o g fi l e ,
is used internally by CDCS to write blocks of
r e c o r d s b e f o r e t h e d a t a b a s e i s m o d i fi e d b y A A M .
T h e t h i r d , t h e t r a n s a c t i o n r e c o v e r y fi l e , c o n t a i n s
records used by CDCS to support automatic recovery.
T h e f o u r t h , t h e r e s t a r t i d e n t i fi e r fi l e , c o n t a i n s
information used by CDCS to provide for application
program restart if program or system failure occurs.

1-9

All logging is optional and is selected by the data
a d m i n i s t r a t o r i n c l a u s e s o f t h e m a s t e r d i r e c t o r y.
A l l l o g fi l e s a r e a s s i g n e d o n a p e r - s c h e m a b a s i s
and selected for use for particular areas and
versions.
T h e l o g fi l e s c a n p r o v i d e i n f o r m a t i o n a b o u t d a t a
b a s e u s a g e . T h e j o u r n a l l o g fi l e , i n a d d i t i o n t o
being input to a recovery run, can be processed by
a program for statistical analysis at a later
d a t e . T h e r e s t a r t i d e n t i fi e r fi l e c a n b e p r o c e s s e d
by a program to determine which application pro
grams failed and were never restarted.

PROCESSING THROUGH TAF
CDCS supports the Transaction Facility (TAF), which
allows processing through TAF under NOS. Process
ing through TAF provides for high speed handling of
repetitive executions of a relatively small number
of jobs called tasks. The tasks can be executed by
many different people from many locations. A task
usually performs one of the following manipulations
on a data base:
Stores a new record
Alters or deletes an existing record
Produces formatted output

A journal log file support feature provided by CDCS
i s j o u r n a l l o g fi l e m a i n t e n a n c e . C D C S a u t o m a t i
c a l l y d e t e c t s a f u l l j o u r n a l l o g fi l e , s w i t c h e s
l o g g i n g t o a n a l t e r n a t e j o u r n a l l o g fi l e , a n d
initiates the transfer of the contents of the full
fi l e t o a t a p e fi l e . T h i s f e a t u r e p r o v i d e s f o r
continuous logging during execution of CDCS.

OTHER DATA BASE UTILITIES
Other utilities applicable for use with a CDCScontrolled data base Include FORM, a file management
utility used to manipulate records and reorganize
fi l e s , a n d t w o A A M u t i l i t i e s u s e d w i t h e x t e n d e d
i n d e x e d s e q u e n t i a l fi l e s : F L S TAT f o r o b t a i n i n g
statistical information, and FLBLOK for estimating
t h e o p t i m a l b l o c k a n d b u f f e r s i z e s f o r fi l e s . Tw o
additional AAM utilities can be used with any of
t h e e x t e n d e d A A M fi l e o r g a n i z a t i o n s : M I P G E N f o r
adding alternate key access to an existing extended
AAM file, and MIPDIS for disassociating and reassoc i a t i n g d a t a a n d a l t e r n a t e k e y i n d e x fi l e s . T h e
FORM reference manual and the CYBER Record Manager
Advanced Access Methods reference manual should be
consulted for further details on these utilities.

An online banking system is an example of process
i n g f r e q u e n t l y p e r f o r m e d t h r o u g h TA F : t e l l e r s i n
many locations use terminals connected online to a
central processor to make deposits or withdrawals
f o r a n a c c o u n t a n d t o p r i n t c o n fi r m a t i o n s . A t a s k
(a deposit or withdrawal) is initiated by a teller
through the terminal; once initiated, the task is
e x e c u t e d t h r o u g h TA F a n d C D C S . T h e t a s k c a n
communicate with the terminal through TAF and the
Network Access Method (NAM) and can initiate sub
sequent tasks.
Figure 1-5 shows the CDCS/TAF interface. Access to
the data base through TAF is concurrent with access
in both batch and interactive modes. All access to
the data base is monitored by CDCS.
TAF tasks must be coded with special TAF requests.
Refer to the TAF reference manual for information
about the requests.
Since both TAF and CDCS provide for transaction
processing, the term transaction processing used in
this manual refers to data base (or CDCS) transac
tion processing. The term TAF transaction process
ing refers to processing through the TAF interface.

TASK
LIBRARY

NAM

TAF

CDCS

DATA
BASE

TRANSACTION

Figure 1-5. CDCS/TAF Interface

1-10

60485200 A

CDCS PROCESSING FLOW

CDCS LOADING AND EXECUTION

Execution of an application program in the CDCS
data base environment requires that CDCS be at a
system control point and that the master directory
be available. The COBOL compiler and the FORTRAN
DML preprocessor generate calls in COBOL and
F O R T R A N p r o g r a m s , r e s p e c t i v e l y, t o o b j e c t - t i m e
routines that format input/output requests to CDCS
during execution. Query Update interprets direc
tives and generates the appropriate calls to CDCS
for execution of the directives involved in data
b a s e a c c e s s . T h e fi r s t e x e c u t a b l e c a l l i s a n
invoke call to CDCS. During invocation, CDCS
registers the user program, reads the master direc
t o r y, b u i l d s i n t e r n a l t a b l e s a n d s t r u c t u r e s , a n d
a c t i v a t e s l o g fi l e s f o r t h e s c h e m a b e i n g u s e d .
C D C S a l s o a t t a c h e s a l l d a t a a n d i n d e : r fi l e s t h a t
are associated with realms referenced in the sub
schema used by the program. In addition, any file
that is associated with a realm that is involved in
a constraint with a realm that is referenced in the
subschema is also attached by CDCS. The system
fl o w f o r b a s i c r e t r i e v a l a n d b a s i c u p d a t e r e q u e s t s
is as follows:

CDCS resides on the system library as an absolute
program and normally operates through the system
control point facility of the NOS and NOS/BE oper
ating systems. An application program using CDCS
resides at a user control point. CDCS and one or
more application programs can reside at the same
control point when the CDCS Batch Test Facility is
used. Refer to the following subsection for more
i n f o r m a t i o n o n t h i s f a c i l i t y.

CDCS receives an input/output request from the
application program via a call from the appro
priate object-time routine.
CDCS analyzes the call and supplements infor
mation provided in the call with schema and
subschema information from the master directory.
Dependin g o n t h e c a l l , C D C S c a n p e r f o r m t h e
following operations:
Reads additional parameters from the user
control point.
Performs any required record mapping.
Performs logging operations.
Checks for violations of constraints.
Determines whether update operations are
being p e r f o r m e d w i t h i n a d a t a b a s e t r a n s
action.
Performs automatic recovery if the applica
tion program issues a request to drop a
transaction.
Issues AAM requests as required to execute
the call. AAM transfers data between the
d a t a b a s e fi l e s a n d t h e i n p u t / o u t p u t b u f
fers in the CDCS field length.
Loads and executes data base procedures.
CDCS transfers the status of the input/output
request and any data to the user control point
and allows control to be returned to the user
program.

60485200 A

Figure 1-6 illustrates the data base environment at
the system and user control points. This diagram
also includes mass storage requirements for data
b a s e fi l e s , l o g fi l e s , t h e d a t a b a s e p r o c e d u r e
l i b ra ry, a n d th e ma ste r d i re cto ry.
After CDCS is initiated by the operator at a system
c o n t r o l p o i n t , t h e r e m a i n d e r o f t h e fi e l d l e n g t h
represents managed memory under the control of the
Common Memory Manager (CMM). Managed memory con
tains CDCS internal tables, CYBER Record Manager
a c c e s s m e t h o d s , C Y B E R R e c o r d M a n a g e r b u ff e r s ,
mapping capsules, and data base procedure code
capsules loaded via Fast Dynamic Loader (FDL).
Establishment of CDCS as an active subsystem at a
system control point is described in section 10.
F o r f u r t h e r d e t a i l s o n b a s i c fi e l d l e n g t h r e q u i r e
ments for CDCS refer to appendix G.
The user control point includes the user program,
compiled object-time routines, error status regis
ters, and the user work area. User programs can be
relocatable, absolute, or overlay programs. Refer
to the CDCS 2 Application Programming reference
manual for information on application programming.

CDCS BATCH TESTING
The CDCS Batch Test Facility can be used for pro
gram development when data and file definitions are
c h a n g i n g f r e q u e n t l y. T h e C D C S B a t c h Test Facility
can be used with COBOL and FORTRAN application
programs. In batch test mode, CDCS and one or more
user programs run at one control point as a normal
b a t c h j o b . W h e n t h e C D C S B a t c h Te s t F a c i l i t y i s
used, new versions of the master directory file can
be attached each time the job is run. In normal
CDCS mode, the system control point must be dropped
and reinitiated to attach a new master directory
fi l e .
The CDCS Batch Test Facility resides on the system
library as an absolute program and is called into
execution by the CDCSBTF control statement. Multi
ple copies of the program can be run concurrently
with each other and with a system control point
version of CDCS. As many as 16 user jobs can be
run with one copy of the CDCSBTF program. User
programs must be in relocatable binary format.
Programs in absolute binary format, as well as
segmented programs and overlays, cannot be run in
batch test mode. For further details on the use of
the CDCS Batch Test Facility refer to the CDCS 2
Application Programming reference manual.

1-11

CENTRAL MEMORY
SYSTEM CONTROL POINT

CDCS
Internal
Tables

I/O
Buffers

Data Base
Procedure Library

Data Base
Procedure
Capsules

Mapping
Capsules

Log Files

Data Base and
Index Files

USER CONTROL POINT

Error
Status

User Program
and
Object-Time
Routines

Figure 1-6. Data Base Environment Under Operating System

1-12

60485200 A

SCHEMA DEFINITION
0^\

The schema is a directory that describes the
characteristics of data items within the data base
a n d s p e c i fi e s t h e o r g a n i z a t i o n a n d s t o r a g e o f t h e
d a t a . T h e I n t e r n a l s t o r a g e f o r m a t i s s p e c i fi e d f o r
individual data items. The data items are orga
nized into records within addressable storage units
called areas.

specifies the area in which it resides, and option
ally designates a data base procedure to be executed
w h e n t h e r e c o r d i s i n v o l v e d i n a s p e c i fi c u s e r
function. The remainder of the record description
entry consists of a series of data description
entries that describe the individual data items
within the record.

The schema directory, or object schema, is gener
ated when the schema source program is compiled by
the DDL3 compiler. The schema directory is often
called simply the schema.

A data description entry contains a data name, one
or more clauses describing the data item, and a
terminating period. The entry can also have a
level number that designates the position of the
data item in the hierarchical structure of the
record. If the level number is omitted, level
n u m b e r 0 1 , t h e h i g h e s t l e v e l i n t h e h i e r a r c h y, i s
assumed by default.

SCHEMA STRUCTURING
CONVENTIONS
The schema s o u r c e p r o g r a m c o n s i s t s o f s i x m a j o r
types of entries: four required, two optional.
Schema Identification Entry
Assigns a name to the schema; this entry is
required.
Area Description Entry
Assigns a name to a schema area and can
specify a data base procedure to be per
formed when the area is opened or closed;
at least one area description entry is
re q u i r e d .
Record Description Entry
Describes the structure and characteristics
of a DDL record type and can specify data
base procedures to be executed whenever
s p e c i fi c u s e r f u n c t i o n s m a n i p u l a t e a
record; at least one record description
entry is required.
Data Control Entry
Supplies special information related to the
schema areas; this entry is required.
Constraint Entry
Assigns a name to a constraint and speci
fies data items used to associate areas in
a constraint; this entry is optional.
Relation Entry
Assigns a name to the relation and speci
fi e s t h e d a t a i t e m s t o b e u s e d a s j o i n
terms to link areas in a relation; this
entry is optional.

DATA DESCRIPTION
Each DDL record type in the data base is described
I n a r e c o r d d e s c r i p t i o n e n t r y. T h e fi r s t s t a t e m e n t
in the entry assigns a name to the record type,

60485200 A

The data name in a data description entry is a
u s e r - d e fi n e d n a m e t h a t i d e n t i fi e s t h e d a t a i t e m .
It must conform to the rules governing user-defined
names as described in the User-Defined Names sub
section, which appears later in this section. The
d a t a n a m e c a n n o t b e q u a l i fi e d ; i t m u s t b e u n i q u e
w i t h i n t h e r e c o r d d e s c r i p t i o n e n t r y.
At least one clause must be included in a data
description entry; additional clauses can be
specified as needed. The required clause must be
the PICTURE clause, the TYPE clause, or the OCCURS
clause. Certain restrictions are placed on the
combination of clauses that can be included in a
d a t a d e s c r i p t i o n e n t r y. Ta b l e 2 - 1 l i s t s t h e
c l a u s e s t h a t c a n b e s p e c i fi e d a n d i n d i c a t e s t h e
valid combinations.
The only punctuation required in a data description
entry is the terminating period. Semicolons or
commas can be used to separate clauses. Commas can
also be used to separate repeated options.

DATA ORGANIZATION
D a t a i t e m s i n t h e d a t a b a s e a r e o r g a n i z e d fi r s t
into areas and then into records. Within a record,
two types of data items can be specified: elemen
tary items and group items. Repeating data items,
which can be elementary or group items, are fixed
or variable in length.

Areas
The data items defined in the schema must be orga
nized into addressable storage units called areas.
At least one area must be described in the schema;
if only one area is described, it encompasses the
entire data base. The maximum number of areas
allowed is 4095.
An area is a portion of mass storage that can be
accessed in the same manner as a file. An area is
o p e n e d a n d c l o s e d b y t h e u s e r O P E N and CLOSE
functions.

2-1

TABLE 2-1. VALID CLAUSE COMBINATIONS

PICTURE

TYPE

OCCURS

VIRTUAL
RESULT

ACTUAL
RESULT

CHECK

ENCODING

DECODING

CALL

PICTURE
TYPE

xt

OCCURS
VIRTUAL
RESULT
ACTUAL
RESULT
CHECK
ENCODING
DECODING

xt

CALL

tThis combination of clauses can only be used in the data description entry for an elementary item (vector).

An area can contain more than one DDL record type.
When multiple record types exist within an area,
the schema must designate the means for determining
the specific record type to be used for the occur
rence of an actual record. A record code identifies
each record type in the area. The record code is
determined in one of two ways:
A data item in the actual record contains a
unique value for each record type.
Execution of a data base procedure returns a
unique value for each record type.
If the record code is contained in a data item, the
data item must be in the same position in each
record type within the area. The data items must
also be the same size and data class. The data
names, however, need not be the same.
NOTE

can designate subordinate data items and therefore
must specify level numbers. A nonrepeating data
item that is not subordinate to a repeating group
item is the highest level (lowest number) data item
in the record.

Elementary Items
An elementary item is the smallest unit of named
data; it cannot be subdivided into other data
items. If it is part of a repeating group item,
the elementary item has the highest level number of
the group to which it belongs. Elementary items
that do not belong to a repeating group have the
lowest level number in the record; if a level
n u m b e r i s n o t s p e c i fi e d , l e v e l 0 1 i s a s s u m e d b y
default. The maximum number of items allowed is
81870; the maximum item size is 32767 characters.
The maximum number of items per record is 4095.

Refer to appendix F for recommendations on
the use of multiple record descriptions.
Group Items

Records
Within each area in the schema, data items are
organized into records. Each DDL record type is
d e fi n e d i n a r e c o r d d e s c r i p t i o n e n t r y t h a t a s s i g n s
a name to the record, designates the area in which
t h e r e c o r d r e s i d e s , o p t i o n a l l y s p e c i fi e s d a t a b a s e
procedures to be executed when the record is
manipulated, and describes the data items included
in the record. The maximum number of record types
allowed is 4095. A maximum record size of 81870
characters is allowed.
The hierarchical structure of the record is indi
cated by level numbers. Only repeating group items

2-2

The only group items that can be specified in the
schema are repeating groups. Nonrepeating group
items are not supported in the schema. A repeating
group is a collection of related data items orga
nized in a hierarchical structure; the entire
collection is repeated a number of times. The
collection can include elementary items and other
repeating group items. Group items can be nested
to three levels.
The group name data description entry has the
lowest level number; it must also include the
OCCURS clause. A data description entry is written
fo r e a c h i te m w i th i n th e g r o u p i te m ; th e s e e ntries
must have level numbers that are higher than the
group name level number.

60485200 A

Repeating Data Items
Two types of repeating data items can be designated
in the schema: vectors and repeating groups. A
vector is an elementary data item that is repeated
a number of times in each record. A repeating
group is a collection of data items that is
repeated; the entire collection, not individual
data items, is repeated a number of times in each
record.
Repeating data items are specified by including the
O C C U R S c l a u s e i n t h e d a t a d e s c r i p t i o n e n t r y. A
r e p e a t i n g d a t a i t e m c a n o c c u r a fi x e d n u m b e r o f
times In each record or a variable number of times
depending on the value of another data item in the
record.

The data item that controls the size of the vari
able occurrence data item must be described as an
integer; the CHECK IS VALUE clause must be included
to designate the minimum and maximum number of
occurrences that are allowed. The controlling data
item cannot be within a variable occurrence data
i t e m . I f i t i s w i t h i n a fi x e d o c c u r r e n c e d a t a
i t e m , t h e fi r s t o c c u r r e n c e o f t h e c o n t r o l l i n g d a t a
item determines the size of the variable occurrence
data item.
The following rules apply to variable occurrence
data items:

Vectors
A vector is an elementary data item that contains a
series of values. It is described with the OCCURS
clause and either the PICTURE or TYPE clause. No
data item can be subordinate to a vector; It must
be an elementary data item. A vector can be a data
item within a repeating group; however, it must be
a fixed occurrence vector.

A variable occurrence data item must be the
last item in the record. Only subordinate data
description entries can follow the entry con
taining the OCCURS data name TIMES clause.
A variable occurrence data item cannot be a
subordinate entry in a repeating group item.
Only one variable occurrence data item can be
s p e c i fi e d f o r a r e c o r d .

Repeating Groups
A repeating group is described with two or more
d a t a d e s c r i p t i o n e n t r i e s . T h e fi r s t e n t r y c o n s i s t s
of the group data name and the OCCURS clause. Each
a d d i t i o n a l e n t r y i s s u b o r d i n a t e t o t h e fi r s t e n t r y
a n d d e s c r i b e s a r e p e a t i n g g r o u p , a v e c t o r, o r a n
elementary data item. The vector or elementary
item contains the PICTURE or TYPE clause. Up to
t h r e e l e v e l s o f n e s t e d g r o u p s c a n b e s p e c i fi e d . A
repeating group that is subordinate to another
repeating group must be a fixed occurrence repeat
ing group.
L e v e l n u m b e r s m u s t b e s p e c i fi e d i n a r e p e a t i n g
group. The lower the position of the data item in
the hierarchy of the repeating group, the higher
the level number must be. Data items in the same
hierarchical position must have the same level
number.
Fixed Occurrence Data Items
A d a t a i t e m t h a t i s r e p e a t e d a fi x e d n u m b e r o f
times is described with the OCCURS integer TIMES
c l a u s e . T h e i n t e g e r s p e c i fi e s t h e e x a c t n u m b e r o f
occurrences of the data item for each record occur
rence; it must be a positive number greater than
zero. A fixed occurrence data item can be a sub
ordinate entry in a repeating group.
NOTE
Refer to appendix F for recommendations on
the use of repeating groups.
Variable Occurrence Data Items
A data item that is repeated a variable number of
times is described with the OCCURS data name TIMES
clause.

60485200 A

The exact number of times the data item is repeated
in a record occurrence depends on the value of the
data item referenced by data name in the OCCURS
clause.

DATA SIZE AND CLASS
The size and class of a data
either the PICTURE clause or
data description entry for an
must include one of these two

item are designated by
the TYPE clause. The
e l e m e n t ary data i tem
clauses.

Data size is specified in the PICTURE clause by the
number of character position designators (A, X, 9,
. ( d e c i m a l p o i n t ) , a n d T ) i n t h e p i c t u r e s p e c i fi c a
t i o n . I n t h e T Y P E c l a u s e , t h e n u m b e r of positions
for the data item is designated by specifying an
i n t e g e r. F o r a n u m e r i c d a t a i t e m , t h e i n t e g e r i s
t h e m a x i m u m n u m b e r o f s i g n i fi c a n t d i g i t s ; f o r a n
alphanumeric data item, the integer is the number
of character positions.
E a c h d a t a i t e m f a l l s i n t o a d a t a c l a s s c a t e g o r y.
The data class is determined by the description of
the data item. Refer to the descriptions of the
PICTURE clause and the TYPE clause for information
on the notations used in describing the data
classes.
Display Alphanumeric (Data Class 0)
TYPE CHARACTER clause with integer-3
PICTURE clause with alphanumeric picture
specification (A, X, and 9 characters)
Display Alphabetic (Data Class 1)
PICTURE clause with alphabetic picture
s p e c i fi c a t i o n ( c h a r a c t e r A o n l y )
Display Integer (Data Class 3)
PICTURE clause with numeric picture speci
fication (9 and T characters)

2-3

TABLE 2-2. VALID SCHEMA/SUBSCHEMA
CLASS CONVERSIONS

Display Fixed Point (Data Class 4)
P I C T U R E c l a u s e w i t h fi x e d p o i n t n u m e r i c
p i c t u r e s p e c i fi c a t i o n ( 9 , V, T, P, a n d .
ch ara cte rs)
Coded Binary Integer (Data Class 10)
TYPE FIXED clause with integer-1 in the
range 1 through 18
Coded Floating Point Normalized (Data Class 13)
T Y P E F L O AT c l a u s e w i t h i n t e g e r - 1 i n t h e
range 1 through 14

Subschema Data Classt
Schema
Data Classt

0

1

3

4

10

13

14

15

0
1
3
4

Coded Double Precision (Data Class 14)
10
T Y P E F L O AT c l a u s e w i t h i n t e g e r - 1 i n t h e
range 15 through 29
Coded Complex (Data Class 15)
TYPE COMPLEX clause
Refer to section 5 for a summary of data definition
for a CDCS controlled data base; refer to appendix
J for a summary of data definition in DMS-170.

SCHEMA/SUBSCHEMA
COMPATIBILITY
The schema describes the characteristics of all
data items in the data base. The subschema
describes only those data items to be accessed by
one or more application programs. Within certain
limitations, the characteristics of the data items
can be changed in the subschema to meet the
requirements of the application programs. The
process of changing data characteristics between
the schema and the subschema is called conversion.
Conversion occurs during record mapping, which is
the CDCS operation for generating a record image.
Record mapping produces a record image conforming
to the subschema description when a user GET
function (READ statement) requests the record. A
record image conforming to the schema description
is produced as a result of a user STORE or MODIFY
function (WRITE or REWRITE statement).
Refer to sections 3 and 4 for detailed descriptions
of the conversion limitations imposed on the sub
schema by the schema description. Conversion and
record mapping are discussed in detail in section 5
and appendix H.

DATA CONVERSION
The description of a data item determines the data
class of the item. Conversion from a schema data
class to a different data class in the subschema is
r e s t r i c t e d t o s p e c i fi c d a t a c l a s s c o n v e r s i o n s .
Ta b l e 2 - 2 i n d i c a t e s t h e v a l i d s u b s c h e m a d a t a
classes for each schema data class. When the
schema is created, the general usage of data items
and the valid data class conversions should be
considered. Conversion is inhibited when a data
item is described with the CHECK IS PICTURE clause.

2-4

13
14
15
tThe schema and subschema data classes are
identified by the following codes:
0
1
3
4
10
13
14
15

Display Alphanumeric
Display Alphabetic
Display Integer
Display Fixed Point
Coded Binary Integer
Coded Floating Point Normalized
Coded Double Precision
Coded Complex

Data conversion operates in a source-to-target
mode. The source and target data items are defined
as follows:
GET Function (READ Statement)
Source=schema data item
Target=subschema data item
STORE or MODIFY Function (WRITE or REWRITE
Statement)
Source=subschema data item
Target=schema data item
When conversion is required and the source data
item and target data item are unequal in length,
the following rules apply to a character data item:
If the source data item is larger than the
target data item, the source data item is
truncated on the right to the size of the
target data item. Truncation of nonblank
c h a r a c t e r s r e s u l t s i n a n e r r o r.
If the source data item is shorter than the
target data item, the source data item is blank
fi l l e d o n t h e r i g h t t o t h e s i z e o f t h e t a r g e t
data item.

60485200 A

If an error occurs during data conversion, an error
code is returned to the user program, and the
conversion operation is terminated. If the schema
specifies a data base procedure In a CALL ON ERROR
clause, the procedure is executed. The following
paragraphs discuss conversion of numeric data items.

Coded Arithmetic to Numeric Picture
If the target data item has a numeric picture
s p e c i fi c a t i o n , c o n v e r s i o n o c c u r s o n l y i f t h e s o u r c e
data item is coded arithmetic or can be converted
to coded arithmetic. The value of the source data
item is converted to character representation.
I n s i g n i fi c a n t z e r o s a r e a d d e d t o o r v e m o v e d f r o m
either end of the target data item to conform to
t h e p r e c i s i o n a n d s c a l i n g f a c t o r s p e c i fi e d f o r t h e
target data item. If the scaling factor of the
target data Item is less than that of the source
data item, rounding takes place in the least signi
fi c a n t d i g i t . I f t h e p r e c i s i o n o f t h e t a r g e t d a t a
i t e m i s n o t s u f fi c i e n t t o c o n t a i n a l l s i g n i fi c a n t
digits of the whole part of the source data item,
an error occurs and conversion does not take place.

RECORD MAPPING
Record mapping is performed by CDCS whenever a user
function reads or writes a data base record. The
schema and subschema record descriptions are used
to generate a record image. Each data item is
transferred from the source record to the target
record. Conversion is performed before the data
item is transferred. When no source data item
c o r r e s p o n d s t o a t a r g e t d a t a i t e m , t he target data
item is given a null value (blanks or zeros depend
ing on the data class of the data item).
In addition to resolving differences between the
schema and subschema descriptions, any of the
following clauses included in the schema descrip
tion of a data item are handled during record
mapping:
RESULT Clause
The data base procedure is executed to
determine the value of the data item.
ENCODING or DECODING Clause
The data base procedure is executed to
perform a nonstandard conversion for the
data item.
CHECK Clause

Numeric Picture to Coded Arithmetic
When the source data item has a numeric picture
s p e c i fi c a t i o n a n d t h e t a r g e t d a t a i t e m i s a c o d e d
arithmetic data item, the value of the source data
item is converted to the internal representation.
Insignificant zero digits are added or removed and
rounding occurs as needed in the least significant
digit. If the precision of the target data item Is
n o t s u f fi c i e n t t o c o n t a i n a l l s i g n i fi c a n t d i g i t s i n
the whole part of the source data item, an error
results and conversion does not occur.

Coded Arithmetic to Coded Arithmetic
The value of the source data item is converted, if
necessary, to the base, scale, mode, and precision
o f t h e t a r g e t i t e m . I n s i g n i fi c a n t z e r o s a r e a d d e d
or removed and rounding occurs as needed in the
l e a s t s i g n i fi c a n t d i g i t . I f t h e p r e c i s i o n o f t h e
t a r g e t d a t a i t e m i s n o t s u f fi c i e n t t o c o n t a i n a l l
s i g n i fi c a n t d i g i t s o f t h e w h o l e p a r t o f t h e s o u r c e
data item, an error results and conversion does not
o c c u r.

The data item is checked for the restric
tions imposed by this clause.
CALL Clause
The data base procedure is executed when
t h e s p e c i fi e d f u n c t i o n i s p e r f o r m e d o n t h e
data item.

SCHEMA PROGRAMMING
CONVENTIONS
The DDL schema source program consists of a series
of statements that describe the data base. The
rules, conventions, and hierarchical structures of
DDL are similar to those of the COBOL programming
language.

LANGUAGE ELEMENTS
DDL source statements are composed of clauses that
c o n t a i n r e s e r v e d w o r d s , u s e r - d e fi n e d n a m e s , a n d
literals. The use of these elements is described
i n t h e f o l l o w i n g p a r a g r a p h s . T h e s p e c i fi c f o r m a t s
o f t h e c l a u s e s a r e d e fi n e d i n t h e S c h e m a S y n t a x
subsection, which appears later in this section.

Numeric Picture to Numeric Picture
When both the target and source data items are
fixed point and differ only in the number of digits
o r t h e d e c i m a l p o i n t p o s i t i o n , i n s i g n i fi c a n t z e r o s
are added or removed to conform to the target data
i t e m p i c t u r e s p e c i fi c a t i o n a n d r o u n d i n g o c c u r s a s
needed. If the target data item precision is not
s u f fi c i e n t t o c o n t a i n a l l s i g n i fi c a n t d i g i t s , a n
error condition results and conversion does not
occur.

60485200 A

Reserved Words
Reserved words are English words and abbreviations
t h a t h a v e s p e c i a l m e a n i n g s t o t h e D D L c o m p i l e r.
These words can be used only as shown in the format
s p e c i fi c a t i o n s . A r e s e r v e d w o r d m u s t b e s p e l l e d
correctly; it cannot be replaced by another word.
Appendix D contains a complete list of DDL reserved
words.

2-5

Two types of reserved words are recognized by the
DDL compiler: keywords and optional words. A
keyword is a reserved word that must be used in a
s p e c i fi c c l a u s e . K e y w o r d s a r e e s s e n t i a l t o c o n v e y
t h e m e a n i n g o f a c l a u s e t o t h e c o m p i l e r. A n o p
tional word is a reserved word that can be included
in a clause to improve readability. Optional words
are recognized by the compiler but are not needed
to compile the object coding. In the format
specifications, keywords are shown as upper case
words that are underlined; optional words are shown
as upper case words that are not underlined.

User-Defined Names
M a n y o f t h e f o r m a t s p e c i fi c a t i o n s i n c l u d e n a m e s
that are supplied by the user. User-defined names
identify the schema, areas, relations, constraints,
records, data items, and data base procedures. The
type of name to be supplied is indicated in the
format specification by a lower case word.
User-defined names have two formats: normal and
escape. The formation of normal names is governed
by the following rules:
The name can contain up to 30 characters.
Letters (A-Z), digits (0-9), and the hyphen (-)
can be used in a name.
The first character must be a letter.
The hyphen cannot be used to begin or end a
name.
Adjacent hyphens are not allowed.
Spaces (blanks) cannot be used in a name.
A name cannot be spelled exactly the same as a
reserved word.
Two types of user-d e fi n e d n a m e s m u s t c o n f o r m t o
additional rules:
Area Names
Only letters (A-Z) and digits (0-9) can be
used.

Any character in the DDL character set can be
used in the name.
The name is delimited by the national currency
character ($).
The delimiter ($) can be included in the name
by specifying it two consecutive times for each
occurrence.

Literals
In some formats, the user must supply a literal as
part of the clause. A literal is a string of
c h a r a c t e r s t h a t r e p r e s e n t s a s p e c i fi c v a l u e .
Literals are either numeric or nonnumeric.
Numeric Literals
A numeric literal can contain the numbers 0 through
9, the decimal point, and the plus or minus sign.
N u m e r i c l i t e r a l s a r e e x p r e s s e d a s e i t h e r fi x e d
p o i n t o r i n t e g e r. T h e r u l e s f o r f o r m a t i o n o f
numeric literals are as follows:

- > ,

Fixed Point
One sign character can be specified as the
leftmost character; if a sign is not speci
fi e d , t h e l i t e r a l i s p o s i t i v e .
One decimal point can be specified in any
position except the rightmost position; if
a d e c i m a l p o i n t i s n o t s p e c i fi e d , t h e
l i t e r a l i s a n i n t e g e r.
Integer
A decimal point cannot be specified.
One sign character can be specified as the
leftmost character; if a sign is not speci
fi e d , t h e l i t e r a l i s p o s i t i v e .
The maximum size for a numeric literal is 30 digits;
h o w e v e r, o n l y 1 8 s i g n i fi c a n t d i g i t s c a n b e s p e c i
fi e d . U p t o 1 2 l e a d i n g o r t r a i l i n g z e r o s c a n b e
specified for decimal point alignment.

The first character must be a letter.

Nonnumeric Literals

The first seven characters must be unique.

A nonnumeric literal is a string of up to 255
characters. The string must be enclosed in quota
tion marks. Any character in the DDL character
set, including the space, can be used in a nonnumeric literal. If a quotation mark is to be
included in the literal, the quotation mark, must
b e s p e c i fi e d t w i c e f o r e a c h o c c u r r e n c e . F o r
example, "A""B" would yield the literal A"B.

Data Base Procedure Names
Only letters (A-Z) and digits (0-9) can be
used in the name.
The first character must be a letter.
A maximum of seven characters can be
s p e c i fi e d .
The escape format is used when the name does not
conform to the rules for normal names. An escape
name is most commonly used when the data base
procedure already exists and the name cannot be
used as a normal name. The formation of escape
names is governed by the following rules:
The name can contain up to 30 characters.

2-6

Data Reference
E a c h u s e r - d e fi n e d n a m e i n t h e s c h e m a m u s t b e
capable of being uniquely referenced. Unless the
name itself is unique because no other name has the
identical spelling, a method for obtaining unique
i d e n t i fi c a t i o n i s n e c e s s a r y. U n i q u e r e f e r e n c e i s
r e c o g n i z e d t h r o u g h t h e q u a l i fi c a t i o n , s u b s c r i p t i n g ,
a n d i d e n t i fi e r c o n c e p t s .

60485200 A

Q u a l i fi c a t i o n

Blank or Space

Q u a l i fi c a t i o n i s p e r m i t t e d i n a n y c l a u s e t h a t
references a data name. When a name exists within
a hierarchy of one or more names, the higher level
names can be used to make the name unique. The
data name is written followed by the word OF or IN
and the qualifier. The choice of OF or IN is based
on readability; the two words are logically equiva
l e n t . Q u a l i fi c a t i o n m u s t b e m a d e t o t h e l e v e l
necessary to make the name unique; however, quali
fication can be used even when the name does not
need to be qualified.

Plus Sign
Minus Sign or Hyphen
Comma
Semicolon
Asterisk
Period or Decimal Point
Quotation Mark

Subscripting
Subscripting within the DDL syntax is permitted
only in the JOIN clause. Subscripts are used to
indicate which occurrence of a repeating group or
elementary Item is to be referenced. The data name
is written, followed by a positive integer constant
enclosed within parentheses. The following para
graphs describe specific rules for subscript use.

Right Parenthesis
$ Dollar Sign (national currency character)
/

Slash

The following reserved symbols are also included in
the DDL character set:

Identifier
T h e t e r m I d e n t i fi e r i s u s e d i n t h e s c h e m a J O I N
c l a u s e t o r e fl e c t a u n i q u e r e f e r e n c e t o a d a t a
name. The data name is referenced uniquely through
a c o m b i n a t i o n o f s u b s c r i p t s a n d q u a l i fi e r s . Q u a l i
fi c a t i o n a n d s u b s c r i p t i n g f o r a d a t a n a m e f o l l o w
the formats shown in figure 2-1.
Format 1 is used for subscripting and qualification
i n e i t h e r a s o u r c e i d e n t i fi e r o r a t a r g e t i d e n t i
fi e r . F o r m a t 2 i s u s e d t o d e s c r i b e a t a r g e t
i d e n t i fi e r t h a t i s c o m p o s e d o f a l l t h e o c c u r r e n c e s
of a repeating item and is an alternate key or the
m a j o r p a r t o f a n a l t e r n a t e k e y. R e f e r t o t h e A N Y
option discussed in the JOIN clause subsection.
Subscripting in the schema is permitted only in the
J O I N c l a u s e . T h e o n l y q u a l i fi e r a l l o w e d f o r a n
i d e n t i fi e r i s r e c o r d n a m e , a s s p e c i fi e d i n t h e
RECORD NAME clause in the schema.

Equals
> Greater than
< Less than

Punctuation
Most punctuation marks in a DDL source program are
optional. When punctuation marks are used, the
following rules apply:
A period must terminate each complete statement
as indicated by statement formats.
A period must be followed by at least one space.
A left parenthesis must not be followed by a
space, and a right parethensis must not be
preceded by a space.

DDL Character Set
j0^\.

Left Parenthesis

The set of characters recognized by the DDL com
p i l e r c a n b e c o m b i n e d a c c o r d i n g t o t h e s p e c i fi e d
rules for for m i n g n a m e s a n d v a l u e s i n t h e s o u r c e
program. The DDL character set consists of the
letters A through Z, the numbers 0 through 9, and
the following special characters:

At least one delimiter (a space, comma, or
semicolon) must separate successive words in a
statement.
Commas and semicolons can separate clauses in a
statement.

Format 1

data-name

subscript-1 , subscript-2 [, subscript-3]J J_ {]7f} record- name I

Format 2
data-name

[,ANY)] [{w}

record-name

F i g u r e 2 - 1 . I d e n t i fi e r F o r m a t
60485200 A

2-7

DDL CODING
DDL source programs can be written on standard
coding sheets. Coding a schema is similar to
coding the Data Division of a COBOL applications
program. Columns 1 through 72 are used to write
DDL statements; columns 73 through 80 are reserved
for sequence numbers. A DDL statement is written
in free-format within the chosen columns. A DDL
statement terminates with a period.

DDL Statements
The DDL source program consists of a series of
entries. Each entry contains at least one state
ment; each statement contains at least one clause.
The entries must appear in the source program as
described in the Schema Syntax section.

T h e s c h e m a i d e n t i fi c a t i o n e n t r y m u s t b e t h e fi r s t
entry in the source program. An area description
entry must precede the record description entries
for all records in the area; all area description
e n t r i e s c a n p r e c e d e t h e fi r s t r e c o r d d e s c r i p t i o n
e n t r y. T h e d a t a c o n t r o l e n t r y m u s t f o l l o w t h e
r e c o r d d e s c r i p t i o n e n t r y. T h e c o n s t r a i n t e n t r y, i f
included, must follow the data control entry and
p r e c e d e a n y r e l a t i o n e n t r y. T h e r e l a t i o n e n t r y, i f
included, must be the last entry in the source
program.
The function and placement of the major entries in
a schema source program are as follows:
Schema Identification Entry
Assigns a name to the schema.
Area Description Entry

Sequence Numbers
A sequence number consisting of digits only can be
entered in columns 73 through 80. The sequence
number is optional and has no effect on the source
program.

Assigns a name to an area and can also
specify data base procedures to be executed
whenever the area is opened or closed. One
entry must be included for each area in the
data base.
Record Description Entry

Comment Lines
Comments can be included in the source listing for
documentation purposes. A comment must be preceded
and followed by a delimiter, which consists of two
special characters. The preceding delimiter is a
slash and an asterisk (/*); the following delimiter
is an asterisk and a slash (*/)•
A comment can begin wherever a space is entered.
All characters between the delimiters are consid
ered a comment and are not processed by the DDL
compiler.

SCHEMA SYNTAX
The source program for a DDL schema consists of six
major types of entries. Each entry contains at
least one statement terminated by a period. The
statement contains one or more clauses. The
g e n e r a l f o r m a t o f t h e D D L s c h e m a d e fi n i t i o n i s
shown in figure 2-2.

s c h e m a i d e n t i fi c a t i o n e n t r y
■Carea description entry> ...
{record description entry> ...
{data control entry}
[constraint entry] ...
[relation entry] ...
Figure 2-2. General Format, Schema

2-8

Describes the attributes of a record. The
fi r s t s t a t e m e n t a s s i g n s a n a m e t o t h e
record and specifies the area that contains
the record; it can also specify data base
procedures to be executed whenever specific
user functions manipulate the record.
Additional statements (data description
e n t r i e s ) d e fi n e t h e c h a r a c t e r i s t i c s o f d a t a
items within the record.
Data Control Entry
Provides information related to the data
base areas described in the schema. The
area control entries supply compression and
decompression procedures, record keys,
record codes, and the collating sequence;
each statement pertains to a specific area.
Constraint Entry
Assigns a name to the constraint and speci
fies data items used to associate areas in
a constraint.
Relation Entry
Assigns a name to the relation and speci
fi e s t h e d a t a i t e m s t o b e u s e d a s j o i n
terms.
These entries and the clauses that can be included
in each entry are described in detail in this
section of the manual. Refer to the Schema Struc
turing Conventions subsection, which appears
earlier in this section, for the rules governing
the structure of the schema. Appendix E contains
the the complete summary of all DDL clauses used to
create a schema source program.

60485200 A

SCHEMA IDENTIFICATION
ENTRY
i0^N

The first entry in a schema source program is the
s c h e m a i d e n t i fi c a t i o n e n t r y . T h i s e n t r y a n d
following entries up to the end-of-information
indicator constitute the schema description. The
f o r m a t o f t h e s c h e m a i d e n t i fi c a t i o n e n t r y i s a s
follows:
SCHEMA NAME clause.
T h e s c h e m a i d e n t i fi c a t i o n e n t r y i s r e q u i r e d a n d
c o n s i s t s o f o n e s t a t e m e n t t h a t i d e n t i fi e s t h e
schema.

The area description entry must precede the record
description entries for all records in the area
d e s c r i b e d b y t h e e n t r y. A l l a r e a d e s c r i p t i o n
entries for the schema can be specified before the
record description entries.

AREA NAME Clause
The AREA NAME clause assigns a name to an area in
the schema. This clause is required and must be
t h e fi r s t c l a u s e i n a n a r e a d e s c r i p t i o n e n t r y. T h e
format of the AREA NAME clause is shown in figure
2-5.

AREA NAME IS area-name

SCHEMA NAME Clause
The SCHEMA NAME clause assigns a name to the
schema. The format of the SCHEMA NAME clause is
shown in figure 2-3.

SCHEMA NAME IS schema-name.

Figure 2-3. SCHEMA NAME Clause Format
The schema name must be unique among all schema
names known to CDCS. The name assigned in this
clause is the name specified in all subschemas that
reference the data base described in the entries
following the SCHEMA NAME clause.

Other Clauses
Only one clause is acceptable in the schema identi
fi c a t i o n e n t r y . F u t u r e s o f t w a r e r e l e a s e s w i l l
provide addi ti o n a l c l a u s e s th a t c a n b e i n c l u d e d i n
t h i s e n t r y.

Figure 2-5. AREA NAME Clause Format
The area name must be unique among all area names
in the schema. It can contain up to 30 characters;
h o w e v e r, o p e r a t i n g s y s t e m l i m i t a t i o n s i m p o s e t h e
following restrictions on the area name:
The first seven characters of the name must be
unique.
Only letters (A-Z) and digits (0-9) can be used.
T h e fi r s t c h a r a c t e r o f t h e n a m e m u s t b e a n
a l p h a b e t i c c h a r a c t e r.
For the area name to be valid in the master direc
tory, it must not duplicate a reserved word for the
DBMSTRD utility (refer to appendix D).
T h e a r e a i s a s s o c i a t e d w i t h a p a r t i c u l a r fi l e
organization through a FILE control statement
included in the set of control statements preceding
the schema source program. The information from
the FILE control statement is placed in the schema
directory along with the information in the area
description entry of the source program. Refer to
the FILE Control Statement subsection, which
appears later in this section, for more information.

AREA DESCRIPTION ENTRY
An area description entry is included in the schema
s o u r c e p r o g r a m f o r e a c h a r e a ( fi l e ) i n t h e d a t a
base. This entry assigns a name to the area and
can specify a data base procedure to be executed
when the area is opened or closed by an applica
tions program. The format of the area description
entry is shown in figure 2-4.

AREA NAME clause
CCALL clause]
[ACCESS-CONTROL clause] ...
Figure 2-4. Area Description Entry Format
At least one area description entry must be included
i n t h e s c h e m a . I f o n l y o n e e n t r y i s s p e c i fi e d , i t
encompasses the entire data base. Each entry
consists of one statement.

60485200 A

CALL Clause (Area Description Entry)
The CALL clause in an area description entry causes
a data base procedure to be executed when the area
is opened or closed. The procedure can be invoked
before or after the function is performed or when
an error is detected while opening or closing the
area. The FOR phrase gives the option of specify
ing either the UPDATE or RETRIEVAL usage mode. The
format of the CALL clause is shown in figure 2-6.
The procedure named by data-base-procedure is
executed when any specified function is executed on
t h e a r e a s p e c i fi e d i n t h e A R E A c l a u s e . T h e d a t a
base procedure name must not exceed seven
characters.
The BEFORE, ERROR, and AFTER options determine when
the data base procedure is invoked.
BEFORE
The procedure is executed immediately
before the area is opened or closed.

2-9

CALL data-base-procedure

BEFORE
ON ERROR DURIN6
AFTER

OPEN FOR

UPDATE
RETRIEVAL

CLOSE L

^flS3^V

Figure 2-6. CALL Clause Format (Area Description Entry)
CALL EMPOPEN BEFORE OPEN
CALL EMPCHK BEFORE OPEN

ERROR
The procedure is executed each time CDCS
detects and reports an error during the
opening or closing of the area.

ACCESS-CONTROL Clause

AFTER
The procedure is executed immediately after
the area is opened or closed.

The ACCESS-CONTROL clause in any area description
entry specifies the privacy locks that apply to the
use of an area. The format of the ACCESS-CONTROL
clause is shown in figure 2-7.

A t l e a s t o n e o f t h e s e o p t i o n s m u s t b e s p e c i fi e d ;
e a c h o p t i o n c a n b e s p e c i fi e d o n c e i n t h e C A L L
clause. If two or three options are included in
the clause, the data base procedure is executed at
each designated time.

The optional FOR phrase allows the access control
locks to apply specifically to UPDATE or RETRIEVAL.
If the FOR phrase is omitted, all literals or
procedures apply to any use of the area.
The literals are privacy locks to be matched with
t h e p e r t i n e n t p r i v a c y k e y. A l l l i t e r a l s m u s t b e
alphanumeric, and cannot exceed a maximum of 30
characters. The procedures named are privacy lock
procedures, which, when given access to a privacy
k e y, e i t h e r r e t u r n a y e s o r n o r e s u l t , o r d o n o t
return at all.

In the following example, the data base procedure
OPENSLS is executed both before and after the area
is opened for updating purposes.
CALL OPENSLS BEFORE AFTER OPEN FOR UPDATE
The OPEN or CLOSE option specifies the user func
tion that invokes the data base procedure at the
designated time. Each option can be specified once
in a CALL clause. Separate CALL clauses for each
type of the OPEN function and the CLOSE function
can invoke the same or different data base proce
d u r e s . I f n o u s e r f u n c t i o n i s s p e c i fi e d i n t h e
CALL clause, the data base procedure is executed
when any OPEN or CLOSE function is executed for the
area. If OPEN is specified and the FOR option is
not stated, the procedure is invoked when any type
of OPEN function is executed for the area.

Multiple privacy locks connected by OR phrases are
c o n s i d e r e d s a t i s fi e d i f a n y o n e i s s a t i s fi e d . T h e
privacy locks are processed in the order listed
until the outcome of the ACCESS-CONTROL clause is
known. The same literal or data base procedure can
b e s p e c i fi e d f o r o n e o r m o r e o p t i o n s i n c l u d e d i n
this clause.
A separate ACCESS-CONTROL clause can be stated for
each usage mode. However, the same usage mode
cannot be specified in more than one ACCESS-CONTROL
clause. If the ACCESS-CONTROL clause is omitted,
the use of the area being described is unrestricted.

If the FOR option is stated, the data base proce
dure is invoked whenever the specified type of OPEN
function is executed. In the FOR phrase, UPDATE
and RETRIEVAL can appear only once.
Multiple data base procedures can be executed at a
designated time. When more than one CALL clause
for either OPEN or CLOSE specifies the same time to
invoke a procedure (before, during, or after the
user function is performed), the procedures are
executed in the order the CALL clauses are stated
i n t h e a r e a d e s c r i p t i o n e n t r y. I n t h e f o l l o w i n g
example, the data base procedure EMPOPEN is exe
cuted, and then the procedure EMPCHK is executed
before the area is opened.

ACCESS-CONTROL LOCK

RECORD DESCRIPTION ENTRY
Each DDL record type in the data base must be
d e s c r i b e d i n a r e c o r d d e s c r i p t i o n e n t r y. T h i s
entry assigns a name to the record, designates the
a r e a i n w h i c h i t r e s i d e s , s p e c i fi e s d a t a b a s e
procedures to be used in conjunction with record
manipulation, and describes the data Items within
the record. The format of the record description
entry is shown in figure 2-8.

Tfor II upt>ATE 111 isf LiteraL"1 data-base-procedure
- )
\JW || RETRIEVAL || j 1S | PROCEDURE

I" (literal-2
— | PROCEDURE
PROCEDURE data-base-procedure

.)]...
/^^K

Figure 2-7. ACCESS-CONTROL Clause Format

2-10

60485200 A

RECORD NAME clause
WITHIN clause

The area name must be defined in an area descrip
tion entry that precedes the record description
entry. The same area name can be specified in more
than one record description entry.

[CALL clause] ....

CALL Clause (Record Description Entry)
{data description entry. ]
Figure 2-8. Record Description Entry Format
At least one record description entry must be
included in the schema. The clauses in the record
d e s c r i p t i o n e n t r y m u s t b e s p e c i fi e d i n t h e o r d e r
shown in the format. Multiple DDL record types can
be specified for an area.
Each record description entry begins with a record
name statement. This can be followed by a series
of statements (data description entries) describing
the individual data items within the record. If
th e re co rd d e s c r i p t i o n e n t r y d e fi n e s a r e c o r d t y p e
that contains only control information, no data
description entries follow the record name state
ment.

The CALL clause in a record description entry
causes a data base procedure to be executed when a
specified user function is performed on the record.
A user function is a request from an applications
program to perform an operation involving the
record. The procedure can be invoked before or
after the function is performed, or when an error
is detected during performance of the function.
The same data base procedure can be specified in
separate CALL clauses. The format of the CALL
clause is shown in figure 2-11.

CALL data-base-procedure

STORE
BEFORE
ON ERROR DURING
AFTER

The record described in the schema can be consid
ered a contiguous collection of data in the data
b a s e ; h o w e v e r, i t i s n o t n e c e s s a r i l y e q u i v a l e n t t o
a physical record. The record description is
machine independent and its actual placement in the
d a t a b a s e i s n o t d e fi n e d i n t h e r e c o r d d e s c r i p t i o n
e n t r y.

RECORD NAME Clause
The RECORD NAME clause assigns a name to the
r e c o r d . I t m u s t b e t h e fi r s t c l a u s e s p e c i fi e d i n
t h e r e c o r d d e s c r i p t i o n e n t r y. T h e f o r m a t o f t h e
RECORD NAME clause is shown in figure 2-9.

RECORD NAME IS record-name

Figure 2-9. RECORD NAME Clause Format
The record name must be unique among all record
names in the schema. It can be up to 30 characters
i n l e n g t h . T h e n a m e s p e c i fi e d i n t h i s c l a u s e i s
associated with all the data items described in the
same record description entry.

WITHIN Clause
The WITHIN clause specifies the area that contains
the DDL record type. This clause is required in
e a c h r e c o r d d e s c r i p t i o n e n t r y. T h e f o r m a t o f t h e
WITHIN clause is shown in figure 2-10.

WITHIN area-name

Figure 2-10. WITHIN Clause Format

r

60485200 A

DELETE
MODIFY
FIND
GET

—'

Figure 2-11. CALL Clause Format
(Record Description Entry)
The BEFORE, ERROR, and AFTER options determine when
the data base procedure is invoked.
BEFORE
For a STORE, MODIFY, or GET function, the
procedure is executed immediately before
record mapping occurs. For a DELETE or
FIND function, the procedure is executed
immediately before CYBER Record Manager is
called to process the record.
ERROR
The procedure is executed each time CDCS
detects and reports an error during the
performance of the specified function.
AFTER
For a STORE, MODIFY, or GET function, the
procedure is executed immediately after
record mapping occurs. For a DELETE or
FIND function, the procedure is executed
immediately after CYBER Record Manager is
called to process the record.
A t l e a s t o n e o f t h e s e o p t i o n s m u s t b e s p e c i fi e d ;
e a c h o p t i o n c a n b e s p e c i fi e d o n c e i n t h e C A L L
clause. If two or three options are included in
the clause, the data base procedure is executed at
each designated time. The only exception occurs
when the ERROR and AFTER options are specified and
an error causes execution of the data base proce-

2-11

dure. In this situation,
specified in the AFTER
the following example,
VERIFY Is executed both
function is performed.

the data
option is
the data
before and

base procedure
not executed. In
base procedure
after the MODIFY

CALL VERIFY BEFORE AFTER MODIFY
T h e u s e r f u n c t i o n s p e c i fi e d i n t h e C A L L c l a u s e
determines the type of record manipulation that
causes the data base procedure to be executed at
the designated time. Five functions can be
s p e c i fi e d :

more clauses are included in each data description
e n t r y. T h e r e c o r d d e s c r i p t i o n e n t r y i n c l u d e s z e r o ,
one, or more data description entries; unless the
record type contatns only control information, at
least one data description entry must be included.
The format of the data description entry is shown
i n fi g u r e 2 - 1 2 .

[level-number] data-name
[PICTURE clause]

STORE

[TYPE clause]

The procedure is executed when a user
function (WRITE statement) stores a record
in the data base.

[OCCURS clause]
[RESULT clause]

DELETE
[CHECK clause]

The procedure is executed when a user
function (DELETE statement) deletes a
record from the data base.

[ENCODING/DECODING clause]
[CALL clause] ....

MODIFY
The procedure is executed when a user
f u n c t i o n ( R E W R I T E s t a t e m e n t ) m o d i fi e s a
record in the data base.
FIND
The procedure is executed when a user
f u n c t i o n ( S TA R T s t a t e m e n t ) l o c a t e s a
s p e c i fi c r e c o r d f o r s u b s e q u e n t p r o c e s s i n g
of data base records.

GET

Figure 2-12. Data Description Entry Format
Each data description entry must begin with a data
name that identifies the data item. The data name
must be unique within the record. The level number
is optional; it is used to indicate the structural
level of the entry within the record description
entry. A level number must always be the following:
An unsigned decimal integer
In the range 01 through 99

The procedure is executed when a user
function (READ statement) reads a record in
the data base.
E a c h o p t i o n c a n b e s p e c i fi e d o n c e i n a C A L L
clause. Separate CALL clauses for individual user
functions can invoke the same or different data
b a s e p r o c e d u r e s . I f n o u s e r f u n c t i o n i s s p e c i fi e d
in the CALL clause, the data base procedure is
e x e c u t e d a t t h e d e s i g n a t e d t i m e f o r a l l fi v e u s e r
functions.
Multiple data base procedures can be executed at a
designated time. When more than one CALL clause
for the same user function specifies the same time
to invoke a procedure (before, during, or after the
user function is performed), the procedures are
executed in the order the CALL clauses are stated
i n t h e r e c o r d d e s c r i p t i o n e n t r y. I n t h e f o l l o w i n g
example, the data base procedure DELCHK is exe
cuted, and then the procedure DELVER is executed
before the DELETE function is performed.
CALL DELCHK BEFORE DELETE
CALL DELVER BEFORE DELETE

Greater than or equal to the level number of
t h e fi r s t d a t a d e s c r i p t i o n e n t r y i n t h e r e c o r d
description entry
If the level number is omitted, level 01 is assumed
by default.
One or more clauses follow the data name. At least
one of the clauses must be the PICTURE, TYPE, or
OCCURS clause.

PICTURE Clause
The PICTURE clause describes the display coded
storage characteristics of a data item. An elemen
tary data item must be described with either the
PICTURE clause or the TYPE clause. If both PICTURE
and TYPE clauses are specified for a data item, the
PICTURE clause is ignored, and a warning diagnostic
is issued. The format of the PICTURE clause is
shown in figure 2-13.

DATA DESCRIPTION ENTRY
(RECORD DESCRIPTION ENTRY)
A d a t a d e s c r i p t i o n e n t r y d e fi n e s t h e c h a r a c t e r i s
tics of a data item within the record. An entry is
required for each data item in the record. One or

2-12

Figure 2-13. PICTURE Clause Format

60485200 A

^"^■V

T h e p i c t u r e s p e c i fi c a t i o n d e t e r m i n e s t h e s i z e a n d
class of a data item. The class can be described
as either character or numeric. A character data
item is described with the characters A, X, and 9
i n t h e p i c t u r e s p e c i fi c a t i o n . T h e c h a r a c t e r s 9 , V,
. (decimal point), P, and T are used to describe a
n u m e r i c d a t a i t e m . T h e p i c t u r e s p e c i fi c a t i o n c a n
co n ta i n u p t o 3 0 c h a r a c t e r s . T h e c h a r a c t e r s c o m
p r i s i n g t h e p i c t u r e s p e c i fi c a t i o n m u s t b e e n c l o s e d
in quotation marks. PIC is the legal abbreviation
for PICTURE.
The size of the data item is indicated by the num
ber of A, X, 9, . (decimal point), and T characters
i n t h e p i c t u r e s p e c i fi c a t i o n . T h e c h a r a c t e r s V a n d
P are not counted in determining the size of the
data item. Consecutive identical characters in the
p i c t u r e s p e c i fi c a t i o n c a n b e s p e c i fi e d b y f o l l o w i n g
the character with an unsigned integer enclosed in
parentheses. Each of the following picture speci
fi c a t i o n s d e s c r i b e s a d a t a i t e m w i t h e i g h t c h a r
acter positions:
99999999 or 9(8)

PictureDisplay
Code
S p e c i fi c a t i o n D a t a Va l u e S t o r e d
"AAAAA"
or "A(5)"

COSTS |C|Q|S|T|S

"AAAA"
or "A(4)"

WXYZ

"XXXXXXXX"
or "X(8)"

ABCD- *** |A|B|C|D|-|*|*|*|

"XXXXXXXX"
or "X(8)"

123.4567

WXYZ

23.4567

"AAAAQQQ"

«%5ZrABCD123|A|B|C|D1
|'2131
Figure 2-14. PICTURE Clause Character
Data Items

XXXXXXXX or X(8)
9999AAAA or 9(4)A(4)
A picture specification can contain a maximum of 30
characters including parentheses, but the actual
data item can be larger than 30 characters. For
e x a m p l e , a p i c t u r e s p e c i fi c a t i o n c o n t a i n i n g t h e
character A repeated 75 times is too long, but A(75)
is a valid description for a data item with 75
alphabetic characters. Parentheses can be used to
indicate a repetition factor only with the char
a c t e r s A , X , P, a n d 9 . N u m e r i c d a t a i t e m s c a n
c o n t a i n a m a x i m u m o f 1 8 s i g n i fi c a n t d i g i t s ;
additional leading or trailing zeros indicated by
t h e c h a r a c t e r P c a n b e s p e c i fi e d f o r u p t o 3 0
characters.
Character Data Item
T h e p i c t u r e s p e c i fi c a t i o n t o d e s c r i b e a c h a r a c t e r
data item can contain the characters A, X, and 9.
The size of the data item cannot exceed 32767
characters.
The function of each character in the picture
s p e c i fi c a t i o n f o r a c h a r a c t e r d a t a i t e m i s a s
follows:
A E a c h A i n t h e p i c t u r e s p e c i fi c a t i o n r e p r e
sents a character position that can contain
either a letter of the alphabet or a space
(blank).
X E a c h X i n t h e p i c t u r e s p e c i fi c a t i o n r e p r e
sents a character position that can contain
any character in the DDL display code
character set. (Refer to appendix A.)
9 E a c h 9 i n t h e p i c t u r e s p e c i fi c a t i o n r e p r e
sents a character position that can contain
any decimal digit.
E a c h A , X , o r 9 i n t h e p i c t u r e s p e c i fi c a t i o n i s
counted in determining the size of the data item.
Figure 2-14 illustrates some character data item
p i c t u r e s p e c i fi c a t i o n s a n d t h e r e p r e s e n t a t i o n o f
actual data values.

60485200 A

Numeric Data Item
T h e p i c t u r e s p e c i fi c a t i o n f o r a n u m e r i c d a t a i t e m
describes an arithmetic data item in display code
f o r m a t . A c o m b i n a t i o n o f t h e c h a r a c t e r s 9 , V, .
(decimal point), P, and T describes a numeric data
i t e m . T h e p i c t u r e s p e c i fi c a t i o n c o n s i s t s o f o n e o r
two parts: a whole part and or a fractional part.
Digit positions in each part must be represented by
t h e c h a r a c t e r s 9 a n d T. A n u m e r i c p i c t u r e s p e c i fi
cation is in fixed-point decimal format. A maximum
of 18 significant digits can be described.
The function of each character in the picture
specification for a numeric data item is as follows:
Each 9
sents a
n u m b e r.
the size

i n t h e p i c t u r e s p e c i fi c a t i o n r e p r e
digit position that can contain a
The 9 is counted in determining
of the data item.

The character V is used in the picture
s p e c i fi c a t i o n t o i n d i c a t e t h e p o s i t i o n o f
an assumed decimal point. A V as the
r i g h t m o s t c h a r a c t e r i n t h e p i c t u r e s p e c i fi
cation is redundant. The character V
cannot appear more than once in the picture
s p e c i fi c a t i o n . S i n c e t h e a s s u m e d d e c i m a l
point does not occupy a character position,
the V is not counted in the size of the
data item.
A d e c i m a l p o i n t ( . ) i n t h e p i c t u r e s p e c i fi
cation indicates the position of an actual
decimal point. The decimal point is
counted in the size of the data item.
T h e c h a r a c t e r P i n t h e p i c t u r e s p e c i fi c a
tion indicates an assumed decimal point
that is outside the number in the data
i t e m . O n e P i s s p e c i fi e d f o r e a c h i m p l i e d
position between the rightmost character
and the assumed decimal point or between
the leftmost character and the assumed
decimal point. Since P indicates an
assumed decimal point, a V in the picture
s p e c i fi c a t i o n i s r e d u n d a n t . T h e c h a r a c t e r

2-13

P is not counted in the number of signifi
cant digits (maximum of 18); however, it is
counted in determining the total number of
characters in the data item (maximum of 30).
T h e c h a r a c t e r T i n t h e p i c t u r e s p e c i fi c a
tion indicates a digit position that
contains a plus sign or minus sign combined
with the digit. The T can be only the
r i g h t m o s t c h a r a c t e r i n t h e p i c t u r e s p e c i fi
cation. The plus sign (12-row punch) or
minus sign (11-row punch) is combined with
the digit punch. The representation of the
sign in the rightmost digit is shown in
fi g u r e 2 - 1 5 .

0

Digit
Plus
.
Representation'
Minus
.
Representation'

12

3

decimal]
DEC J

fi x e d ]

FLOATJ
REAL
TYPE IS

(CHARACTERS
ICHAR
J

A^^^K

[integer-1 [integer-2]]

[integer-3]

["decimal]
[dec J
COMPLEX

4

5

6

7

8

9

Figure 2-17. TYPE Clause Format

< A B C D

E

F

G

H

I

V J K L M

N 0 P Q R

A data item described with the TYPE clause and a
data item described with the PICTURE clause differ
in internal representation of numeric data items.
A data item described with the TYPE clause is
stored in binary format; a data item described with
the PICTURE format is stored in display code
format. The TYPE clause should be used for data
items that are primarily used for computation; the
PICTURE clause should be used for data items that
a r e p r i m a r i l y u s e d f o r d i s p l a y. C h a r a c t e r d a t a
items can also be described with the TYPE clause.

'The NOS system card reader does not support
the character translation shown for +0 or -0.
Figure 2-15. Sign Representation in
Rightmost Digit
I f t h e p i c t u r e s p e c i fi c a t i o n d o e s n o t c o n t a i n a V,
a d e c i m a l p o i n t , o r a P, t h e d e c i m a l p o i n t i s
assumed at the immediate right and the data item is
a n i n t e g e r. T h e d a t a i t e m i s a s s u m e d t o b e a
positive number when the picture specification does
n o t c o n t a i n t h e c h a r a c t e r T. F i g u r e 2 - 1 6 i l l u s
trates some numeric picture specifications and the
representation of actual data values.

Picture Specification Data Value
"999"

123

"99V999"

12345

"99V99T"

+12345

"PPP99999" .00012345

Display Code
Stored

M|2|3|

0

Il|2|3|4|5|
t
|I|2|3|4|E|
t
0 12 3 4 5

0

0|l|2|3|4|N|

The DECIMAL, FIXED or FLOAT, REAL, and COMPLEX
options can be used to describe a numeric data
item. A character data item is described with the
CHARACTER option. DEC is the legal abbreviation
for DECIMAL; CHAR is the legal abbreviation for
CHARACTER.
At least one of the reserved words DECIMAL (or
DEC), FIXED, FLOAT, REAL, CHARACTER (or CHAR), or
COMPLEX must be specified as a type option.
Numeric Data Item
The TYPE clause describes a numeric data item in
terms of base, scale, mode, and precision
Base
The base of a data item is decimal; if the
D E C I M A L o p t i o n i s n o t s p e c i fi e d , i t i s
assumed by default.
Scale

Figure 2-16. PICTURE Clause Numeric
Data Items

TYPE Clause
The TYPE clause describes the characteristics of a
data item that is stored in the computer's internal
binary format. An elementary item must be described
with either the TYPE clause or the PICTURE clause.
If both TYPE and PICTURE clauses are specified for
a data item, the TYPE clause takes precedence and a
warning diagnostic is issued. The format of the
TYPE clause is shown in figure 2-17.

2-14

Scale is described by either the FIXED or
F L O A T o p t i o n ; i f n e i t h e r i s s p e c i fi e d ,
FIXED is assumed by default.
Mode
The mode of a data item is real; if the
REAL option is not specified, it is assumed
by default.
Precision
Precision is described by specifying one or
t w o n u m b e r s ; t h e fi r s t n u m b e r ( i n t e g e r - 1 )
i n d i c a t e s t h e n u m b e r o f s i g n i fi c a n t d i g i t s
and the second number (integer-2) indicates
the position of an assumed decimal point.

60485200 A

A fl o a t i n g p o i n t d a t a i t e m h a s a m a n t i s s a a n d a n
exponent. The precision of the data item in the
m a n t i s s a i s s p e c i fi e d b y i n t e g e r - 1 ( t h e n u m b e r o f
decimal digits). Integer-1 must be in the range 1
through 29. Integer-2 must not be included when
the FLOAT option is specified.

I f i n t e g e r - 2 i s n o t s p e c i fi e d , i t i s a s s u m e d t o
b e z e r o a n d t h e fi x e d p o i n t d a t a i t e m i s a n
i n t e g e r.
Integer-1 and integer-2 are optional. If no
integer is specified, integer-1 is assumed to be 14
a n d i n t e g e r - 2 ( f o r a fi x e d p o i n t d a t a i te m o n l y ) i s
assumed to be zero.

A fixed point data item is always a binary integer;
integer-1 is In the range 1 through 18. A single
precision data item is stored in one computer word;
double precision data items require two words.
Integer-1 specifies the maximum number of signifi
cant digits for the data item; it must be in the
range 1 through 18.
A complex data item has a real part and an imagi
nary part. It always occupies two computer words.
P r e c i s i o n c a n n o t b e s p e c i fi e d f o r a c o m p l e x d a t a
item.

A schema description that includes the TYPE clause
with the FIXED option specified and with integer-1
designating the desired precision is equivalent to
a s u b s c h e m a d e s c r i p t i o n t h a t s p e c i fi e s C O M P U TA TIONAL-1. The TYPE clause with the FLOAT option
specified and with integer-1 in the range 1 through
14 is equivalent to a subschema COMPUTATIONAL-2
description.

The position of an assumed decimal point in a fixed
p o i n t d a t a i t e m i s s p e c i fi e d b y I n t e g e r - 2 . T h e
p o s i t i o n i s s p e c i fi e d a s f o l l o w s :

Figure 2-18 illustrates some TYPE clauses for
numeric data items and the representation of actual
data values.

A negative integer-2 locates the assumed deci
m a l p o i n t t h e s p e c i fi e d n u m b e r o f p o s i t i o n s t o
the right of the rightmost actual digit.

Character Data Item

A positive integer-2 that is less than or equal
to integer-1 locates the assumed decimal point
t h e s p e c i fi e d n u m b e r o f p o s i t i o n s t o t h e l e f t
of the rightmost actual digit.

The TYPE clause can be used to describe a character
data item. The CHARACTER option is specified with
integer-3 designating the number of characters in
t h e d a t a i t e m . I f i n t e g e r - 3 i s n o t s p e c i fi e d , i t
is assumed to be 1. A maximum of 32767 characters
can be specified for a character data item.

A positive Integer-2 that is greater than
integer-1 indicates that the data item is a
fraction, and the assumed decimal point is
located outside the actual number. The decimal
p o i n t i s l o c a t e d t h e s p e c i fi e d n u m b e r o f p o s i
tions to the left of the rightmost actual digit.

TYPE
Clause

Figure 2-19 illustrates some TYPE clauses for
character data items and the representation of
actual data values.

External
Representation

Decimal

Value

Internal
Representation

DECIMAL 3

123

123

10000 | 0000000000000173

FLOAT 14
FLOAT REAL

4.096E3

4096

11734 | 4000000000000000

FIXED 5,2

123.4

123.4

[ 2000 | 0000000000030064

1

1720 4000000000000000
1654 0000000000000000

(1.1,3.2)

1720 4314631463146315
1721 6314631463146315

FLOAT 15
COMPLEX

(1.1.3.2)

Figure 2-18. TYPE Clause Numeric Data Items

TYPE'
Clause

vjSfS^X

External
Representation

Internal Representation

CHARACTER 2

AA

IaTaT

CHARACTER 10

ABCDEFGHIJ

aib|c|d|e|f|g|hTTT71

CHARACTER 5

COSTS

C |Q |S |T |S

Figure 2-19. TYPE Clause Character Data Items

60485200 A

2-15

OCCURS Clause
The OCCURS clause is used to describe a data item
that is repeated a number of times within a
record. A repeating elementary item is a vector;
all occurrences of the elementary item are iden
tical in every respect except actual value. A
c o l l e c t i o n o f d a t a i t e m s c a n b e s p e c i fi e d a s a
repeating group; the entire collection is repeated
a number of times. The format of the OCCURS clause
is shown in figure 2-20.

OCCURS iinteser I
\ data-name)

TIMES

Figure 2-20. OCCURS Clause Format
The data item described with the OCCURS clause is
e i t h e r a fi x e d o c c u r r e n c e d a t a i t e m o r a v a r i a b l e
o c c u r r e n c e d a t a i t e m . T h e i n t e g e r o p t i o n s p e c i fi e s
the exact number of times the data item is repeated
in each record occurrence (a fixed occurrence data
i t e m ) . T h e s p e c i fi e d i n t e g e r m u s t b e g r e a t e r t h a n
zero. The data name option references a data item
whose current value represents the number of occur
rences (a variable occurrence data item). The data
item referenced by the data name must conform to
the following rules:
It must be an elementary item within the same
record as the variable occurrence data item.

When these two conditions exist, all record
description entries for the area must contain a
variable occurrence data item at the same location
in the record and must specify the same maximum
s i z e . T h e d a t a i t e m t h a t s p e c i fi e s t h e n u m b e r o f
occurrences must be in the same location in each
record description entry; the data description
entry for these data items must also specify the
same size and description.
The OCCURS clause cannot be included in a data
d e s c r i p t i o n e n t r y t h a t a l s o i n c l u d e s t h e R E S U LT
clause. Figure 2-21 illustrates some examples of
the OCCURS clause.
Two types of repeating data items can be specified:
vectors and repeating groups. A repeating data
item can be subordinate to another repeating data
item with the following restrictions:
Repeating data items can be nested up to three
levels.
A variable occurrence data item cannot be
subordinate to another repeating data item.
/***^^v

Vectors
A vector is an elementary data item that is re
p e a t e d a n u m b e r o f t i m e s . I t c a n b e a fi x e d o r
variable occurrence data item. A data item that is
a vector must be described with the OCCURS clause
and either the PICTURE or TYPE clause. A vector
can be subordinate to a repeating group.

It must be described as an integer.
The CHECK IS VALUE clause must be specified to
denote the range of occurrences; the lower
limit of the range must be greater than or
equal to zero.
It cannot be within a variable occurrence data
item.
It cannot be described with a VIRTUAL RESULT
clause.
The data name specified in the OCCURS clause cannot
be subscripted* A variable occurrence data item
should be the last item in the record. If it is a
re p e a ti n g g ro u p i te m , o n l y s u b o r d i n a t e e n t r i e s c a n
follow the entry containing the OCCURS data name
TIMES clause.
If a record description entry contains a variable
occurrence data item, certain restrictions are
placed on the area under the following conditions:
The area has more than one record description
e n t r y.
The FILE control statement for the area speci
fies RT=T (CYBER Record Manager record type is
trailer count).

2-16

Repeating Groups
A repeating group is a collection of data items
that is repeated a number of times. The collection
can consist of elementary items, vectors, and other
repeating groups. Subordinate entries describe the
data items in the repeating group. These entries
must have a level number that is greater than the
repeating group entry level number. When a repeat
ing group contains other repeating groups, entries
at the same level must have the same level number.
NOTE
Refer to appendix F for recommendations on
the use of repeating groups.

RESULT Clause
The RESULT clause specifies that the value of the
data item is established by the execution of a data
base procedure. The value of the data item can be
changed only by execution of the data base proce
dure. The time the procedure is Invoked depends
upon whether the ACTUAL or VIRTUAL option is speci
fied. The format of the RESULT clause is shown in
fi g u r e 2 - 2 2 .

60485200 A

Example 1

01 PAYMENTS

TYPE DECIMAL FIXED 6,2
OCCURS 12 TIMES.

The data item PAYMENTS is a vector; it is an elementary data item that is repeated 12 times in each record.
Example 2

01

MONTHLY-ORDERS
03 NUM-ORDERS
03 TOTAL-AMT

OCCURS 12 TIMES.
TYPE DECIMAL FIXED 2.
TYPE DECIMAL FIXED 6,2.

The data item MONTHLY-ORDERS is a repeating group that occurs 12 times in each record. It consists of two subordinate data
items that represent one occurrence of the repeating group.
Example 3

01 NUM-ITEMS
01 ITEM

03 QUANTITY
03 DESC-A
03 UNIT-PRICE
03 EXT-PRICE

PICTURE "99"
CHECK VALUE 1 THRU 15
OCCURS NUM-ITEMS TIMES.
PICTURE "9(4)".
PICTURE "X(16)'\
TYPE DECIMAL FIXED 5,2.
TYPE DECIMAL FIXED 6,2.

The data item ITEM is a repeating group that occurs a variable number of times in each record. The data item NUM-ITEMS contains
the number of occurrences for the record; the number must be in the range 1 through 15.
Example 4

01

QUARTER-TOTS
03 MNTH

03 CUM-T0T

OCCURS 4 TIMES.
TYPE DECIMAL FIXED 5,2
OCCURS 3 TIMES.
TYPE DECIMAL FIXED 6,2

The repeating group QUARTER-TOTS contains a vector (MNTH) and a nonrepeating elementary data item (CUM-TOT), Both
subordinate data items arc at the same level and must have the same level number.

Figure 2-21. OCCURS Clause Examples

|S /ACTUAL \
ESULT OF data-base-procedure
I.VIRTUAL ( ~

Figure 2-22. RESULT Clause Format
A data item can be described with either the ACTUAL
RESULT or the VIRTUAL RESULT clause. The data item
d e s c r i b e d w i t h t h e R E S U LT c l a u s e c a n n o t b e a
repeating data item (vector or repeating group).
It cannot be subordinate to a repeating group data
item.
The ACTUAL option specifies that the data item is
physically included in the record, and that a value
is always stored in the record. When a new record
is stored in the data base, the data base procedure
Is executed to establish a value for the data
item. Subsequently, the specified data base proce
dure is executed to update the data item each time
t h e r e c o r d i s m o d i fi e d . I f t h e A C T U A L o p t i o n i s
specified in the RESULT clause, the ENCODING clause
cannot be included in the same data description
e n t r y.

60485200 A

The VIRTUAL option specifies that the value of the
data item is established when the data item is
requested by an applications program. The data
item is not physically stored in the record; there
fore, the size of the data item should not be
included when the maximum record length (MRL) is
calculated for the area. The data item is stored
in the CDCS buffer when a user requests the record,
and the buffer size must be large enough to include
t h e d a t a i t e m . T h e s p e c i fi e d d a t a b a s e p r o c e d u r e
is invoked when a user GET function (READ state
ment) includes the data item. When the VIRTUAL
option is used to describe a data item, the follow
ing restrictions apply:
Neither the ENCODING clause nor the DECODING
clause can be used to describe the data item.
A CALL clause cannot be included in the data
d e s c r i p t i o n e n t r y.
The data item cannot be referenced in an OCCURS
data name TIMES clause.

Figure 2-23 illustrates the processing of a data
item described with the VIRTUAL RESULT clause.

2-17

Virtual
FIELDB

fi e l d a \ / fi e l d c
ABC

HUK

w

if

. . . .

Data Base

GET Function

Data
Base
Procedure

\

\

CDCS

\

FIELDA FIELDB FIELDC
ABC

DEFG

HUK

User Work
Area

Figure 2-23. Virtual Data Item Processing

CHECK Clause
The CHECK clause imposes certain restrictions on
the value of the data item. One or more of the
f o l l o w i n g f u n c t i o n s c a n b e s p e c i fi e d f o r t h e d a t a
item:
Inhibiting data conversion
Checking validity of the data item whenever a
value is changed or added
Restricting the value of the data item
If the value of the data item does not satisfy the
condition of the CHECK clause, an error is reported
t o t h e u s e r. T h e f o r m a t o f t h e C H E C K c l a u s e i s
shown in figure 2-24.
Each of the three options in the CHECK clause can
b e s p e c i fi e d o n c e . M u l t i p l e o p t i o n s c a n a p p e a r i n

CHECK IS

a n y o r d e r. P I C i s t h e l e g a l a b b r e v i a t i o n f o r
PICTURE. The data item described with the CHECK
clause must also be described with either the
PICTURE clause or the TYPE clause; however, the
data item cannot be described as TYPE COMPLEX.
The PICTURE option specifies that data conversion
between the schema and the subschema is not allowed
for the data item. The characteristics of the data
item in the subschema must match the characteris
tics of the data item in the schema.
The data base procedure option causes the specified
procedure to be executed when a value for the data
item is added or changed. The specified procedure
performs validity checking on the value. If both
t h e d a t a b a s e p r o c e d u r e a n d VA L U E o p t i o n s a r e
s p e c i fi e d , t h e VA L U E c h e c k i s p e r f o r m e d fi r s t ; t h e
procedure is executed only if the value of the data
item is valid.

/ PICTURE \
\ PIC
pic /
data-base-procedure
VALUE CNOTD literal-1 [THRU literal-23 Cliteral-3 LTHRU literal-43:
Figure 2-24. CHECK Clause Format

/^sS«^\

2-18

60485200 A

/#^v

The VALUE option places a restriction on the actual
value of the data item. The actual value is
c o m p a r e d w i t h t h e v a l u e s s p e c i fi e d i n t h e VA L U E
o p t i o n . I f t h e a c t u a l v a l u e s a t i s fi e s t h e c o m p a r i
son and the NOT option is omitted, the value is
v a l i d . W h e n VA L U E N O T i s s p e c i fi e d , a n a c t u a l
v a l u e t h a t s a t i s fi e s t h e c o m p a r i s o n i s n o t v a l i d .
Values for the comparison are specified as individ
ual values or as ranges of values. An individual
v a l u e i s s p e c i fi e d b y l i t e r a l - 1 ; a r a n g e o f v a l u e s
i s s p e c i fi e d b y l i t e r a l - 1 T H R U l i t e r a l - 2 . L i t e r a l s
must be specified in ascending order according to
t h e c o l l a t i n g s e q u e n c e s p e c i fi e d f o r t h e a r e a .
(Refer to the SEQUENCE clause in the data control
e n t r y. )
Validity checking is performed when a user function
i n c l u d e s t h e d a t a i t e m . T h e s p e c i fi c f u n c t i o n t h a t
causes the checking to be performed is determined
as follows:
I f t h e R E S U LT c l a u s e i s n o t u s e d t o d e s c r i b e
the data item, validity checking occurs when a
STORE or MODIFY function (WRITE or REWRITE
statement) adds or changes the value of the
data item.
I f t h e V I R T U A L R E S U LT c l a u s e i s u s e d t o
describe the data item, validity checking
occurs when a GET function (READ statement)
includes the data item.
If the ACTUAL RESULT clause is used to describe
the data item, validity checking occurs when a
new record is added, or when the data item is
updated.
When the data item requires other procedures (such
as a CDCS conversion routine or a data base proce
dure specified in a RESULT clause) the procedures
are executed before validity checking occurs.
Literals specified in the VALUE option must corre
s p o n d t o t h e t y p e o r p i c t u r e s p e c i fi c a t i o n f o r t h e
data item. Nonnumeric literals (enclosed in quota
tion marks) must be specified when the data item is
described with the TYPE CHARACTER clause or with a
PICTURE clause containing the character A or X. If
the data item is described with a TYPE FIXED or
TYPE FLOAT clause or with a PICTURE clause that
does not contain any A or X characters, a numeric
l i t e r a l m u s t b e s p e c i fi e d . A d d i t i o n a l r u l e s t h a t
a p p l y t o l i t e r a l s i n t h e VA L U E o p t i o n a r e a s
follows:
The last character in a numeric literal must
not be a decimal point.
The actual sign, not a sign over punch, must be
s p e c i fi e d i n t h e l i t e r a l .
If the data item is not signed (the character T
i s n o t s p e c i fi e d i n t h e p i c t u r e s p e c i fi c a t i o n )
and the literal is signed, the sign is ignored
and the literal is assumed to be positive.
If the fractional part of a literal is greater
t h a n t h e d a t a i t e m s p e c i fi c a t i o n , t h e l i t e r a l
is rounded off to the fractional length of the
data item. For a data item described as
PICTURE "99.999" or TYPE FIXED 5,3, the literal
20.5555 is rounded off to 20.556.
60485200 A

If the literal contains a fractional part and
t h e d a t a i t e m i s a n i n t e g e r, t h e l i t e r a l i s
rounded off to an integer (1234.55 becomes
1235).
It is recommended that the literal conform to the
d a t a I t e m s p e c i fi c a t i o n s o t h a t t h e l a s t t h r e e
rules need not be invoked. Figure 2-25 illustrates
v a l i d l i t e r a l s f o r s o m e t y p i c a l d a t a i t e m s p e c i fi
c a t i o n s . T h e v a l u e s s h o w n f o r t h e C H E C K VA L U E
c l a u s e a r e l i t e r a l s t h a t c o u l d b e s p e c i fi e d f o r t h e
PICTURE and TYPE specifications given.

ENCODING/DECODING Clause
The ENCODING/DECODING clause is used when the data
item requires nonstandard conversion. The conver
sion is performed by a data base procedure when the
data item is stored, retrieved, or updated. The
format of the ENCODING/DECODING clause is shown in
fi g u r e 2 - 2 6 .
Both the ENCODING clause and the DECODING clause
can be specified for the same data item. The data
item described with the ENCODING/DECODING clause
must be an elementary data item that is also de
scribed with either the TYPE clause or the PICTURE
clause.
The ENCODING clause invokes the conversion proce
dure when a STORE function (WRITE statement) adds a
new value for the data item to the data base, or
when a MODIFY function (REWRITE statement) alters
an existing value. The value is converted from the
subschema representation to the schema representa
tion. A data item described with the ENCODING
clause cannot be described with either the ACTUAL
RESULT or the VIRTUAL RESULT clause.
The DECODING clause invokes the conversion proce
dure when a GET function (READ statement) requests
the data item from the data base. The value is
converted from the schema representation to the
subschema representation. A data item described
with the DECODING clause cannot be described with
the VIRTUAL RESULT clause.
The ALWAYS option can be included to specify that
the data base procedure Is to be executed even if
the characteristics of the data item do not differ
between the schema and the subschema. If ALWAYS is
omitted from the clause, conversion occurs only
when record mapping is required for the data item.
T h e s p e c i fi e d d a t a b a s e p r o c e d u r e i s e x e c u t e d
instead of a standard conversion procedure. The
representation of the value is changed, not the
value itself.

CALL Clause (Data Description Entry)
The CALL clause in a data description entry causes
a data base procedure to be executed when a speci
fi e d u s e r f u n c t i o n i s p e r f o r m e d o n t h e d a t a i t e m .
A user function is a request from an application
program to perform an operation that Involves the
d a t a i t e m . T h i s c l a u s e c a n b e s p e c i fi e d o n l y f o r
an elementary data item. The procedure can be
invoked before or after the function is performed
or when an error is detected during the performance
of the function. The same procedure can be speci
fi e d i n s e p a r a t e C A L L c l a u s e s . T h e f o r m a t o f t h e
CALL clause is shown in figure 2-27.
2-19

Examples of Literals for
CHECK VALUE Pause

PICTURE or TYPE Clime

Numeric picture-specifications
PICTURE "9999V999"

1234
41234.12
12.123b (rounaea on to 12.124)

PICTURE "OT9.WT"

123.34
-123
-•-123.555 (actual sign must be used)

PICTURE "PPP9999"

.00012341 (decimal point and leading zeros must
.0001 \ be specified)

PICTURE "899PPP"
( (trailin9 zeros mu$t ** specified with
«#..»#»«( no decimal point)
0010000)
Nonnumeric picture-specifications
PICTURE "X(5>9(5)"

"ABCDE12345"l (nonnumeric literals must be
"A*X-$11111" j enclosed in quotation marks)

PICTURE "A<10>"

"AAAA"
"ABCD EFGH"

Floating point numeric type
TYPE FLOAT

281
99999.999

Fixed point numeric types
TYPE FIXED 5.7

.0012345)
„____ f (decimal point and leading zeros

TYPE FIXED 5.-2

1234500 k (trailing zeros must be specified with
500 ) no decimal point)

TYPE FIXED 14

55555.55 (rounded off to 55556)
-50000
any integer not greater than 14 digits in length

TYPE FIXED 14.2

any numeric literal not greater than 14 digits in length

TYPE FIXED 18

any integer not greater than 18 digits in length

TYPE FIXED 18.4

any numeric literal not greater than 18 digits in length

0 0 1 0 I m u s t ^ i p e c i fi e d '

Nonnumeric type
TYPE CHARACTER 5

"AAAAA" (nonnumeric literals must be enclosed
"A-123" In quotation marks)

Figure 2-25. Examples of Valid Literals in the CHECK VALUE Clause

F O R l ^ ^ l ^ l f A LWAY S l C A L L d a t a - b a s e - p r o c e d u r
)
DECODING/
L
J
K

The BEFORE, ERROR, and AFTER options determine when
the data base procedure is invoked.
BEFORE

Figure 2-26. ENCODING/DECODING
Clause Format

ERROR

CALL data -base-procedure

BEFORE

STORE

ON ERROR DURING
AFTER

GET
MODIFY

Figure 2-27. CALL Clause Format
(Data Description Entry)
2-20

The procedure is invoked immediately before
record mapping occurs.

The procedure is executed each time CDCS
detects and reports an error during the
performance of the specified function.
AFTER
The procedure is executed immediately after
record mapping occurs.

60485200 A

/^^^sV

A t l e a s t o n e o f t h e s e o p t i o n s m u s t b e s p e c i fi e d ;
e a c h o p t i o n c a n b e s p e c i fi e d o n c e i n t h e C A L L
clause. If two or three options are included in
the clause, the data base procedure is executed at
each designated time. The only exception occurs
when the ERROR and AFTER options are specified and
an error causes execution of the data base proce
dure. In this situation, the data base procedure
s p e c i fi e d i n t h e A F T E R o p t i o n i s n o t e x e c u t e d . I n
the following example, the data base procedure
SLEDIT is executed before the STORE function is
performed, and whenever CDCS detects an error
during the performance of the STORE function.
CALL SLEDIT BEFORE ERROR STORE
T h e u s e r f u n c t i o n s p e c i fi e d i n t h e C A L L c l a u s e
determines the type of data manipulation that
causes the data base procedure to be executed at
the designated time. Three functions can be
s p e c i fi e d :
STORE
The procedure is executed when a user
function (WRITE statement) stores a new
value for the data item.

GET
The procedure is executed when a user
function (READ statement) places the data
item in the user work area.
MODIFY
The procedure is executed when a user
function (REWRITE statement) causes the
value of the data item to be changed.
Each option can be specified once in a CALL clause.
Separate CALL clauses for individual user functions
can invoke the same or different data base proce
d u r e s . I f n o u s e r f u n c t i o n i s s p e c i fi e d i n t h e
CALL clause, the data base procedure is executed at
the designated time for each of the three user
functions.

DATA CONTROL.
• C a r e a c o n t r o l e n t r y. > . . .
Figure 2-28. Data Control Entry Format
The data control entry supplements information in
FILE control statements for the areas in the
schema. Information provided in a FILE control
statement does not require corresponding informa
tion in the area control entry in the data control
e n t r y. F o r m o r e i n f o r m a t i o n , r e f e r t o t h e F I L E
Control Statement subsection, which appears later
in this section.

AREA CONTROL ENTRY (DATA CONTROL ENTRY)
The area control entry supplies special information
related to an area of the schema. The following
information can be specified in the entry:
The use of compression and decompression
procedures
The data items representing the primary and
alternate keys
The collating sequence
The means for distinguishing among multiple DDL
record types within the area
An area control entry with a KEY clause is required
for each area. The format of the area control
entry is shown in figure 2-29.

AREA NAME clause
CCOMPRESSION/DECOMPRESSON clause]
{KEY clause} ...

Multiple data base procedures can be executed at a
designated time. When more than one CALL clause
for the same user function specifies the same time
to invoke a procedure (before, during, or after the
user function is performed), the procedures are
executed in the order the CALL clauses are stated
i n t h e d a t a d e s c r i p t i o n e n t r y. I n t h e f o l l o w i n g
example, the data base procedure GETCHK is exe
cuted, and then the procedure GETVER is executed
before the GET function is performed.
CALL GETCHK BEFORE GET
CALL GETVER BEFORE GET

DATA CONTROL ENTRY
Certain attributes
fi e d i n t h e d a t a
entry follows the
the schema. The
is shown in figure

60485200 A

of the schema areas are speci
c o n t r o l e n t r y. T h e d a t a c o n t r o l
last record description entry in
format of the data control entry
2-28.

CSEQUENCE clause]
CRECORD CODE clause] .
Figure 2-29. Area Control Entry Format

AREA NAME Clause
The AREA NAME clause specifies the area for which
the special information is being supplied. This
clause must be the first clause in an area control
entry. The format of the AREA NAME clause is shown
i n fi g u r e 2 - 3 0 .

AREA NAME IS area-name
Figure 2-30. AREA NAME Clause Format

2-21

The area name specified in this clause must refer
ence an area previously established in the schema
b y a n a r e a d e s c r i p t i o n e n t r y. S u b s e q u e n t c l a u s e s
in the area control entry apply to the area name
specified in the AREA NAME clause.

/eaiBv

Example 1
FOR COMPRESSION USE PROCEDURE CI01
FOR DECOMPRESSION USE PROCEDURE DCI01
Example 2

COMPRESSION/DECOMPRESSION Clause

FOR COMPRESSION DECOMPRESSION USE SYSTEM

The COMPRESSION/DECOMPRESSION clause provides for
the reduction of record length and for the restora
tion of records to the original state. When the
clause is omitted, no compression or decompression
o f r e c o r d s i s p e r f o r m e d . H o w e v e r, I f e i t h e r
COMPRESSION or DECOMPRESSION is specified, the
o t h e r m u s t b e s p e c i fi e d i n t h e s a m e c l a u s e o r i n
the clause immediately following. COMPRESSION and
DECOMPRESSION can be specified only once in an area
c o n t r o l e n t r y. T h e f o r m a t o f t h e c l a u s e i s s h o w n
In figure 2-31.
When COMPRESSION or DECOMPRESSION is specified,
either SYSTEM or PROCEDURE must be specified. The
SYSTEM option refers to a procedure supplied by
CYBER RECORD Manager. The PROCEDURE option des
ignates a data base procedure to perform the
compression or decompression of records. When the
SYSTEM option is used, it must be designated for
both compression and decompression operations for
t h e p a r t i c u l a r a r e a . S i m i l a r l y, i f t h e P R O C E D U R E
option is used, it must be designated for both
compression and decompression operations for the
a r e a . H o w e v e r, e i t h e r t h e s a m e o r d i f f e r e n t d a t a
base procedures can be designated. The procedure
name can have a maximum of seven characters and
must conform to all the rules governing procedure
n a m e s a s d e fi n e d i n t h i s m a n u a l . W h e n d i f f e r e n t
p r o c e d u r e s a r e s p e c i fi e d , t w o c l a u s e s m u s t b e
entered. The use of this option is shown in figure
2-32.

Figure 2-32. Examples of the
COMPRESSION/DECOMPRESSION Clause
contains multiple record types, only data items
from the first record type can be specified as keys
for the area.
The data name refers to a data item that contains
the record key. The data item must be a data item
described In the area named in the preceding AREA
NAME clause (primary or alternate key).
The maximum length allowed for a data item desig
nated as a primary key depends on the file organi
zation. For indexed sequential and direct access
files, a primary key cannot exceed 240 characters.
For actual key files, a primary key cannot exceed 8
characters. The maximum length allowed for a data
item designated as an alternate key is the same for
a l l t h e p r e v i o u s l y m e n t i o n e d fi l e o r g a n i z a t i o n s ; a n
alternate key cannot exceed 240 characters.
FILE control statement parameters related to the
key must be accurate descriptions of the data item;
any parameter that does not agree with the data
item description is overwritten with the data item
description value, and a diagnostic is issued.
Refer to the FILE Control Statement subsection
which appears later in this section.
Primary Key

KEY Clause
Format 1 of the KEY clause, in figure 2-33, speci
fies the data items that are the primary and alter
nate keys for a record. A key clause specifying
the primary key is required for each area. Key
clauses specifying alternate keys are optional.
Format 2, also shown in figure 2-33, can be used to
specify the data items that are to be concatenated
to produce the primary or alternate record key.
The data name specified in the KEY clause (format
1 ) d e s i g n a t e s a d a t a i t e m t h a t i s a r e c o r d k e y.
T h e d a t a n a m e m u s t b e q u a l i fi e d i f i t a p p e a r s i n
more than one record type in the schema. The data
item cannot be described as TYPE COMPLEX. Sub
scripting the data name is not allowed; if data
name is a member of a repeating data item, differ
ent rules apply depending on whether a primary or
a l t e r n a t e k e y i s b e i n g d e fi n e d . R e f e r t o t h e
following subsections about primary and alternate
keys. The specified data name can be nested only
one level in a repeating data item. If an area

FOR

COMPRESSION
DECOMPRESSION

The KEY IS data name clause designates the primary
key for a record; the primary key must be specified
b e f o r e a n y a l t e r n a t e k e y s a r e s p e c i fi e d . T h e
specified data name must refer to a data item in a
record within the area named in the preceding AREA
NAME clause. If the data name is a member of a
r e p e a t i n g d a t a i t e m , t h e fi r s t o c c u r r e n c e o f t h e
data item is referenced as the key. A primary key
f o r a n a r e a w i t h a c t u a l k e y fi l e o r g a n i z a t i o n must
be described as TYPE FIXED with a range of 1
through 8. For example, a key with a length of
five digits is described as TYPE FIXED 5.
The USING option can be used only in the primary
k e y s p e c i fi c a t i o n f o r a n a r e a w i t h d i r e c t a c c e s s
fi l e o r g a n i z a t i o n . T h i s o p t i o n s p e c i fi e s a d a t a
base procedure which performs a hashing operation,
u s i n g t h e p r i m a r y k e y, t o d e r i v e t h e s t o r a g e
address of a record. The data base procedure name
cannot exceed seven characters in length and must
conform to all the rules governing procedure names
as defined in this manual.

USE SYSTEM

PROCEDURE data-base-procedure

Figure 2-31. COMPRESSION/DECOMPRESSION Clause Format

2-22

60485200 B

/ttf^y

Format 1
KEY IS CALTERNATE3 data-name DJSING data-base-procedure]

DUPLICATES ARE

INDEXED
FIRST
NOT

ALLOWED

Format 2
KEY IDENTIFIER IS CALTERNATE] key-name < data-name-1 Cdata-name-2] ...>"
DUPLICATES ARE

INDEXED
FIRST

NOT

ALLOWED

Figure 2-33. KEY Clause Format
Alternate Key
The KEY IS ALTERNATE data name clause designates an
alternate key for a record; designation of any
alternate keys must follow designation of the pri
mary key. Multiple alternate keys can be specified
by including a KEY clause for each alternate key.
The data name must refer to a data item in a record
w i t h i n t h e a r e a s p e c i fi e d i n t h e p r e c e d i n g A R E A
NAME clause. If the data name is a member of a
repeating data item, all occurrences of the data
item are referenced as a key.
NOTE
Refer to appendix F for recommendations on
the use of alternate keys on repeating
groups.
T h e D U P L I C AT E S o p t i o n c a n b e s p e c i fi e d f o r a n
a l t e r n a t e k e y. T h i s o p t i o n c a n b e s p e c i fi e d a s
follows:
DUPLICATES ARE INDEXED or
DUPLICATES ARE ALLOWED
Duplicate alternate keys are allowed and
a r e s t o r e d i n t h e i n d e x fi l e i n o r d e r
according to the primary key to which the
alternate key corresponds.
DUPLICATES ARE FIRST
Duplicate alternate keys are allowed and
a r e s t o r e d i n t h e i n d e x fi l e i n t h e o r d e r
o f o c c u r r e n c e ( fi r s t i n , fi r s t o u t ) .
DUPLICATES ARE NOT ALLOWED
Duplicate alternate keys are not allowed.

the specified area, whose size is equal to the sum
o f t h e s i z e s o f t h e d a t a i t e m s s p e c i fi e d i n t h e
list of data names and whose beginning position is
t h e b e g i n n i n g p o s i t i o n o f t h e fi r s t d a t a i t e m
s p e c i fi e d . K e y n a m e m u s t c o n f o r m t o t h e r u l e s
g o v e r n i n g d a t a n a m e s d e fi n e d i n t h e U s e r - D e fi n e d
Names subsection which appears earlier in this
s e c t i o n . S u b s c r i p t i n g a n d q u a l i fi c a t i o n o f t h e k e y
name are not allowed. The specified key name must
be unique among all key names and data names de
fined in the schema.
The data names specified in the KEY clause desig
nate up to 64 contiguous elementary data items; the
items cannot be repeating data items. All data
names must be in the same record type in the area
and must be specified in the same order in which
they are defined in the record. A data name can be
q u a l i fi e d b y i n c l u d i n g t h e r e c o r d n a m e i n w h i c h i t
a p p e a r s . T h e d a t a n a m e s s p e c i fi e d i n t h e l i s t
cannot be data items that are separated by padding
caused by word-aligned values. A less than symbol
(<) and a greater than symbol (>) must enclose the
list of data names.
F o r fi l e c r e a t i o n , t h e c o n c a t e n a t e d k e y i s t r e a t e d
as a symbolic key for collating purposes. A sym
bolic key consists of 1 to 240 6-bit alphanumeric
characters.
T h e A LT E R N AT E o p t i o n d e s i g n a t e s a n a l t e r n a t e
c o n c a t e n a t e d k e y. M u l t i p l e a l t e r n a t e k e y s c a n b e
s p e c i fi e d b y i n c l u d i n g a K E Y c l a u s e f o r e a c h
a l t e r n a t e k e y.
All keys in an area must be unique with respect to
both size and position. For example, if two keys
have the same starting position, they cannot have
equal sizes.

I f t h e D U P L I C AT E S o p t i o n i s n o t s p e c i fi e d f o r a n
alternate key, duplicate keys are not allowed.

SEQUENCE Clause

Concatenated Key

T h e S E Q U E N C E c l a u s e s p e c i fi e s t h e c o l l a t i n g s e
quence for the data in the area. The format of the
SEQUENCE clause is shown in figure 2-34.

The KEY IDENTIFIER clause shown in format 2 (figure
2-33) designates a concatenated key for a record.
The concatenated key can be a primary or an
a l t e r n a t e k e y. A c o n c a t e n a t e d k e y c a n n o t b e u s e d
f o r a c t u a l k e y fi l e s .
The key name is a user-defined name used to iden
t i f y t h e c o n c a t e n a t e d k e y. I t r e p r e s e n t s a k e y i n
60485200 D

SEQUENCE IS

( ASCII
COBOL
DISPLAY

Figure 2-34. SEQUENCE Clause Format
2-23

The collating sequence for the area is specified as
ASCII, COBOL, or DISPLAY. (Refer to appendix I for
a listing of these collating sequences.) The
DISPLAY option must be specified when the area is a
Query Update catalog file. If the SEQUENCE clause
is not specified, the COBOL collating sequence is
assumed by default.
NOTE
Refer to appendix F for recommendations on
the use of collating sequence.

T h e s p e c i fi e d d a t a b a s e p r o c e d u r e e x a m i n e s t h e
record and returns to CDCS an integer value that
designates the record type. The integer returned
by the procedure is tested against the integers
specified in the VALUE phrases. The VALUE phrase
containing the matching integer designates the
record name of the record type to be used. One
VALUE phrase must be specified for each record type
in the area. The integers must be in the range 1
t h r o u g h 1 0 2 3 . E a c h i n t e g e r s p e c i fi e d m u s t b e
unique.
Figure 2-36 illustrates three methods of using the
RECORD CODE clause.
NOTE

RECORD CODE Clause
The RECORD CODE clause provides tha means to
distinguish between DDL record types when the area
contains more than one record type. The record
type can be determined by the value of a data item
in the record, or by the execution of a data base
p r o c e d u r e . T h i s c l a u s e m u s t b e s p e c i fi e d i f t h e
area has more than one record type. The format of
the RECORD CODE clause is shown in the figure 2-35.
T h e B Y d a t a n a m e o p t i o n s p e c i fi e s t h e d a t a i t e m
t h a t c o n t a i n s t h e r e c o r d c o d e . T h e s p e c i fi e d d a t a
name must refer to an elementary data item; data
name cannot be subscripted, and it must appear in
at least one record type in the area. If the data
name appears in more than one record type, it must
b e q u a l i fi e d t o p r o v i d e a u n i q u e i d e n t i fi e r . T h e
data item containing the record code must be in the
same location in each record type and must be of
t h e s a m e l e n g t h a n d t y p e ( d i s p l a y fi x e d p o i n t ,
display numeric, etc.). The data name in each
record type need not be the same.
The value that determines the record type must be
s p e c i fi e d f o r e a c h r e c o r d t y p e i n t h e a r e a . T h e
VALUE phrase is specified for each record type in
the area (record-name-1, record-name-2, etc.); the
a c t u a l v a l u e t h a t i d e n t i fi e s t h e r e c o r d t y p e i s
s p e c i fi e d a s l i t e r a l - 1 , l i t e r a l - 2 , a n d s o f o r t h .
Each literal must have a unique value within the
area and must be able to be converted to the type
o r p i c t u r e s p e c i fi c a t i o n o f t h e d a t a i t e m . I f t h e
data item is described with the CHECK VALUE clause,
the RECORD CODE literal must be the same as the
CHECK VALUE literal; only one literal can be speci
fied in the CHECK VALUE clause in each record. The
literal in the RECORD CODE clause cannot exceed 240
characters.
The PROCEDURE option specifies a data base proce
dure that is performed to determine the record
type. The data base procedure name can be a maxi
mum of seven characters.

Refer to appendix F for recommendations on
the use of multiple record descriptions.

CONSTRAINT ENTRY
A constraint defines a dependency condition between
two areas or between data items within the same
area. Update operations must satisfy the condition
before updating an area is allowed. Thus, con
straints protect the integrity of the data base. A
constraint entry must be included in the schema
source program for each constraint defined for the
data base.
A c o n s t r a i n t e n t r y i s a n o p t i o n a l e n t r y. I f u s e d ,
it must be included in the schema source program
following the data control entry and preceding any
r e l a t i o n e n t r y.
A constraint entry begins with a constraint name
statement. This is followed by a statement speci
fying the data items that associate the areas in a
dependent condition. One data item establishes a
record as being a parent record; the other data
item establishes the other record as being a child
record.
A constraint can involve only one area or can
associate two areas. An area can be involved in
more than one constraint. The maximum number of
constraints allowed is 4095.
Figure 2-37 diagrams the dependency condition
established between areas in constraints. The
arrows between the areas indicate the dependency
condition; the arrow points to the parent. Example
1 illustrates four constraints associating four
areas. Example 2 illustrates two areas associated
in two constraints. In this example, the depen
dency condition must be in the same direction in
both constraints.

LVALUE FOR record-name-2 IS literal-2]
PROCEDURE data-base-procedure
VALUE FOR record-name-3 IS integer-3
FOR record-name-1
record-name-4 IS
!BY data-name [VALUE
VALUE FOR
IS integer-4]
literal-1
Figure 2-35. RECORD CODE CLAUSE Format

2-24

60485200 A

Example 1
SCHEMA NAME IS MANUFACTURING-DB
AREA NAME IS EMPLOYEE.

RECORD NAME IS EMPLOYEE-REC WITHIN EMPLOYEE.
01 REC-TYPE PICTURE "A".

The record code is contained in the
data item REC-TYPE, which is in the
first character position in both records.
An A in REC-TYPE identifies
EMPLOYEE-REC; a B in REC-TYPE
identifies PAYROLL-REC.

RECORD NAME IS PAYROLL-REC WITHIN EMPLOYEE.
01 REC-TYPE PICTURE "A".
DATA CONTROL.
AREA NAME IS EMPLOYEE
RECORD CODE IS BY REC-TYPE OF EMPLOYEE-REC
VALUE FOR EMPLOYEE-REC IS "A"
VALUE FOR PAYROLL-REC IS "B".
Example 2
SCHEMA NAME IS SCHLIST.
AREA NAME IS PRICELIST.

RECORD NAME IS PRICES WITHIN PRICELIST.
0 1 D AT E - 1 P I C T U R E " X ( 1 0 P.
0 1 P RTA G T Y P E F I X E D .

The record code is contained in the
second field, which begins in character
position 11 in both records. A I in
PRTAG identifies PRICES; a 77 in
INTAG identifies INVENTORYNUMBERS.

RECORD NAME IS INVENTORY-NUMBERS WITHIN PRICELIST.
0 1 D AT E - 1 P I C T U R E " X ( 1 0 ) " .
0 1 ' I N TA G T Y P E F I X E D .

DATA CONTROL.
AREA NAME IS PRICELIST
RECORD CODE IS BY PRTAG
VALUE FOR PRICES IS 1
VALUE FOR INVENTORY-NUMBERS IS 77
Example 3
SCHEMA NAME IS NURSERY-DB.
AREA NAME IS HISTORY.

RECORD NAME IS REGIONAL WITHIN HISTORY,

The record code is determined by the
data base procedure HSTCODE. The
procedure is executed and returns an
integer that identifies the record type:
a I designates NATIONAL, a 2 desig
nates REGIONAL, or a 3 designates
STATE.

RECORD NAME IS NATIONAL WITHIN HISTORY,

RECORD NAME IS STATE WITHIN HISTORY,

DATA CONTROL.
AREA NAME IS HISTORY
RECORD CODE IS PROCEDURE HSTCODE
VALUE FOR REGIONAL IS 2
VALUE FOR NATIONAL IS 1
VALUE FOR STATE IS 3.
Figure 2-36. Examples of the RECORD CODE Clause

60485200 A

2-25

Example 1

Constraint C

Constraint A

Example 2
Constraint E

Constraint F
p Represents the record established as the parent
c Represents the record established as the child

Figure 2-37. Dependency Conditions Established by Constraints

A series of constraints cannot result in a cycle.
A cycle is a directed path starting from a record
designated as a child and terminating at that
starting record with it being a parent, also. If,
in example 1 in figure 2-37, the dependency condi
tion were reversed in constraint C, the series of
constraints would result in a cycle, which is not
allowed. Similarly in example 2, if one of the
dependency conditions were reversed, the con
straints would result in a cycle.
The format of the constraint entry is shown in
figure 2-38. The constraint entry assigns a name
to the constraint and specifies the data items
involved in the constraint.
CONSTRAINT NAME Clause
A constraint entry begins with the CONSTRAINT NAME
clause. The name must be unique among all con
straint names and area names in the schema. It can

2-26

CONSTRAINT NAME IS constraint-name
data-name-1 DEPENDS ON data-name-2.

Figure 2-38. Constraint Entry Format

be up to 30 characters in length. The name can
contain alphabetic and numeric characters and
hyphens as long as the first character is alpha
betic; consecutive hyphens are not allowed. The
format of the CONSTRAINT NAME clause is shown in
the constraint entry.
T h e n a m e s p e c i fi e d i n t h i s c l a u s e i s a s s o c i a t e d
with the dependency condition established by the
items in the DEPENDS ON clause. An area that is
involved in a constraint can contain only one DDL
record type.

60485200 A

/ * f * ^ \

DEPENDS ON Clause

If one is a concatenated key, the other must be
a concatenated key or a non-repeating group
defined as a key.

The DEPENDS ON clause is required when a CONSTRAINT
name clause is specified. The DEPENDS ON clause
designates the data items that are involved in the
constraint. The format of the DEPENDS ON clause is
shown in the constraint entry.
The order of the data items determines the direc
tion of the dependency condition. The constraint
condition established is that the record containing
data-name-2 is the parent record and the record
containing data-name-1 is the child record. How
ever, data-name-1 and data-name-2 can be contained
within the same record description.
The data items in the DEPENDS ON clause must meet a
number of requirements.
They must be keys.
They must have identical characteristics: that
is, they must be defined with identical TYPE or
PICTURE clauses.
/fp**\

Data-name-1 must reference a data item desig
nated as a primary key or an alternate key with
duplicate values permitted.
Data-name-2 must reference a data item desig
nated as a primary key or an alternate key with
no duplicates permitted.

If a data-name-1 or data-name-2 requires
qualification, the name of the record to which
it belongs must be used.
Figure 2-39 shows a constraint clause in a schema.
Included are the entries necessary for supporting
the constraint entry.

RELATION ENTRY
A r e l a t i o n d e fi n e s a d i r e c t e d p a t h j o i n i n g a r e a s
described in the schema to allow retrieval of data
from two or more areas at a time. An area can be
joined only once in any one relation. Figure 2-40
i l l u s t r a t e s fi v e a r e a s i n a d a t a b a s e a n d s e v e r a l
r e l a t i o n s t h a t c o u l d b e d e fi n e d f o r t h e m ; t h e
arrows and relation sequences denote the directions
of the relations.
A relation entry is included in the schema source
p r o g r a m f o r e a c h r e l a t i o n s h i p d e fi n e d i n t h e d a t a
base. This entry assigns a name to the relation
a n d s p e c i fi e s t h e d a t a i t e m s t o b e u s e d a s j o i n
terms. The format of the relation entry is shown
i n fi g u r e 2 - 4 1 .

SCHEMA NAME IS PERSONNEL.
AREA IS DEPARTMENT.
AREA IS EMPLOYEE.
RECORD IS DEPT-REC WITHIN DEPARTMENT
01 DEPT-NO PICTURE IS "X(5)".

RECORD IS EMP-REC WITHIN EMPLOYEE.

/ff^N

01 EMP-NO PICTURE IS "X(5)".
01 DEPT-NO PICTURE IS "X(5)M.

DATA CONTROL.
AREA NAME IS DEPARTMENT
KEY IS DEPT-NO OF DEPT-REC.
AREA NAME IS EMPLOYEE
KEY IS EMP-NO
KEY IS ALTERNATE DEPT-NO OF EMP-REC DUPLICATES
ARE INDEXED.
CONSTRAINT NAME IS DEPARTMENT-EMPLOYEE
DEPT-NO OF EMP-REC DEPENDS ON DEPT-NO OF DEPT-REC

Figure 2-39. Constraint Entry Within a Schema

r

60485200 A

2-27

a r e s p e c i fi e d d e t e r m i n e s t h e d i r e c t i o n o f t h e
relationship, called a parent/child relationship.
The JOIN clause is required if a RELATION NAME
clause is present. The format of the JOIN clause
is shown in the relation entry.
Within the JOIN clause a specified data item in one
area is equated with an identical data item in
another area; the two areas are thus related
t h r o u g h s p e c i fi c a t i o n o f a c o m m o n d a t a i t e m . T h e
relational operator EQ must appear between each
p a i r o f i d e n t i fi e r s i n c l u d e d i n t h e J O I N c l a u s e ;
the source identifier appears to the left of the EQ
and the target identifier appears to the right.
Relation 1:

Area 1 - Area 2 - Area 4

Relation 2:

Area 2 - Area 4 - Area 5 - Area 3

Relation 3:

Area 3 - Area 2 - Area 1

Figure 2-40. Relation Direction Example

RELATION NAME IS relation-name
JOIN WHERE identifier-1 EQ identif.er-2
[identifier-3 EQ identifier-4] ... .
Figure 2-41. Relation Entry Format
The relation entry follows all other entries in the
schema source program. A relation entry must be
included for each relationship defined for the data
base. The maximum number of relations allowed is
4095.
Each relation entry begins with a relation name
statement. This is followed by a series of state
ments pairing the data item join term of one area
with a corresponding data item in the area joined
to it.

RELATION NAME Clause
The RELATION NAME clause assigns a name to the
r e l a t i o n . I t m u s t b e t h e fi r s t c l a u s e s p e c i fi e d I n
t h e r e l a t i o n e n t r y. T h e f o r m a t o f t h e R E L AT I O N
NAME clause is shown in the relation entry.
The relation name must be unique among all relation
names and area names in the schema. It can be up
to 30 characters in length. The name can contain
alphabetic and numeric characters and hyphens as
long as the first character is alphabetic; consecu
tive hyphens are n o t a l l o w e d . T h e n a m e s p e c i fi e d
in this clause is associated with all the areas
joined in this relationship. An area can be
included in more than one relation. An area that
is joined in a relation cannot contain more than
one DDL record type.

JOIN Clause
The JOIN clause specifies the data items that CDCS
must inspect to join the areas in which the data
items reside. The order in which the data items

2-28

In the relationship defined by the JOIN clause, the
s o u r c e i d e n t i fi e r d e fi n e s t h e p a r e n t ; t h e t a r g e t
i d e n t i fi e r d e fi n e s t h e c h i l d . T h i s r e l a t i o n s h i p i s
valid for every source-target pair in the rela
tion. Refer to section 6 for more information
about relations.
T h e t e r m i d e n t i fi e r r e fl e c t s a u n i q u e r e f e r e n c e t o
a data name; it implies that the data name is
referenced uniquely through a combination of
s u b s c r i p t s a n d q u a l i fi e r s . R e f e r t o t h e I d e n t i fi e r
subsection, which appears earlier in this section,
f o r t h e i d e n t i fi e r f o r m a t .
E a c h s o u r c e i d e n t i fi e r ( e x c e p t t h e fi r s t ) m u s t b e
in the same area as the previous target identifier,
so that a continuous path from one area to the next
a r e a i s d e fi n e d . C y c l i n g i s n o t a l l o w e d ; a n a r e a
c a n n o t b e j o i n e d t o i t s e l f d i r e c t l y o r i n d i r e c t l y.
T h e i d e n t i fi e r s t o t h e l e f t a n d t o t h e r i g h t o f a
relational operator must have identical character
i s t i c s i n t h e p i c t u r e s p e c i fi c a t i o n o r i n t h e T Y P E
s p e c i fi c a t i o n a n d m u s t h a v e i d e n t i c a l s y n c h r o n
i z a t i o n a n d j u s t i fi c a t i o n ( i f a p p l i c a b l e ) . T h e
position of the data items within the records need
n o t b e i d e n t i c a l . T h e i d e n t i fi e r m u s t n o t s p e c i f y
a data item that is more than 255 characters long.
S u b s c r i p t i n g a n d q u a l i fi c a t i o n c a n b e s p e c i fi e d f o r
a n y i d e n t i fi e r .
Joining of areas in a relation is not guaranteed if
a s p e c i fi e d i d e n t i fi e r i s a g r o u p i t e m w i t h p a d d i n g
in it. Padding is used for word alignment of
constituent items in a group item, and the content
i s u n k n o w n . R e f e r t o fi g u r e 2 - 4 2 f o r a n e x a m p l e .
Padding must occur in group item H because item K
m u s t b e o n a w o r d b o u n d a r y. S i n c e t h e p a d d i n g
content in H is unknown, data item G (1) in all
probability will never equal data item H (1). An
unusable relationship results.
T h e d a t a i t e m r e f e r e n c e d b y i d e n t i fi e r c a n b e a n y
of the following types of data items:
A nonrepeating elementary item (no subscript).
A specific occurrence of a repeating elementary
Item or an occurrence of a repeating group item
(up to three subscripts).
All occurrences of a repeating data item if it
is an alternate key or the major part of an
a l t e r n a t e k e y, a n d i s s p e c i fi e d t o t h e r i g h t o f
the EQ in the JOIN clause (subscript ANY).
A c o n c a t e n a t e d k e y. ( S e e K E Y c l a u s e d e s c r i p
tion.)

60485200 A

AREA NAME IS AREA1.
RECORD NAME IS Rl WITHIN AREA1.

RECORD IS PARTS-LIST WITHIN INVENTORY.
0 1 PA R T- N A M E P I C " X < 2 0 > " .

02 6 OCCURS 2 TIMES.
43 ITEM A PIC "X(5>«.
03 ITEM B PIC "9(10)".

03 ITEM C PIC «9<3)V9<2>".

0 1 PA R T - N B R P I C « X ( 2 5 ) « .
01 PSOURCE OCCURS 10 TIMES.
03 SOURCE-NAME PIC **XU0)H.

AREA NAME IS AREA2.
RECORD NAME IS R2 WITHIN AREA2.

03 SOURCE-ADDR OCCURS 1 TIMES.
0 5 S T R E E T- A D D R P I C « X ( 2 0 ) » .

02 H OCCURS 1 TIMES.
03 ITEM J PIC "X(2>«.
03 ITEM K TYPE FIXED 9t2.
RELATION NAME IS REL-1.
JOIN WHERE 6 (1) EO H <1>.

Figure 2-42. Alignment Example
0SM\
If a repeating elementary item or group item is
s p e c i fi e d w i t h o u t a s u b s c r i p t , t h e fi r s t o c c u r r e n c e
is used to join the relationship.
F o r e f fi c i e n t p r o c e s s i n g , t h e t a r g e t i d e n t i fi e r
should be an item defined as a key field; retrieval
o f r e c o r d o c c u r r e n c e s f r o m t h e fi l e c o n t a i n i n g t h e
t a r g e t i d e n t i fi e r i s b y t h a t k e y. T h i s r u l e h o l d s
for repeating or nonrepeating elementary items.
Target identifiers defined as primary keys are most
e f fi c i e n t ; a l t e r n a t e k e y s a r e n e x t m o s t e f fi c i e n t .
O n l y t h e fi r s t o c c u r r e n c e o f a r e p e a t i n g i t e m c a n
be defined as a primary key. If a repeating group
item or a repeating elementary item is defined as
a n a l t e r n a t e k e y, a l l o c c u r r e n c e s o f t h e i t e m o r
g r o u p i t e m a r e u s e d a s t h e k e y, r a t h e r t h a n j u s t
t h e fi r s t o c c u r r e n c e . T h e A N Y o p t i o n u s e d a s a
s u b s c r i p t i d e n t i fi e s t h i s t y p e o f a l t e r n a t e k e y
fi e l d a s a j o i n t e r m . I f a n y o n e o f t h e i t e m
o c c u r r e n c e s s a t i s fi e s t h e e q u a l i t y , t h e r e c o r d
occurrence is included in the relation occurrence.
If an integer subscript is used instead of ANY on
a n a l t e r n a t e k e y, r e t r i e v a l o f r e c o r d o c c u r r e n c e s
i s b y s e q u e n t i a l a c c e s s . I f t h e t a r g e t i d e n t i fi e r
is not a key, retrieval of record occurrences is by
sequential access.
Figure
Based
lowing
used in

2-43 illustrates a record type in a schema.
o n t h e r u l e s s p e c i fi e d p r e v i o u s l y, t h e f o l
data names from this record type could be
a JOIN clause:

PART-NBR
STATE-ADDR (1,1) or PSOURCE (2)
SOURCE-NAME (ANY)

0 5 C I T Y- A D D R P I C » X U 5 > « .
0 5 S TAT E - A D D R P I C * X ( 5 ) « .

Figure 2-43. Data Name Example
The identifier SOURCE-NAME must be to the right of
the EQ operator in the JOIN clause and must be
defined as an alternate key.

SCHEMA COMPILATION AND
MAINTENANCE FACILITIES
The DDL compiler is a multifunctional compiler that
generates the schema directory and uses that direc
tory to verify compatibility of a recompiled schema
with existing subschemas and to decode portions of
t h e d i r e c t o r y t h r o u g h t h e E x h i b i t f a c i l i t y. T h e
particular operation performed by the compiler is
selected by a parameter in the DDL3 control state
ment. Only one schema directory is allowed to
r e s i d e o n a fi l e .
F o r fi e l d l e n g t h r e q u i r e m e n t s f o r s c h e m a c o m p i l a
tion, refer to appendix G.

DDL3 CONTROL STATEMENT
The DDL3 control statement calls the DDL compiler.
I t s p e c i fi e s t h e f u n c t i o n t o b e p e r f o r m e d , t h e fi l e
t h a t i d e n t i fi e s t h e s c h e m a d i r e c t o r y, t h e fi l e t h a t
i d e n t i fi e s t h e s u b s c h e m a l i b r a r y , t h e fi l e t h a t
contains the source input for the DDL compiler, the
fi l e t h a t i s t o r e c e i v e o u t p u t l i s t i n g s a n d d i a g
nostics, and the memory allocation for the schema
r e c o r d b u f f e r.
The format of the DDL3 control statement for schema
compilation and maintenance facilities is shown in
figure 2-44. The comma immediately following DDL3
can be replaced by a left parenthesis; the termina
ting period can be replaced by a right parenthesis.
All parameters of the DDL3 control statement are
optional.

DDL3 PCEXS=1 I ^sc=LfnJ^SB=Lfn:,^I=lfn:":/'L=l.fn:i:,NI=nbr].
Figure 2-44. DDL Control Statement Format for Schema Compilation and Maintenance

60485200 A

2-29

The EX and DS parameters select the function that
is to be performed: The DS parameter selects
schema compilation; the EX parameter selects exe
c u t i o n o f t h e E x h i b i t f a c i l i t y. T h e s e p a r a m e t e r s
are interpreted as follows:
omitted
The DS parameter is assumed; a DDL schema
is compiled.

DS
A DDL schema is compiled.

EX
The Exhibit facility is executed. This
parameter must be specified to execute the
E x h i b i t f a c i l i t y.
T h e S C p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s t h e s c h e m a d i r e c t o r y. T h e p a r a m e t e r i s
inte rpreted as foll o w s :
omitted
T h e fi r s t s e v e n c h a r a c t e r s o f t h e s c h e m a name in the schema description entry of the
s o u r c e p r o g r a m i d e n t i f y t h e l o c a l fi l e t h a t
contains the schema directory (the object
schema).
SC=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
the file that contains the schema directory
(the object schema).
The SB parameter identifies the local file name of
t h e s u b s c h e m a l i b r a r y fi l e t o b e s e a r c h e d f o r
checksum mismatches when a schema is recompiled.
This parameter is interpreted as follows:
omitted
No subschema library search is performed.
SB=lfn
T h e l o c a l fi l e n a m e s p e c i fi e d i d e n t i fi e s
the subschema library file to be searched.
T h e I p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s s o u r c e i n p u t f o r t h e D D L c o m p i l e r. T h i s
parameter is interpreted as follows:
omitted
The local file INPUT is assumed to contain
the source input for the DDL compiler.
1=1 fn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t c o n t a i n s s o u r c e i n p u t f o r t h e
DDL compiler.
T h e L p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
receives listings and diagnostics generated by the
D D L c o m p i l e r. T h i s p a r a m e t e r i s i n t e r p r e t e d a s
follows:

2-30

omitted
The local file OUTPUT receives the listings
and diagnostics generated by the DDL
c o m p i l e r.

L=0
T h e l o c a l fi l e O U T P U T r e c e i v e s o n l y t h e
diagnostics generated by the DDL compiler.
This designation is not valid for execution
o f t h e E x h i b i t u t i l i t y.
L=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t r e c e i v e s t h e l i s t i n g s a n d
diagnostics generated by the DDL compiler.
The NI parameter specifies the number of 10-word
b l o c k s a l l o c a t e d f o r t h e s c h e m a r e c o r d b u f f e r.
This parameter is interpreted as follows:
omitted
One-fourth of available memory is allocated
for the schema record buffer.
NI=nbr
T h e n u m b e r n b r s p e c i fi e s t h e n u m b e r o f
10-word blocks of memory that are allocated
for the schema record buffer.
The default value for the NI parameter is one-fourth
o f t h e a v a i l a b l e m e m o r y. A v a i l a b l e m e m o r y i s
d e fi n e d a s t h e m e m o r y a v a i l a b l e f r o m t h e h i g h e s t
address for the DDL compiler (approximately 44000
o c t a l ) t o t h e m e m o r y l i m i t s p e c i fi e d b y a n R F L
control statement (NOS or NOS/BE operating system)
or an EFL command (INTERCOM). For example, if the
memory limit is specified as 54000 octal and avail
able memory is 10000 octal words; the schema record
buffer is 2000 octal words.
The schema record buffer must be large enough to
contain all data description entries for the
largest record type in the schema. One 10-word
block can store a data description entry with a
10-character data name, a PICTURE clause, and a
clause specifying a data base procedure. If an
entry contains other clauses or a longer data name,
it requires more than 10 words to store the entry.

SCHEMA COMPILATION
The schema must be coded according to the specifi
cations in this manual. Schema source code can be
entered through a terminal, processed by a text
e d i t o r, a n d s t o r e d i n a fi l e .
The DDL compiler can be executed from a terminal
and through a batch job in the following ways.
When executed from a terminal, the schema program
m u s t r e s i d e o n a fi l e w h o s e n a m e i s i n d i c a t e d b y
the I parameter of the DDL3 control statement. In
a b a t c h j o b i n w h i c h t h e i n p u t fi l e f o r t h e D D L
compiler is assumed to be local file INPUT, the job
stream must be structured so that the control
statements precede the subschema source program.
An end-of-record indicator must immediately precede
t h e fi r s t l i n e o f s c h e m a s o u r c e c o d e t o s e p a r a t e
the schema program from the control statements.

60485200 A

Control statements in the job stream and the
resulting source program are used by the DDL
compiler to compile the schema directory and to
s t o r e i t a s a p e r m a n e n t fi l e . O n l y o n e s c h e m a
d i r e c t o r y s h o u l d b e s t o r e d o n a fi l e . T h e c o n t r o l
statements provide information for the operating
system and for the DDL compiler.

DDL3 Control Statement for Compilation
The DDL3 control statement must be included in the
set of control statements preceding the DDL source
program. It provides the DDL compiler with
information related to the schema. The DDL3
control statement is used to request compilation
a n d t o p r o v i d e t h e l o c a l fi l e n a m e o f t h e s c h e m a
d i r e c t o r y. T h e D D L 3 c o n t r o l s t a t e m e n t f o r s c h e m a
compilation is as follows:
DDL3,DS,SC=lfn.
The DS parameter and SC parameter are optional and
have default values. The I, L, and NI parameters
m u s t b e s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t
a p p l i c a b l e f o r i n p u t a n d o u t p u t fi l e s a n d f o r
memory allocation for the schema record buffer
(refer to the DDL3 Control Statement subsection).

FILE Control Statement
The FILE control statement provides CYBER Record
M a n a g e r w i t h i n f o r m a t i o n t h a t i s r e q u i r e d f o r fi l e
processing. A FILE control statement for each area
in the schema must precede the DDL3 control
statement. The information in the FILE control
s t a t e m e n t s a l o n g w i t h fi l e i n f o r m a t i o n f r o m t h e
data control entry is placed In the schema
d i r e c t o r y.
The FILE control statement equates the area name
with an operating system file name and associates
t h e a r e a w i t h a p a r t i c u l a r fi l e o r g a n i z a t i o n .
Figure 2-45 illustrates the FILE control statement
and indicates parameters required for schema
c o m p i l a t i o n . O p t i o n a l l y, t h e c o m m a i m m e d i a t e l y
following FILE can be replaced by a left
parenthesis; the terminating period can be replaced
by a right parenthesis.

(F0=AK )
FILE,lfn,< FO=DA >Crp] ... .
(F0=IS )
Figure 2-45. FILE Control Statement Format
T h e l o c a l fi l e n a m e s p e c i fi e d i n t h e F I L E c o n t r o l
statement must be the name of an area defined in
t h e s c h e m a o r, i f t h e a r e a n a m e e x c e e d s s e v e n
c h a r a c t e r s , t h e fi r s t s e v e n c h a r a c t e r s o f t h e a r e a
name.
The FO parameter associates the area with the
s p e c i fi e d fi l e o r g a n i z a t i o n . T h i s p a r a m e t e r m u s t
be specified in one of the following forms:
F0=AK
T h e e x t e n d e d a c t u a l k e y fi l e o r g a n i z a t i o n
is associated with the area.
60485200 B

F0=DA
The
extended
direct
access
fi l e
organization is associated with the area.
F0=IS
T h e e x t e n d e d i n d e x e d s e q u e n t i a l fi l e
organization is associated with the area.
The p indicates additional parameters. Depending
on particular conditions, three additional
parameters are required.
The XN parameter can be specified if alternate keys
a r e s p e c i fi e d f o r a n a r e a . T h e X N p a r a m e t e r
a s s o c i a t e s t h e a r e a w i t h t h e fi l e t h a t c o n t a i n s t h e
a l t e r n a t e k e y i n d e x . I f n o t s p e c i fi e d a n d
a l t e r n a t e k e y s h a v e b e e n s p e c i fi e d f o r t h e a r e a ,
the DDL compiler automatically assigns a file name
to reference an index file for the area and issues
a t r i v i a l d i a g n o s t i c . I f s p e c i fi e d , t h e X N
parameter must be specified in the following form:
XN=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e I d e n t i fi e s
the alternate key Index. The lfn must be
one to seven characters in length, must
contain only characters or digits, must
begin with a letter, and must not duplicate
another lfn indicated in the job stream.
T h e H M B p a r a m e t e r m u s t b e s p e c i fi e d i f t h e fi l e
organization associated with an area is extended
direct access. The HMB parameter indicates the
number of home blocks associated with the area.
T h e H M B p a r a m e t e r m u s t b e s p e c i fi e d i n t h e
following form:
HMB=nn
The number nn home blocks are associated
with the area. The number nn must be an
integer 1 through 22*-l. See the CYBER
Record Manager Advanced Access Methods
reference manual more information about
home blocks.
The key length (KL) parameter must be specified if
t h e fi l e o r g a n i z a t i o n a s s o c i a t e d w i t h a n a r e a i s
e x t e n d e d a c t u a l k e y . F o r t h e o t h e r fi l e
o r g a n i z a t i o n s , i f K L i s n o t s p e c i fi e d t h e n D D L
determines the value of the KL parameter from the
d a t a d e s c r i p t i o n s . I f a K L p a r a m e t e r s p e c i fi c a t i o n
does not agree with the data descriptions, DDL uses
the value from the data descriptions and issues a
trivial diagnostic. The KL parameter must be
s p e c i fi e d i n t h e f o l l o w i n g f o r m :
KL=nnn
For an extended actual key file, the number
nnn must be an integer within the range of
1
through
8.
For
all
other
fi l e
organizations, the number cannot exceed 240
characters.
Additional parameters can provide other information
(such as CYBER Record Manager record type and block
t y p e ) . Ta b l e 2 - 3 l i s t s t h e F I L E c o n t r o l s t a t e m e n t
p a r a m e t e r s t h a t c a n b e s p e c i fi e d . R e f e r t o t h e
CYBER Record Manager Advanced Access Methods
reference manual for detailed descriptions of the
parameters.
2-31

If a FILE control statement is not included for an
area, a diagnostic message is issued. The
following defaults apply to FILE control statements
that do not specify the applicable parameter.

TABLE 2-3. FILE CONTROL STATEMENT
PARAMETERS
F i l e Organization
Parameter

Extended
Indexed
Seq uent ial

Extended
Direct
Access

IP no index padding
Extended
Actual

Key

BFS

DP no data block padding (release default)
NL one level of index blocks (release
default)

CL

RT=U CYBER Record Manager undefined record
type

CP

MRL=size of maximum record length in the area

DP

MNR=size of minimum record length in the area
If the MRL parameter (maximum record length) is
s p e c i fi e d i n t h e F I L E c o n t r o l s t a t e m e n t a n d t h e
value is less than the length of the longest record
in the area, the DDL compiler overrides the FILE
c o n t r o l s t a t e m e n t M R L p a r a m e t e r, s u b s t i t u t i n g a
value equal to the size of the longest record. The
DDL compiler then issues a diagnostic. If the
s p e c i fi e d v a l u e f o r t h e M N R p a r a m e t e r ( m i n i m u m
record length) is inadequate, the DDL compiler
overrides the FILE control statement MNR parameter,
substituting a value large enough to contain all
keys defined for the area.

EFC
FL
FLM
FO
HL
HMB
IP

If the FILE control statement specifies RT=T (CYBER
Record Manager trailer count record type), and the
area contains a record with a variable length
repeating data Item, the DDL compiler computes the
v a l u e s f o r t h e H L , T L , C P, a n d C L p a r a m e t e r s . A
warning diagnostic message is issued If the FILE
control statement contains these parameters with
v a l u e s d i ff e r e n t f r o m t h e v a l u e s c o m p u t e d b y t h e
DDL compiler.

KL
LL
LP
MBL
MNR
MRL

Schema Compilation Example

NL

The source program for a schema must be preceded by
a set of control statements and followed by an
end-of-information indicator. Figure 2-46
illustrates a job that compiles a schema and stores
I t a s a p e r m a n e n t fi l e . T h e F I L E c o n t r o l
statements must specify one of the allowed
organizations: extended indexed sequential,
e x t e n d e d d i r e c t a c c e s s , o r e x t e n d e d a c t u a l k e y.
The DEFINE and REQUEST/CATALOG control statements
s p e c i f y t h e l o c a l fi l e n a m e o f t h e fi l e t h a t
contains the schema directory and assign it to a
permanent file device. The DDL3 control statement
s p e c i fi e s s c h e m a c o m p i l a t i o n a n d t h e l o c a l fi l e
name MANUFAC to identify the schema directory.

ORG
RB
RMK
RT
TL
XN

NOTE
Refer to appendix F for recommendations on
access methods.
The FILE control statement for an area that has
r e c o r d k e y s s p e c i fi e d c a n I n c l u d e a d d i t i o n a l
p a r a m e t e r s r e l a t e d t o t h e k e y. P a r a m e t e r s r e l a t e d
to the data item that is the record key should
agree with the data item description. If the
record key and data item descriptions do not agree,
the DDL compiler uses the record key description
and issues a trivial diagnostic.

Schema Compilation Output
A listing of the DDL source program Is provided
whenever a schema is compiled and L=0 is not
specified in the DDL3 control statement. Each line
of the listing corresponds to one statement in the
source program. The format and order of each line
on the listing are identical to the format and
order of the statements In the source program.
Figure 2-47 is a sample source listing for a schema
compilation.
/^SsV

2-32

60485200 B

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
DEFINE,MANUFAC=MANUFAC/CT=PU,M=R.
FILE(EMPLOYE,FO=IS,XN=IXEMP)
FILE(JOBDETA,FO=IS)
FILE(DEPARTM,FO=IS,XN=IXDEPT,RT=T)
FILE(PR0JECT,F0=DA,XN=IXPR0J,HMB=7)
FILE(DEVELOP,FO=DA,XN=IXDEV,HMB=11)
FILE(TESTS,FO=IS,XN=IXTEST)
FILE(CDCSCAT/FO=IS>
DDL3,DS,SC=MANUFAC.
End-of-record
Schema source input
End-of-information

Job statement
ACCOUNT control statement
REQUEST,MANUFAC,PF.
FILE(EMPLOYE,FO=IS,XN=IXEMP>
FILE(JOBDETA,FO=IS)
FILE(DEPARTM,FO=IS,XN=IXDEPT,RT=T>
FILE(PR0JECT,F0=DA,XN=IXPR0J,HMB=7)
FILE(DEVELOP,F0=DA,XN=IXDEV,HMB=11)
FILE(TESTS,FO=IS,XN=IXTEST)
FILE(CDCSCAT,FO=IS)
DDL3,DS,SC=MANUFAC.
CATALOG,MANUFAC,MANUFACTURINGDB,ID=owner.
End-of-record
Schema source input
End-of-information

Figure 2-46. Schema Compilation Example
MANUFACTUR
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043

* SOURCE LISTING * (82061) DDL 3.2+564.
SCHEMA NAME IS MANUFACTURING-DB.
AREA IS EMPLOYEE
ACCESS-CONTROL LOCK FOR RETRIEVAL IS "EMP-READ"
ACCESS-CONTROL LOCK FOR UPDATE IS "EMP-WRITE"
CALL OPENEMP BEFORE OPEN.
RECORD IS EMPREC WITHIN EMPLOYEE.
01 EMP-ID
PICTURE MX(8)".
01 SALARY
TYPE FIXED DECIMAL 8,2
CALL EMPCHK BEFORE.
01 EMP-LAST-NAME
PICTURE "A(20)".
01 EMP-INITIALS
PICTURE "A(4)M.
01 DEPT
PICTURE "X(4)".
01 ADDRESS-NUMBERS
PICTURE **X(6)".
01 ADDRESS-STREET
PICTURE *'X(20)".
01 ADDRESS-CITY
PICTURE *'A(15)".
01 ADDRESS-STATE-PROV
PICTURE "A(15)".
01 POSTAL-CODE
PICTURE "X(10)".
01 ADDRESS-COUNTRY
PICTURE "A(15)".
01 PHONE-NO
PICTURE "9(10)".
01 HIRE-DATE
PICTURE "9(6)".
01 INSURANCE-NO
PICTURE "9(10)".
01 NUM-DEPENDENTS
TYPE DECIMAL FIXED 2.
01 JOB-CLASS
PICTURE "A"
FOR ENCODING CALL DBPJC1
FOR DECODING CALL DBPJC2
01 GRADE-LEVEL
PICTURE "9"
CHECK VALUE 0 THRU 8.

/*
*/

THE FOLLOWING ARE YEAR-TO-DATE TOTALS

01
01
01
01
01

GROSS
FED-TAX
STATE-TAX
DISABILITY
SS-INSURANCE

TYPE
TYPE
TYPE
TYPE
TYPE

DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL

FIXED
FIXED
FIXED
FIXED
FIXED

7,2.
7,2.
6,2.
5,2.
4,4.

AREA IS JOBDETAIL
ACCESS-CONTROL LOCK IS ' ABCDEFZ".
RECORD IS JOBREC WITHIN JOBDETAIL
CALL DELCHK E3EFCIRE DELETE.

Figure 2-47. Sample Schema Compilation Output Listing (Sheet 1 of 3)
60485200 A

2-33

00125
00126

00127
00128
00129

00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145

00146
00147
00148
00149
00150

00151
00152
00153

00154
00155
00156

00157
00158
00159
00160
00161

00162
00163
00164
00165
00166
00167
00168
00169
00170

00171

AREA NAME IS CDCSCAT
ACCESS-CONTROL LOCK IS "PERMISSION*GRANTED".
RECORD IS QUCATREC WITHIN CDCSCAT.
Q U C AT- K E Y
PICTURE
*'X(10)".
Q U C AT- I T E M
PICTURE
"X(1030)".
DATA CONTROL.
AREA NAME IS EMPLOYEE
KEY IS EMP-ID OF EMPREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE DEPT
DUPLICATES ARE INDEXED.
AREA NAME IS JOBDETAIL
KEY ID IS CONCATKEY < EMP-ID OF JOBREC
SEQ-NO >
DUPLICATES ARE NOT ALLOWED.
AREA NAME IS DEPARTMENTS
KEY IS DEPT-NO
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE MGR-ID
DUPLICATES ARE FIRST.
AREA NAME IS PROJECT
KEY IS PROJECT-ID OF PROJREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE RESPONSIBILITY
DUPLICATES ARE ALLOWED.
AREA NAME IS DEVELOPMENT-PRODUCTS
KEY IS PRODUCT-ID OF DEVREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE PROJECT-ID OF DEVREC
DUPLICATES ARE ALLOWED
KEY IS ALTERNATE EVAL-ID
DUPLICATES ARE INDEXED.
AREA NAME IS TESTS
KEY IS TESTNO

DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE TNAME
DUPLICATES ARE INDEXED
KEY IS ALTERNATE TESTER
DUPLICATES ARE FIRST
SEQUENCE IS ASCII.

00172

00173
00174
00175
00176
00177
00178
00179
00180

00181
00182
00183
00184
00185
00186

00187
00188
00189
00190
00191
00192
00193
00194

AREA NAME IS CDCSCAT
KEY IS QUCAT-KEY OF QUCATREC
DUPLICATES ARE NOT ALLOWED
SEQUENCE IS DISPLAY.
CONSTRAINT NAME IS MGR-CONST
MGR-ID OF DEPTREC DEPENDS ON EMP-ID OF EMPREC.
CONSTRAINT NAME IS PROJ-CONST
PROJECT-ID OF DEVREC DEPENDS ON PROJECT-ID OF PROJREC.
RELATION NAME IS EMP-REL
JOIN WHERE EMP-ID OF JOBREC EQ EMP-ID OF EMPREC.
RELATION NAME IS TEST-REL
JOIN WHERE PRDCTNO OF TESTREC EQ PRODUCT-ID OF DEVREC.
RELATION NAME IS DPD-REL
JOIN WHERE MGR-ID OF DEPTREC EQ RESPONSIBILITY OF PROJREC
PROJECT-ID OF PROJREC EQ PROJECT-ID OF DEVREC.

Figure 2-47. Sample Schema Compilation Output Listing (Sheet 2 of 3)
-'-S^N.

2-34

60485200 A

*** AREA CHECKSUMS ***
AREA NAME
EMPLOYEE
JOBDETAIL
DEPARTMENTS
PROJECT
DEVELOPMENT-PRODUCTS
TESTS
CDCSCAT
*** RELATION CHECKSUMS ***
RELATION NAME
EMP-REL
TEST-REL
DPD-REL
*** DATA-BASE PROCEDURE LIST FOR SCHEMA
CALCCP
CALCHR
DATESP
DBPJC1
DBPJC2
DELCHK
EMPCHK
OPENEMP
DDL COMPLETE. 0 DIAGNOSTICS.
47300B CM USED. 0.419 CP SECS.

CHECKSUM
56430552040035230620
13626262424331006604
16574462455232633415
35175246562100113225
61470111011661762112
40015236474170366115
57033604647410770643
CHECKSUM
33541156402300070013
10246503456523070027
16223300077042601641
MANUFACTURING-DB

Figure 2-47. Sample Schema Compilation Output Listing (Sheet 3 of 3)
The DDL compiler assigns a line number to each
input statement, beginning with 00001. The line
numbers are printed on the source listing, starting
in column 16. Diagnostic messages begin in column
3 of the listing. After the last Input statement
Is listed, a checksum for each area and relation,
together with the area or relation name, is
printed. Following the checksums, an alphabetic
l i s t o f a l l d a t a b a s e p r o c e d u r e s s p e c i fi e d i n t h e
s c h e m a i s w r i t t e n t o t h e o u t p u t fi l e . L a s t l y , a
compilation summary is printed.
The source listing can be suppressed by specifying
L=0 in the DDL3 control statement. In this
situation, diagnostic messages and the compilation
summary are the only listing that is produced.

RECOMPILATION GUIDELINES
The checksums generated by the DDL compiler for
each area and relation In the schema determine when
a subschema must be recompiled. If a checksum in a
recompiled schema is different from the correspond
ing checksum in the previous schema, any subschema
referencing that changed area or relation must be

recompiled; a list of these subschemas is printed
at the end of a schema compilation when the DDL3
c o n t r o l s t a t e m e n t i n c l u d e s t h e S B p a r a m e t e r. T h e
DDL3 control statement for compiling a schema and
generating a list of subschemas that require
recompilation is as follows:
DDL3,DS,SC=lfn,SB=lfn.
The DS parameter and SC parameters are optional and
have default values. The SB parameter is required;
i t s p e c i fi e s t h e l o c a l f L l e n a m e o f t h e fi l e t h a t
c o n t a i n s t h e s u b s c h e m a l i b r a r y t o b e searched for
checksum mismatches. The I, L, and NI parameters
m u s t b e s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t a p p l i
cable for the input and output files and for memory
allocation for the schema record buffer (refer to
the DDL3 Control Statement subsection).
In a job that recompiles a schema and checks for
subschema checksum mismatches, the subschema library
must be attached. The DDL compiler searches all
t h e s u b s c h e m a s i n t h e s p e c i fi e d l i b r a r y a n d c o m
pares checksums. If checksum mismatches are found,
the names of any subschemas that must be recompiled
are printed. An example of this facility is shown
i n fi g u r e 2 - 4 8 .

REPORT ON SUB-SCHEMA REC0MPILATI0NS FOR SCHEMA MANUFACTURING-DB
FOLLOWING SUB-SCHEMAS REQUIRE RECOMPILATION
MARKETING
INVOICING
PAYROLL
END REPORT
Figure 2-48. Recompilation List Example

60485200 B

2-35

EXHIBIT FACILITY
The Exhibit facility of DDL provides the capability
o f d e c o d i n g a s p e c i fi c e n t r y o r g r o u p o f e n t r i e s
c o n t a i n e d i n t h e s c h e m a d i r e c t o r y. T h e o u t p u t i s
similar in appearance to the initial DDL input.
Certain output entries generated by the Exhibit
f a c i l i t y a r e n o t a s s o c i a t e d w i t h a n y s p e c i fi c
source statement. They appear at the beginning of
the output as comments and are enclosed by a pre
ceding delimiter (/*) and a following delimiter
(/*). Output is in the format of 50 characters per
line.

AREA

\

.

RECORD [ONLY]/ I... JNAMES
ITEM \ I— [CLAUSES]

EXHIBIT SCHEMA< ALL-ENTRIES
CONSTRAINT
RELATION

entry-name

Figure 2-49. EXHIBIT Directive Format
entries and specifies that only the record name or
clauses associated with the record entry are to be
exhibited.

Control Statement Format
T h e D D L 3 c o n t r o l s t a t e m e n t m u s t b e s p e c i fi e d t o
e x e c u t e t h e E x h i b i t f a c i l i t y. A f t e r t h e s c h e m a
d i r e c t o r y fi l e i s a t t a c h e d , E x h i b i t c a n b e c a l l e d .
The control statement for executing the Exhibit
facility is as follows:
DDL3,EX,SC=lfn.
T h e E X p a r a m e t e r I s r e q u i r e d ; i t s p e c i fi e s e x e c u
t i o n o f t h e E x h i b i t f a c i l i t y. T h e S C p a r a m e t e r i s
r e q u i r e d ; i t i d e n t i fi e s t h e l o c a l fi l e n a m e o f t h e
schema directory. The I and L parameters must be
s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t a p p l i c a b l e f o r
i n p u t a n d o u t p u t fi l e s ( r e f e r t o t h e D D L 3 C o n t r o l
Statement subsection).

EXHIBIT Directive Format
I n p u t s p e c i fi c a t i o n d i r e c t i v e s f o r E X H I B I T m u s t
f o l l o w a s p e c i fi c d i r e c t i v e f o r m a t a s s h o w n i n
fi g u r e 2 - 4 9 . I n p u t f o r e a c h d i r e c t i v e i s f r e e format and characters can appear In any columns
from column 1 through column 72. Each directive
must be contained within the 72 columns.
One of the keywords AREA, RECORD, ITEM, ALL-ENTRIES,
CONSTRAINT, or RELATION must be specified to indi
cate the type of entry to be decoded and written to
t h e o u t p u t fi l e . A L L - E N T R I E S s p e c i fi e s t h a t t h e
names or clauses for all entries in the schema are
to be exhibited. The option ONLY applies to record

I f O N LY i s n o t s p e c i fi e d , a l l d a t a s u b e n t r y n a m e s
or clauses associated with the record entry are
also decoded and written to the output file.
When ALL or ALL NAMES is specified, all entry names
f o r t h e s p e c i fi e d e n t r y t y p e a r e e x h i b i t e d .
Specification of ALL CLAUSES causes all entry names
a n d c l a u s e s f o r t h e s p e c i fi e d e n t r y t y p e t o b e
displayed.
If an entry name is designated in the directive, it
indicates the name of the area, record, item,
constraint, or relation for which all the associ
ated clauses are to be decoded and written to the
o u t p u t fi l e . I f e n t r y n a m e s p e c i fi e s t h e d a t a n a m e
o f a n i t e m , i t c a n b e q u a l i fi e d a s s p e c i fi e d i n
paragraphs describing Data Reference and Qualifica
tion in this section. If the data name of an item
i s n o t q u a l i fi e d i n t h e s p e c i fi c a t i o n a n d m u l t i p l e
e n t r i e s f o r t h a t d a t a n a m e e x i s t , t h e fi r s t e n t r y
having the designated data name is exhibited.

^S^Sv

To exhibit all schema clauses, the ALL-ENTRIES ALL
CLAUSES specification is used. Control information
maintained by the DDL compiler is also Included in
the output when this option is selected. Refer to
fi g u r e 2 - 5 0 f o r s e v e r a l e x a m p l e s o f t h e E X H I B I T
directive.
Sample control statements and directive formats for
the exhibit facility are shown with their respec
t i v e g e n e r a t e d o u t p u t s a m p l e s i n fi g u r e s 2 - 5 1
through 2-54.

Example 3

Example 1
EXHIBIT SCHEMA RECORD ONLY ALL NAMES

EXHIBIT SCHEMA RECORD EMPREC

This directive exhibits all record names in the
schema.

This directive exhibits a record called
EMPREC with all its data items and asso
ciated clauses.
Example 4

Example 2
EXHIBIT SCHEMA AREA ALL CLAUSES

EXHIBIT SCHEMA ALL-ENTRIES ALL CLAUSES

This directive exhibits all areas and their
respective clauses.

This directive exhibits the whole schema.

Figure 2-50. EXHIBIT Examples

/-^\

2-36

60485200 B

NOS Operating System
Job statement
USER control statement
CHARGE control statement
ATTACH,MANUFAC/UN=usernumber.
DDL3,EX,SC=MANUFAC.
End-of-record

EXHIBIT SCHEMA RECORD ONLY ALL NAMES
End-of-information

NOS/BE Operating System
Job statement
ACCOUNT control statement
ATTACH,MANUFAC,MANUFACTURINGDB,ID=owner.
DDL3,EX,SC=MANUFAC.
End-of-record
EXHIBIT SCHEMA RECORD ONLY ALL NAMES
End-of-information

Figure 2-51. Executing the EXHIBIT Utility, Example 1

/*
EXHIBIT SCHEMA MANUFACTURING-DB
TIME,DATE OF CREATION 14.14 82087
***********************************
*/
00001
EXHIBIT SCHEMA RECORD ONLY ALL NAMES
RECORD EMPREC
RECORD JOBREC
RECORD DEPTREC
RECORD PROJREC
RECORD DEVREC
RECORD TESTREC
RECORD QUCATREC
Figure 2-52. Sample EXHIBIT Utility Output, Example 1

NOS Operating System
Job statement
USER control statement
CHARGE control statement
ATTACH,MANUFAC/UN=usernumber.
DDL3,EX,SC=MANUFAC.
End-of-record
EXHIBIT SCHEMA AREA ALL CLAUSES
End-of-information

NOS/BE Operating System
Job statement
ACCOUNT control statement
ATTACH,MANUFAC,MANUFACTURINGDB,ID=owner.
DDL3,EX,SC=MANUFAC.
End-of-record
EXHIBIT SCHEMA AREA ALL CLAUSES
End-of-information

Figure 2-53. Executing the EXHIBIT Utility, Example 2

/*
EXHIBIT SCHEMA MANUFACTURING-DB
TIME,DATE OF CREATION 14.14 82087
***********************************
*/
00001
EXHIBIT SCHEMA AREA ALL CLAUSES
AREA EMPLOYEE
CALL OPENEMP BEFORE OPEN RETRIEVAL UPDATE
ACCESS-CONTROL FOR RETRIEVAL IS "EMP-READ
ACCESS-CONTROL FOR UPDATE IS "EMP-WRITE".

AREA CDCSCAT
ACCESS-CONTROL FOR RETRIEVAL UPDATE IS
"PERMISSION*GRANTED".
Figure 2-54. Sample EXHIBIT Utility Output, Example 2

60485200 A

2-37

0*%

COBOL AND QUERY UPDATE SUBSCHEMA DEFINITION

A COBOL subschema describes the portion of the data
base that is needed by one or more COBOL applica
tion programs written in the COBOL 5 language.
Similarly, a Query Update subschema in CYBER Data
base Control System (CDCS) data base access mode
(hereafter referred to simply as a Query Update
subschema) describes the portion of the data base
that is needed by one or more Query Update applica
tions. In the subschema, record structures and
i n d i v i d u a l d a t a i t e m s a r e d e fi n e d m a m a n n e r
acceptable to the COBOL compiler or to Query
Update. The subschema data descriptions replace
the COBOL or Query Update data descriptions that
the COBOL application programmer or Query Update
user would otherwise supply.
A subschema is written based on the schema descrip
t i o n . G e n e r a l l y, t h e s c h e m a d e s c r i p t i o n o f d a t a
can be changed in the subschema to meet the needs
of the COBOL program or Query Update application;
however, some limitations have been imposed on the
variations between the schema and the subschema.

SUBSCHEMA STRUCTURING
CONVENTIONS
COBOL and Query Update subschemas consist of three
required divisions and two optional divisions:
Ti t l e D i v i s i o n
N a m e s t h e s u b s c h e m a a n d i d e n t i fi e s t h e
schema.
Alias Division (optional)
Assigns alternate names to be used in place
of names assigned in the schema.
Realm Division
I d e n t i fi e s t h e s c h e m a a r e a s t o b e m a d e
available through the subschema.
Record Division
Describes the structure and content of each
record type in the subschema.
Relation Division (optional)
I d e n t i fi e s t h e s p e c i fi c r e a l m r e l a t i o n s h i p s
that are to be used in the subschema and in
the COBOL programs or Query Update applica
tions referencing the subschema; also,
s p e c i fi e s t h e q u a l i fi c a t i o n c r i t e r i a t h a t
must be satisfied by records that are to be
returned to the application programs from
the data base.
All data from the data base that is to be access
ible through COBOL or Query Update is described and
organized in the Record Division. The structure of
this division is similar to that of a record
description entry in the Data Division of a COBOL
program.
/SSS^N
60485200 A

DATA DESCRIPTION
The basic unit of data description is the data
d e s c r i p t i o n e n t r y. T h e r e c o r d d e s c r i p t i o n e n t r y i s
the entire description of a data base record type.
The record description entry consists of a record
name entry followed by a series of data description
e n t r i e s t h a t d e s c r i b e t h e s p e c i fi c d a t a i t e m s
w i t h i n t h e r e c o r d . E a c h d a t a d e s c r i p t i on entry has
a l e v e l n u m b e r, a d a t a n a m e , a n d a t e r m i n a t i n g
period. In addition, the entry can have one or
more clauses describing the data item. Data items
are described in terms of size, class, and usage.
The level number designates the level of the entry
relative to other entries in the record descrip
t i o n . T h e h i g h e s t l e v e l e n t r y, t h e r e c o r d n a m e
e n t r y, i s a l w a y s l e v e l n u m b e r 0 1 . O t h e r e n t r i e s ,
which can be either group or elementary data items,
are assigned level numbers 02 through 49 based on
t h e p o s i t i o n o f t h e s p e c i fi c d a t a i t e m w i t h i n t h e
hierarchical structure of the record. Level
numbers need not be consecutive but must be ordered
so that the higher the number, the lower the entry
i n t h e h i e r a r c h y. L e v e l n u m b e r s 6 6 a n d 8 8 a r e
special level numbers that are used to specify two
particular types of data description entries; they
d o n o t d e fi n e t h e h i e r a r c h y o f t h e i t e m . A l e v e l
66 entry renames a group or elementary item. A
level 88 entry provides a value or range of values
to be associated with a condition name; level 88
entries cannot be used in a Query Update subschema.
With the exception of a data name being redefined
or renamed, the data name in the entry must be one
of the following:
A data name from the schema description
An alias assigned in the Alias Division
A user-defined name assigned to a nonrepeating
group item
A user-defined name assigned to an entry in a
repeating group that corresponds to a vector in
the schema
Data names from the schema must appear exactly as
t h e y a r e s p e c i fi e d i n t h e s c h e m a d e s c r i p t i o n . I f
an alias is assigned to the schema data item, the
alias must be used to reference that data item in
t h e d a t a d e s c r i p t i o n e n t r y. N o n r e p e a t i n g g r o u p
items are defined under Schema/Subschema Compat
i b i l i t y.
At least one clause must be included in the data
description entry for an elementary item. A group
item entry can also have one or more clauses. The
order of clauses is not important except where
explicitly stated in the clause description.
The only punctuation required in a data description
entry is the terminating period. Semicolons or
commas can be used to separate clauses.

3-1

DATA ORGANIZATION
Data items in the Record Division are organized
first into records and then into group and elemen
tary items. Each record type corresponds to a
record type in the schema and must be within the
realms (schema areas) specified in the Realm Divi
sion. A record description entry begins with level
number 01 and includes a series of subordinate data
description entries with higher level numbers.

Group Items
A group item is a collection of related items
organized in a hierarchical structure. The group
name data description entry has the lowest level
number within the group itself. Other items within
the group item have successively higher level
numbers ending with the most elementary item, the
highest numbered item in the group. All data items
in a group item c a n b e r e f e r e n c e d c o l l e c t iv e l y b y
the data name of the group item. A description
must be written for each data item in the group,
and the group name data description entry must have
at least a level number and a data name. A group
item can be part of a larger group (nested group
items).

Elementary Items
An elementary item is an item that cannot be fur
ther subdivided. If it is part of a group item,
the elementary item has the highest level number of
the group item (03-49) to which it belongs. An
elementary item in the subschema must correspond to
an elementary item in the schema. A schema elemen
tary item cannot be described in the subschema as a
g ro u p i te m e ve n i f t h e t o t a l n u m b e r o f c h a r a c t e r s
represented in the schema and in the subschema are
equal.

SCHEMA/SUBSCHEMA
COMPATIBILITY
The subschema is created to accommodate the needs
of a COBOL or Query Update application program.
Some characteristics of the data in the data base
are fixed by the schema and cannot be changed by
t h e s u b s c h e m a ; o t h e r c h a r a c t e r i s t i c s s p e c i fi e d i n
the schema can be different in the subschema. The
limitations placed on the variations between the
schema and the subschema are precise and must be
carefully considered when the subschema is
described.

a schema area is omitted from the subschema, no
records or data items within that area can be
included in the subschema. Omission of an area
implies omission of all subordinate items.
Once a schema area is specified as a realm in the
subschema, any or all of the records in that area
can be included in the subschema. If a record is
omitted, all data items within that record are also
omitted from the subschema. Only those records
w i t h i n t h e r e a l m s ( s c h e m a a r e a s ) i d e n t i fi e d i n t h e
Realm Division can be described in the subschema.
When a record is included in the subschema, data
items within the schema record can be omitted from
the subschema record description. Elementary data
items that are not subordinate to a group data item
can be included or omitted as needed in the sub
schema. If a group data item is omitted, all
subordinate data items must also be omitted. For
nested group items, the highest level group item
must be included when a lower level group item is
to be included in the record description. Primary
key items cannot be omitted from the subschema
record description.
Figure 3-1 illustrates a subschema record that
omits several of the data items in the correspond
ing schema record. In this example, only two
schema areas have been included in the subschema.
The schema records in the CUSTOMER and SALES areas
a r e t h e o n l y r e c o r d s t h a t c a n b e s p e c i fi e d i n t h e
subschema; the records in the PRODUCTS area are
automatically omitted. The subschema record
CUSTOMER-REC includes the data items CUSTOMER-ID,
MONTHLY-ORDERS, and TOTAL-AMT; all the other data
i t e m s h a v e b e e n o m i t t e d f r o m t h e s u b s c hema and
cannot be accessed by an application program. If
the group item MONTHLY-ORDERS had been omitted, the
s u b o r d i n a t e i t e m TO TA L - A M T c o u l d n o t h a v e b e e n
included in the subschema.

ORDERING OF DATA ITEMS
Data items in a record selected for the subschema
need not be organized in exactly the same sequence
a s s p e c i fi e d i n t h e s c h e m a . T h e r e l a t i v e h i e r a r c h y
of the schema must be maintained when the order of
data items is changed.
Only one restriction is placed on changing the
order of data items in the subschema record
description. Data items that are subordinate to a
group item in the schema must be subordinate to the
same group item in the subschema.

y^S^v

Figure 3-2 illustrates the reordering of data items
from the schema to the subschema.

OMISSION OF DATA ITEMS
The subschema normally describes only a portion of
the data base. Data items that are not required by
a COBOL or Query Update program are not included in
the subschema description. Elementary items, group
items, complete records, and entire areas in the
schema can be omitted from the subschema. When a
group item, a record, or an area is not included in
the subschema description, all subordinate entries
are automatically omitted and cannot be referenced
in the subschema.
Each schema area that is to be included in the
s u b s c h e m a i s i d e n t i fi e d i n t h e R e a l m D i v i s i o n . I f

3-2

DEFINITION OF DATA ITEMS
Each data base data item that is to be made avail
able to a COBOL or Query Update application program
is described in a subschema record description
e n t r y. D a t a i t e m s n o t i n c l u d e d i n t h e s u b s c h e m a
cannot be accessed by a program. The size and
class of the data item can be exactly the same as
d e s c r i b e d i n t h e s c h e m a o r, u n d e r c e r t a i n c i r c u m
stances, they can be different. Nonrepeating group
items, which do not exist in the schema, can be
specified in the subschema.

60485200 A

" " ^

Schema

Subschema

AREA NAME. IS SALES.
AK£A NAME IS CUSTOMER.
AREA NAME IS PRODUCTS.

•
•
•

RECORD NAME IS CUSTUMER-RtC
WITHIN CUSTOMER.
01 CUSTOMER-ID
01 CUSTOMER-NAME . . .
01 AUDR
01 CITY
01 STATE
01 7 IP-CODE
01 PHONE-NUM
01 MONTHLY-ORDERS OCCURS 12 TIMES.
UJ NUM-ORDERS. . .
03 TOTAL-AMT . . .

REALM DIVISION.
RD CUSTOMER. SALES.
RECORD DIVISION.
01 CUSTOMER-REC.
03 CUSTOMER-ID
03 MONTHLY-ORDERS OCCURS 12
TIMES.
05 TOTAL-AMT
01 SALES-REC.

Figure 3-1. Omitting Schema Items From the Subschema

Schema
01
01
01
01
01
01
01
01
01
01
01
01

CUSTOMER-IU
INVOICE-NUM
YEAR
MONTH
DA
CHARGE-NUM
REMARKS
AMOUNT-DUE
AMOUNT-REC
S A L E S - TA X
NUM-ITEMS
ITEM OCCURS
03 QUANTITY
03 DESC-A
0 3 U N l T- P K I C E
0 3 E X T- P R I C E

Subschema
03
03
03
03
03
03
03
03
03
03
03
03

C U S TO M E R - I D
INVOICE-NUM
AMOUNT-REC
AMOUNT-DUE
S A L E S - TA X
MONTH
DA
YEAR
REMARKS
CHARGE-NUM
NUM-ITEMS
ITEM OCCURS
OS DESC-A
05 QUANTITY
0 5 U N I T- P R I C E
0 5 E X T- P R I C E

Figure 3-2. Reordering Data Items

Data Size and Class
The size and class of data items in the subschema
are specified by the PICTURE and USAGE clauses.
The schema description designates the size and
class through either the PICTURE or TYPE clause.
When the PICTURE and USAGE clauses are written for
the subschema, the schema description must be
checked to determine that the subschema description
does not conflict with the schema description.
The size of the data item is specified in the sub
schema by the number of character position designa
t o r s ( A , X , a n d 9 ) i n t h e p i c t u r e - s p e c i fi c a t i o n o f
the PICTURE clause. Usually, when a data item is
d e s c r i b e d i n a p i c t u r e - s p e c i fi c a t i o n , t h e n u m b e r o f

60485200 A

c h a r a c t e r p o s i t i o n s s p e c i fi e d i n t h e s u b s c h e m a
should not exceed the number of character positions
s p e c i fi e d f o r t h e i t e m i n t h e s c h e m a . F o r a n y
subschema data item that is larger than the corre
sponding schema item, the DDL compiler issues an
informative diagnostic message. The user must
decide when the schema or subschema pictures p e c i fi c a t i o n s h o u l d b e c o r r e c t e d . F i g u r e 3 - 3 h a s
examples of size discrepancies that cause the DDL
compiler to issue diagnostics. In example 3, the
s u b s c h e m a p i c t u r e s i z e i s fi v e , b u t t h e i n t e r n a l
storage size is one word, which is greater than the
schema size of five. When a conversion error such
as nonblank truncation occurs, the operation is
aborted, CDCS writes a nonfatal error message to
the dayfile, and processing continues.

3-3

Schema

Subschema

Example 1
01 AAAA

PIC "X" FOR ENCODING
CALL DEPROC.

02 AAAA PIC X{5).

PIC "999".

02 BBBB PIC 9(4).

PIC "9(5)".

02 CCCC PIC 9(5) USAGE IS
COMP-1.

Example 2
01 BBBB
Example 3
01 CCCC

Figure 3-3. Size Discrepancies of Data Items
Each data Item falls into one of eight data class
categories. The data class is determined by the
description of the data item. The data classes and
codes are as follows:

TABLE 3-1. VALID SCHEMA TO SUBSCHEMA
CLASS CONVERSIONS
Subschema Data Class

Schema
Data
Class

0

1

3

1 Display alphabetic

0

X

X

X

3

Display

integer

1

X

X

4

Display

fi x e d - p o i n t

3

X

Code Data Class

4

10

13

14t

X

X

X

X

X

X

X

X

X

X

15t

0 Display alphanumeric

10 Coded binary integer
1 3 C o d e d fl o a t i n g - p o i n t n o r m a l i z e d

10

14 Coded double-precision (Query
Update subschema only)

13

15 Coded complex (Query Update
subschema only)
T h e d a t a c l a s s t h a t c a n b e s p e c i fi e d i n t h e s u b
schema depends upon the class of the data item in
the schema. Valid subschema data classes for each
schema data class are indicated in table 3-1.
If the schema specifies a CHECK IS PICTURE clause,
the data description in the subschema must match
the data description in the schema. The CHECK IS
P I C T U R E c l a u s e i n t h e s c h e m a d e fi n i t i o n i n h i b i t s
data conversion between the schema and the sub
schema. Identical schema and subschema data
descriptions are also required for a primary key
item embedded in a record of an area having actual
k e y fi l e o r g a n i z a t i o n .
The data class of an item described in the schema
is determined by either a PICTURE clause or a TYPE
c l a u s e . Ta b l e 3 - 2 l i s t s e a c h d a t a c l a s s a s i t i s
represented in the schema. The PICTURE and USAGE
clauses in the subschema description of a data item
determine the subschema data class. The COBOL

3-4

4

14
15
IQuery IJpdate subschema onl

subschema representation of each valid data class
is listed in table 3-3; table 3-4 lists the Query
Update subschema representation of each valid data
class. Refer to appendix G for a summary of data
definition in DMS-170.

Repeating Data Items
Two types of repeating data items can be designated
In the subschema: vectors and repeating groups. A
vector is an elementary data item that is repeated
a number of times in each record. A repeating
group Is a collection of data items that is
repeated; the entire collection, not individual
data items, is repeated a number of times in each
record.

60485200 A

TABLE 3-2. DATA CLASS REPRESENTATION IN THE SCHEMA
Data Class

0

Schema PICTURE Clause

Schema TYPE Clause

Internal Representation

None

CHARACTER

Character-string (A X 9,
not all 9s)

None

1

Character-string (all As)

None

Display code, alphabetic

3

Numeric-picture integer
(9 T)

None

Display code numeric can have sign
overpunch in last character position

4

N u m e r i c - p i c t u r e fi x e d point (9 V T P)

None

Display code numeric plus implicit
or explicit decimal or scaling position

10

None

FIXED integer-1,
integer-2 (where
integer-1 < 18)

Binary integer

13

None

FLOAT integer-1 (where
integer-1 <^ 14)

S i g n e d , n o r m a l i z e d fl o a t i n g - p o i n t
(60-bit)

14

None

FLOAT integer-1 (where
15 > integer-1 <_ 29)

Two words of normalized floating-point

15

None

TYPE COMPLEX

Two words of a complex number

Display code, alphanumeric

TABLE 3-3. DATA CLASS REPRESENTATION IN THE COBOL SUBSCHEMA

Data Class

COBOL Subschema
PICTURE Clause

0

Alphanumeric (A X 9)
(A specification of mixed
As and 9s is treated as
all Xs)

DISPLAY (or none)

Display code, alphanumeric

1

Alphabetic (A)

DISPLAY (or none)

Display code, alphabetic

3

Numeric (9 S)

DISPLAY or COMP (or none)

Display code numeric, < 18
characters; trailing sign overpunch
i f S i s s p e c i fi e d

4

Numeric (9 S V P)

DISPLAY or COMP

Display code numeric, < 18 char
acters; trailing sign overpunch if S
i s s p e c i fi e d ; i m p l i c i t d e c i m a l o r
scaling position

10

Numeric (9 S V P)

COMP-1 or INDEXt

Size < 15; binary integer

13

Numeric (9 S V P)

COMP-2

N o r m a l i z e d fl o a t i n g - p o i n t

COBOL Subschema
USAGE Clause

Internal Representation

tA PICTURE clause cannot be used to describe an item that specifies USAGE IS INDEX.

c

60485200 A

3-5

TABLE 3-4. DATA CLASS REPRESENTATION IN THE QUERY UPDATE SUBSCHEMA

Data Class

0

Query Update Subschema
PICTURE Clause
Alphanumeric (A X 9)
(A specification of mixed
As and 9s is treated as

Query Update Subschema
USAGE Clause

Internal Representation

DISPLAY (or none)

Display code, alphanumeric

all Xs)
1

Alphabetic (A)

DISPLAY (or none)

Display code, alphabetic

3

Numeric (9 S and
insertion and replacement
ch ar ac t er s )

DISPLAY or COMP
(or none)

Display code numeric, < 18 characters;
trailing sign overpunch if S is speci
fi e d

4

Numeric (9 S V P and
insertion and replacement
ch ar ac t er s )

DISPLAY or COMP
(or none)

Display code numeric, < 18 characters;
trailing sign overpunch if S is speci
fi e d ; i m p l i c i t d e c i m a l o r s c a l i n g
position

10

Numeric (9 S V P and
insertion and replacement
ch ar ac t er s )

COMP-1, INDEXt, or
LOGICAL

Size < 15; binary integer

13

Numeric (9 S V P and
insertion and replacement
ch ar ac t er s )

COMP-2

N o r m a l i z e d fl o a t i n g - p o i n t

14

Numeric (9 S V P and
insertion and replacement
ch ar ac t er s )

DOUBLE

Normalized floating-point (2 words)

15

Numeric (9 S V P and
insertion and replacement
ch ar ac t er s )

COMPLEX

N o r m a l i z e d fl o a t i n g - p o i n t
(2 consecutive words)

tA PICTURE c lause cannot be used to descr ibe an item that specifies USAGE IS INDEX.

Repeating data items are specified by including the
OCCURS clause in the data description entry. When
a repeating data item in the schema is to be
included in the subschema description, it must be
described as a repeating data item and must conform
to the following rules:
A subschema data item that is repeated a fixed
n u m b e r o f t i m e s m u s t c o r r e s p o n d t o a fi x e d
occurrence data item in the schema.
T h e n u m b e r o f o c c u r r e n c e s s p e c i fi e d i n t h e
subschema OCCURS clause cannot be greater than
the number of occurrences allowed by the schema
description of the data item.
A subschema data item that is repeated a vari
able number of times must correspond to a
variable occurrence data Item in the schema.
If a subschema data item corresponds to a
schema data item that controls a variable
occurrence data item, the subschema must
include the variable occurrence data item.

3-6

A subschema variable occurrence data item must
be the last item in the record.
When the OCCURS ... DEPENDING ON clause is
used, the data name in the clause must refer to
an elementary data item that precedes the entry
containing the clause. The data item cannot be
within a variable occurrence data item.
Vectors
A subschema vector is described with the OCCURS
clause and the PICTURE or USAGE clause; in the
schema, the OCCURS clause and either the TYPE or
PICTURE clause are used to describe a vector. No
data item can be subordinate to a vector. A schema
vector that is included in the subschema can be
described as a vector or as nested repeating
groups. If the schema vector is described in the
subschema as nested repeating groups, the elemen
tary data item at the bottom of the hierarchy
corresponds to the vector in the schema. Up to
three levels of nested groups can be specified; the
s c h e m a v e c t o r m u s t b e a fi x e d o c c u r r e n c e d a t a
item. Example 1 in figure 3-4 illustrates a schema
vector described in the subschema as nested repeat
ing groups.

60485200 A

Schema

Subschema

Example

01

MONTH-TOT PICTURE #9(<»)V99.<
OCCURS 12 TIMES.

03

HALF-YEAR
OCCURS
05 QUARTER
OCCURS
0 7 MONTri- T O T P I C
OCCURS

MONTHLY-ORDERS OCCURS 12 TIMES.
03 NUM-ORDERS PICTURE 1*99*.
0 3 T O TA L - A M T P I C T U R E * 9 < 6 > V 9 9 / .

03

MONTHLY-ORDERS OCCURS 12 TIMES.
05 NUM-ORDERS PICTURE 99.
0 5 T O TA L - A M T
PICTURE 9(6>V99.

MONTHLY-ORDERS OCCURS 12 TIMES.
03 NUM-ORDERS P I C T U R E # 9 9 * .
0 3 T O TA L - A M T
PICTURE #9<6>V99#.

03

MONTHLY-ORDERS OCCURS 6 TIMES.
05 NUM-ORDERS PICTURE 99.
0 5 T O TA L - A M T
PICTURE 9(b)V99.

NUM-ITEMS PICTURE *99*
CHECK VALUE 1 THRU 15.
ITEM OCCURS NUM-ITEMS TIMES.
03 QUANTITY PICTURE *9(4>#.
03 DESC-A PICTURE #X(16)»s.
0 3 E X T- P R I C E P I C T U R E * 9 < 6 > V 9 9 # .

03
03

NUM-ITEMS
ITEM OCCURS 1
DEPENDING ON
05 OUANTITY
05 DESC-A
0 5 E X T- P R I C E

NUM-ITEMS PICTURE *99*
CHECK VALUE 1 THRU IS.
ITEMS OCCURS NUM-ITEMS TIMES.
03 QUANTITY PICTURE f*9(<*)#.
03 AMOUNT PICTURE #9<6>V99*.

03
03

NUM-ITEMS PICTURE 99.
ITEMS OCCURS 1 TO 6 TIMES
DEPENDING ON NUM-ITEMS.
05 QUANTITY PICTURE 9U).
05 AMOUNT PICTURE 9(6)V99.

2 TIMES.
2 TIMES.
9U)V99
3 TIMES.

Example

01

Example

01

Example
01
01

PICTURE 99.
TO 15 TIMES
NUM-ITEMS.
PICTURE 9U> .
PICTURE X<16>.
P I C T U R E 9 ( 6 >V9V.

Example 5
01
01

Figure 3-4. Examples of Repeating Data Items
Repeating Groups
XfflRR&hy

A repeating group is described with two or more
d a t a d e s c r i p t i o n e n t r i e s . T h e fi r s t e n t r y c o n s i s t s
of the group data name and the OCCURS clause. Each
a d d i t i o n a l e n t r y i s s u b o r d i n a t e t o t h e fi r s t e n t r y
a n d d e s c r i b e s a r e p e a t i n g g r o u p , a v e c t o r, o r a n
elementary data item. The vector or elementary
data item contains the PICTURE clause. Up to three
l e v e l s o f n e s t e d g r o u p s c a n b e s p e c i fi e d . W h e n
repeating groups and vectors are nested, the vector
is considered to be a repeating group and is in
cluded in the level count. Example 2 in figure 3-4
illustrates a repeating group data item.
NOTE
Refer to appendix F for recommendations on
the use of repeating groups.
Fixed Occurrence Data Items
A subschema data item that occurs a fixed number of
t i m e s m u s t c o r r e s p o n d t o a fi x e d o c c u r r e n c e d a t a
item in the schema. Format 1 of the OCCURS clause

60485200 A

s p e c i fi c a t i o n i s u s e d t o d e s c r i b e a fi x e d o c c u r
rence data item. (Refer to the OCCURS Clause
subsection.)
T h e i n t e g e r s p e c i fi e d i n t h e c l a u s e c a n n o t b e
g r e a t e r t h a n t h e n u m b e r o f o c c u r r e n c e s s p e c i fi e d
for the data item in the schema; it can be less
than or equal to the schema number. Examples 2 and
3 i n fi g u r e 3 - 4 i l l u s t r a t e fi x e d o c c u r r e n c e d a t a
items.
Variable Occurrence Data Items
A subschema data item that occurs a variable number
of times must correspond to a variable occurrence
data item in the schema. Format 2 of the OCCURS
c l a u s e s p e c i fi c a t i o n i s u s e d t o d e s c r i b e a v a r i a b l e
occurrence data item. (Refer to the OCCURS Clause
subsection.)
The maximum number of times the data item can occur
in the subschema must not be greater than the maxi
mum allowed in the schema description. The OCCURS
clause In the subschema specifies the minimum and
maximum number of occurrences of the repeating data

3-7

i t e m a n d a l s o s p e c i fi e s t h e e l e m e n t a r y d a t a i t e m
that contains the actual number of occurrences for
the record. The OCCURS clause in the schema speci
fi e s t h e e l e m e n t a r y d a t a i t e m t h a t c o n t a i n s t h e
number of occurrences for the record; the data
description entry for the controlling data item
includes the CHECK clause, which indicates the
minimum and maximum number of occurrences of the
repeating data item.
The data item that designates the actual number of
occurrences must be an elementary data item and it
must precede the data description entry for the
variable occurrence data item. If the schema data
item that controls the variable occurrence data
item is included in the subschema, the variable
occurrence data item must also be included in the
subschema. The controlling data item in the schema
cannot be an independent data item in the subschema.
In example 4 of figure 3-4, the data item NUM-ITEMS
controls the variable occurrence data item ITEM.
If NUM-ITEMS is included in the subschema, ITEMS
must also be included.
The variable occurrence data item must be the last
item in the record. Only subordinate data descrip
tion entries can follow the entry containing the
OCCURS clause. Variable occurrence data items are
shown in examples 4 and 5 of figure 3-4.
Nonrepeating Group Items
The only group items in the schema are repeating
groups. Nonrepeating group items can be specified
in the subschema by designating a series of related
data items as subordinate entries to a group data
item that is inserted in the subschema description,
which allows the application program to access
several data items with one request.

Schema
01
01
01
01
01
01
01

A nonrepeating group item consists of three or more
d a t a d e s c r i p t i o n e n t r i e s . T h e fi r s t e n t r y d o e s n o t
correspond to an entry in the schema; it specifies
the data name for the entire group data item. Each
a d d i t i o n a l e n t r y i s s u b o r d i n a t e t o t h e fi r s t e n t r y
and describes a data item that corresponds to an
entry In the schema. The only restriction placed
on nonrepeating group items is that the relative
hierarchy of the schema be preserved. Figure 3-5
illustrates the insertion of nonrepeating group
items in the subschema.
A concatenated key is a primary or alternate record
key that Is declared in the schema and is composed
of a series of contiguous elementary data items.
To m a k e u s e o f t h i s r e c o r d k e y, a n o n r e p e a t i n g
group item must be defined in the subschema with
t h e s a m e n a m e a s t h e k e y - n a m e s p e c i fi e d i n t h e
schema. The subordinate items for this group must
be all of the concatenated data items (or the
subschema aliases for these data-names) specified
in the same order as in the schema KEY clause.
Definition of other subordinate items for the group
item is not allowed. An example of a concatenated
key specification is shown in figure 3-6.

SUBSCHEMA PROGRAMMING
CONVENTIONS
The COBOL or Query Update subschema source program
consists of a series of statements that describe a
portion of the data base. The rules, conventions,
and hierarchical structures of DDL are similar to
those of COBOL.

Subschema

EMPLOYEE-ID
...
03
E M P L O Y E E - I D E N T.
EMPLOYEE-NAME
...
05
EMPLOYEE-ID
SOC-SEC-NUM
...
05
EMPLOYEE-NAME.
ADDR
...
05
SOC-SEC-NUM
CITY
...
03
EMP-ADDPESS.
S TAT E
...
05
AODR
ZIP-CODE
...
05
CITY
0 5 S TAT E
05 ZIP-CODE

Figure 3-5. Insertion of Nonrepeating Group Items

Schema
KEY ID IS CONCAT-KEY < ITEMA,ITEMB,ITEMC >

Subschema
03 CONCAT-KEY.
05 ITEMA
05 ITEMB
05 ITEMC

Figure 3-6. Concatenated Key Declaration

3-8

60485200 A

LANGUAGE ELEMENTS

Literals

DDL source statements are composed of clauses that
c o n t a i n r e s e r v e d w o r d s , u s e r - d e fi n e d n a m e s , a n d
literals. The use of these elements is described
i n t h e f o l l o w i n g p a r a g r a p h s . T h e s p e c i fi c f o r m a t s
of the clauses are defined in the COBOL and Query
Update Subschema Syntax subsection.

In some formats, the user must supply a literal as
part of the clause. A literal is a string of char
a c t e r s t h a t r e p r e s e n t s a s p e c i fi c v a l u e . L i t e r a l s
are either numeric or nonnumeric.

Numeric Literals

Reserved Words
Reserved words are English words, abbreviations,
and acronyms that have special meaning to the DDL
compiler. These- words can be used only as shown In
the format specifications. A reserved word must be
spelled correctly; it cannot be replaced by another
word. Over 350 words have been defined as reserved
words. Appendix D contains a complete list of DDL
reserved words used in COBOL and Query Update
subschema definition.
Two types of reserved words are recognized by the
DDL compiler: keywords and optional words. A
keyword is a reserved word that must be used in a
s p e c i fi c c l a u s e . K e y w o r d s a r e e s s e n t i a l t o c o n v e y
t h e m e a n i n g o f a c l a u s e t o t h e c o m p i l e r. A n o p
tional word is a reserved word that can be included
in a clause to improve readability. Optional words
are recognized by the compiler but are not needed
to compile the object coding. In the format speci
fications, keywords are shown as uppercase words
that are underlined; optional words are shown as
uppercase words that are not underlined.

A numeric literal can contain the numbers 0 through
9 , t h e d e c i m a l p o i n t , a n d t h e p l u s o r minus sign.
A decimal point can be included in any character
position except the rightmost position. A plus
sign or a minus sign can precede the number. If a
sign is not included, the literal is treated as a
positive number.
The maximum size for a numeric literal is 30
d i g i t s ; h o w e v e r, o n l y 1 8 d i g i t s c a n b e s i g n i fi c a n t .
Up to 12 leading or trailing zeros can be specified
for input alignment.
Nonnumeric Literals
A nonnumeric literal is a string of up to 255 char
acters. The string must be enclosed in quotation
marks. Any characters in the DDL character set,
including the space, can be used in a nonnumeric
literal. If a quotation mark is to be included in
t h e l i t e r a l , t h e q u o t a t i o n m a r k m u s t b e s p e c i fi e d
twice for each occurrence. For example, "A" "B"
would yield the literal A"B.

User-Defined Names
M a n y o f t h e f o r m a t s p e c i fi c a t i o n s i n c l u d e n a m e s
t h a t t h e u s e r s u p p l i e s . U s e r - d e fi n e d n a m e s i d e n
tify the schema, subschema, realms, records, data
items, index names, and condition names. The type
of name to be supplied is indicated in the format
specification by a lowercase word.
T h e f o l l o w i n g r u l e s a p p l y t o u s e r - d e fi n e d n a m e s
except for some names used with Query Update (see
the exceptions following the rules):

Data Reference
Each user-defined name in the subschema must be
capable of being uniquely referenced. Unless the
name itself is unique because no other name has the
identical spelling, a method for obtaining unique
i d e n t i fi c a t i o n i s n e c e s s a r y. U n i q u e r e f e r e n c e i s
r e c o g n i z e d t h r o u g h t h e q u a l i fi c a t i o n , s u b s c r i p t i n g ,
a n d i d e n t i fi e r c o n c e p t s .

A name can contain up to 30 characters.

Q u a l i fi c a t i o n

Letters (A-Z), digits (0-9), and hyphens (-)
can be used.

Q u a l i fi c a t i o n i s p e r m i t t e d i n a n y c l a u s e , o t h e r
than a RESTRICT clause, that references a data
name. When a name exists within a hierarchy of one
or more names, the higher level names can be used
to make the name unique. The data name is written
f o l l o w e d b y t h e w o r d O F o r I N a n d t h e q u a l i fi e r.
The choice between OF or IN is based on readability;
t h e t w o w o r d s a r e l o g i c a l l y e q u i v a l e n t . Q u a l i fi c a
tion mut be made to the level necessary to make the
n a m e u n i q u e ; h o w e v e r, q u a l i fi c a t i o n c a n b e u s e d
even when the name does not need to be qualified.

The first character must be a letter.
A hyphen cannot be used to begin or end a name.
Adjacent hyphens cannot- be used.
Spaces (blanks) cannot be used.
A name cannot be spelled exactly the same as a
reserved word.
In a Query Update subschema, realm and subschema
names must conform to the above rules with the
following exceptions:
Realm and subschema names cannot contain any
hyphens.
I f a n a l i a s i s s p e c i fi e d f o r a r e a l m , t h e n t h a t
name cannot contain hyphens.

60485200 B

Subscripting
Subscripting within the DDL syntax Is permitted
only in the RESTRICT clause. Subscripts are used
to indicate which occurrence of a repeating group
or elementary item is to be referenced. The data
name is written followed by a positive integer
c o n s t a n t e n c l o s e d i n p a r e n t h e s e s . S p e c i fi c r u l e s
for using subscripts are detailed in the following
paragraphs.

3-9

I d e n t i fi e r

( Left Parenthesis

The term identifier is used to indicate a data name
that is referenced uniquely through a combination
o f s u b s c r i p t s a n d q u a l i fi e r s . W h e n t h e t e r m i d e n
tifier appears in a RESTRICT clause, It assumes the
format shown in figure 3-7.

) Right Parenthesis
$ Dollar Sign
/

Slash

Punctuation
data-name-1

MN f data-name-2 ...

1 subscript-1 , subscript-2 [ , subscript-3l 1

F i g u r e 3 - 7 . I d e n t i fi e r F o r m a t
Subscripting within the DDL syntax is permitted
only In the RESTRICT clause. Qualifiers and sub
scripting are independent of each other. A maximum
o f fi v e d a t a - n a m e - 2 q u a l i fi e r s c a n b e s p e c i fi e d .
They must be listed In the order of innermost to
outermost level of nesting of the group or record;
h e n c e t h e l e f t m o s t q u a l i fi e r ( d a t a - n a m e - 2 ) i s t h e
term with the highest level number.
I n t h e e x a m p l e i n fi g u r e 3 - 8 , v a l i d r e f e r e n c e s t o
item C are given for a COBOL subschema repeating
group containing A, B, and C.

Most punctuation marks in a DDL source program are
optional. When punctuation marks are used, the
r u l e s a r e p r e c i s e a n d m u s t b e f o l l o w e d e x a c t l y.
The rules for using punctuation marks are as
follows:
A period is required to terminate a division
heading and each complete statement.
A period must be followed by at least one
space. If the punctuation mark is in the last
column of the statement area (column 72), a
blank Is assumed to exist immediately after
column 72 and before column 73 of the program
i d e n t i fi c a t i o n a r e a .
A left parenthesis must not be followed by a
space; a right parenthesis must not be preceded
by a space.
At least one delimiter (a space, comma, or
semicolon) must separate successive words in a
statement.

DDL Character Set

Commas and semicolons can be used to separate
clauses in a statement.

The set of characters recognized by the DDL com
p i l e r c a n b e c o m b i n e d a c c o r d i n g t o t h e s p e c i fi e d
rules to form names and values in the source
program. The DDL character set consists of the
letters A through Z, the numbers 0 through 9, and
the following special characters:

A p e r i o d t e r m i n a t e s t h e S S c l a u s e ( Ti t l e D i v i
sion), each AD clause (Alias Division), the RD
clause (Realm Division), each entry introduced
by a level number (Record Division), and the
relation description entry (Relation Division).

Blank or Space

DDL CODING

+ Plus Sign
- Minus Sign or Hyphen
, Comma

DDL source programs can be written on standard
COBOL coding sheets. Coding a COBOL or Query
Update subschema is similar to coding the Data
Division of a COBOL application program. Columns 8
through 72 are used to write DDL statements.

; Semicolon
* Asterisk

Coding DDL Statements

Period or Decimal Point
" Quotation Mark

The DDL source program defining a COBOL or Query
Update subschema consists of up to five divisions;
the Alias and Relation Divisions are optional. The

COBOL Subschema Repeating Group
02 A OCCURS 3 TIMES.
04 B OCCURS 6 TIMES.
06 C PICTURE 999.

Valid Identifiers for C
C IN A (3, 5)
C OF B OF A (3)
The default subscript for B is the value 1.
C OF B OF A
The default subscripts for both A and B have the value 1.
>*s^

Figure 3-8. COBOL Subschema Qualification and Subscripting Example
3-10

60485200 B

division name begins in columns 8 through 11 and is
followed by a space, the word DIVISION, and a
period. The remainder of the line must be left
blank.
A division heading is followed by one or more
statements pertaining to that division. In the
Ti t l e , A l i a s , R e a l m , a n d R e l a t i o n D i v i s i o n s , t h e
statement begins In columns 8 through 72. In the
Record Division, level number 01 begins in columns
8 through 72; all other level numbers begin in
columns 12 through 72.

Sequence Numbers
A sequence number consisting of digits only can be
entered In columns 1 through 6. The sequence num
ber Is optional and has no effect on the source
program.

TITLE DIVISION
T h e T i t l e D i v i s i o n m u s t b e t h e fi r s t d i v i s i o n i n
t h e D D L s o u r c e p r o g r a m . I t i d e n t i fi e s t h e s u b
schema being described and the schema to which the
s u b s c h e m a a p p l i e s . T h e f o r m a t o f t h e Ti t l e D i v i
sion is as follows:
TITLE DIVISION.
{title description entry}.
The title description entry is a statement contain
ing one clause that names the subschema and Identi
fi e s t h e s c h e m a . O n e t i t l e d e s c r i p t i o n e n t r y m u s t
be included In the Title Division. The DDL compiler
accepts only one statement In this division.

SS Clause
Continuation Lines
Words or literals can be continued from
the next. When a continuation line is
the coding sheet, a hyphen must be
column 7. The continuation must begin in

one line to
written on
entered in
column 12.

The SS clause names the subschema being created and
specifies the schema that describes the data base.
COBOL or Query Update application programs refer
ence the subschema by the name established In this
clause. The format of the SS clause is shown in
fi g u r e 3 - 1 0 .

Comment Lines
Comments can be printed on the source listing. A
comment line is written on the coding sheet by
entering an asterisk in column 7. The comment
begins in column 8 through 72.

COBOL AND QUERY UPDATE
SUBSCHEMA SYNTAX
The source program for a COBOL or Query Update
s u b s c h e m a c o n t a i n s fi v e d i v i s i o n s : Ti t l e D i v i s i o n ,
Alias Division, Realm Division, Record Division,
and Relation Division. The following paragraphs
d e fi n e t h e f o r m a t s p e c i fi c a t i o n s f o r e a c h c l a u s e
that can be used in the source program.
The general f o r m a t o f a C O B O L o r Q u e r y U p d a t e
s u b s c h e m a I s s h o w n i n fi g u r e 3 - 9 . F o r t h e r u l e s
governing the structure of the subschema, see the
Subschema Structuring Conventions subsection.

SS subschema-name WITHIN schema-name.

Figure 3-10. SS Clause Format
The subschema-name entered in this clause is the
name used whenever the subschema is referenced
after it has been compiled and stored in the sub
s c h e m a l i b r a r y. T h e n a m e m u s t b e u n i q u e a m o n g
subschemas associated with the designated schema.
The schema-name identifies the schema to which the
subschema applies. The schema must exist within
the system and be recognized by the CYBER Database
Control System (CDCS). The schema describes the
entire data base of which the subschema describes
only a portion.

Other Clauses
Future software releases will provide other clauses
that can be Included in the title description
e n t r y. O n l y o n e c l a u s e I s c u r r e n t l y a c c e p t a b l e I n
t h e Ti t l e D i v i s i o n .

TITLE DIVISION.
{title description entry>.
TALIAS DIVISION.
L C a l i a s d e s c r i p t i o n e n t r y. ] .

..]

REALM DIVISION.
{realm description entry}.

ALIAS DIVISION

RECORD DIVISION.
{ r e c o r d d e s c r i p t i o n e n t r y. }
fRELATION DIVISION,
[.{.relation description entry

.».„]

The Alias Division is optional and, If included,
m u s t i m m e d i a t e l y f o l l o w t h e Ti t l e D i v i s i o n . T h i s
division provides the means to assign names that
are to be used in the subschema in place of names
d e fi n e d I n t h e s c h e m a . T h e f o r m a t o f t h e A l i a s
Division is as follows:
ALIAS DIVISION.

Figure 3-9. General Format, COBOL and
Query Update Subschema

60485200 B

{ a l i a s d e s c r i p t i o n e n t r y. } . . .

3-11

The alias description entry is a statement that
specifies a name to be used in the subschema and in
the application programs instead of a name used in
the schema. Each alias description entry assigns
one alias. A separate entry is included for each
name in the schema to be assigned an alias. One
clause is used in an alias statement.

Assigning an alias in the subschema does not change
the name in the schema; the alias is a substitute
name that is used only in the subschema and in the
application programs referencing that particular
subschema. When an alias has been assigned, the
name in the schema cannot be used in the subschema
or in the application programs.

A record in the schema is assigned an alias by
entering the RECORD option in the AD clause. The
name entered as record-name-1 must be the name of a
record defined in the schema. The name entered as
record-name-2 then becomes the record name that is
used in both the subschema and the application
programs referencing the subschema.
A data item in the schema is assigned an alias by
e n t e r i n g t h e D ATA o p t i o n i n t h e A D c l a u s e . T h e
name entered as data-name-1 must be the name of a
data item in the schema. The name entered as
data-name-2 then becomes the data name that is used
in both the subschema and the application programs
referencing the subschema.
The use of the AD clause in the Alias Division is
i l l u s t r a t e d i n fi g u r e 3 - 1 2 .

AD Clause
The AD clause assigns an alias to a name defined in
the schema. The alias becomes the name recognized
by the subschema and by the COBOL or Query Update
application programs that reference the subschema.
The AD clause eliminates the need to rewrite exist
i n g a p p l i c a t i o n p r o g r a m s t h a t u s e n a m e s d i ff e r e n t
from the names defined in the schema. The format
of the AD clause is shown in figure 3-11.

( REALM realm-name-1
AD I RECORD record-name-1
DATA data-name-1

record-name-2 >
data-name-2 )
irealm-name-2

Figure 3-11. AD Clause Format
An alias can be assigned to a realm, a record, or a
data item. A specific name in the schema can have
only one alias in the subschema. Each realm-,
record-, or data-name-1 must be a unique realm,
record, or data name; however, data-name-1 can be
qualified to make it unique. The same alias cannot
be used for more than one realm-, record-, or
data-name-2 entry. Data-name-2 can be qualified to
make the name unique.
When a realm is assigned an alias, the REALM option
is entered in the AD clause. The name entered as
realm-name-1 must be defined in the schema as an
area. The name entered as realm-name-2 is then the
name used in the subschema and in the application
programs to reference that area in the schema.

Schema

Other Clauses
Only the AD clause can be included in an alias
d e s c r i p t i o n e n t r y. N o a d d i t i o n a l c l a u s e s a r e
planned for the Alias Division.

REALM DIVISION
The Realm Division must be included in the DDL
source program. If the Alias Division is included,
the Realm Division immediately follows it; other
wise, the Realm Division follows the Title Division.
The schema areas that are to be made available to
the subschema as realms are specified in the Realm
Division. The format of the Realm Division is as
follows:
REALM DIVISION.
{realm description entry}.
The realm description entry is a statement consist
ing of one clause that identifies the schema areas
to be used as realms in the subschema. One state
ment can specify as many realms as needed for the
subschema.

RD Clause
The RD clause identifies the specific schema areas
that are to be used in the subschema and in the
COBOL or Query Update application programs refer
encing the subschema. An area in the schema is
equivalent to a realm in the subschema. A realm is
e q u i v a l e n t t o a fi l e i n t h e a p p l i c a t i o n p r o g r a m .
The format of the RD clause is shown in figure 3-13.

Subschema

AREA NAME IS SALES.
RECORO NAME IS SALES-REC
01 CUSTOMER-ID ...
01 INVOICE-NUM ...
01 AMOUNT-DUE

ALIAS DIVISION.
AO REALM SALES BECOMES SALES-FILE.
AO RECORD SALES-REC BECOMES SALES.
AD DATA CUSTOMER-ID BECOMES CUST-NO.
AD DATA INVOICE-NUM BECOMES INV-NO.
AD DATA AMOUNT-DUE BECOMES AMT-DUE.

Figure 3-12. Assigning Aliases

3-12

^

60485200 A

\

RD

01 record-name

(all
1 realm--name-1

[realm--name -2]

} •

..j

Format 1
level-number data-name

Figure 3-13. RD Clause Format
Realms for the subschema are selected from the
areas in the schema. One or more realms are speci
fied by entering the realm names in the RD clause.
If an alias was assigned to a realm in the Alias
Division, the alias is used in the RD clause. When
all areas in the schema are to be made available to
the subschema, the word ALL can be used in the RD
clause. Unless ALL is specified, only those realms
named in the RD clause are available to the
subschema and to the programs referencing the
subschema.
Other Clauses
Future software releases will provide other clauses
that can be included in the realm description
e n t r y. O n l y o n e c l a u s e i s c u r r e n t l y a c c e p t a b l e i n
the Realm Division.

RECORD DIVISION, COBOL SUBSCHEMA

0!^*\

The Record Division immediately follows the Realm
D i v i s i o n . I t s p e c i fi e s t h e r e c o r d t y p e t o b e m a d e
available to a COBOL application program and
describes the format of the data in each record
type. The format of the Record Division is as
follows:
RECORD DIVISION.

[JUSTIFIED clause]
[OCCURS clause!
[PICTURE clausel
[REDEFINES clause]
[SYNCHRONIZED clause]
[USAGE clausel.
Format 2
66 data-name
RENAMES clauseFormat 3
88 condition-name
VALUE clause.
Figure 3-14. Formats of Data Description
Entries, COBOL Subschema

( j u s t i fi e d

RIGHT

j JUST
{ r e c o r d d e s c r i p t i o n e n t r y. } . . .
The Record Division is similar to the File Section
in the Data Division of a COBOL program. When a
COBOL program specifies a subschema, the record
d e s c r i p ti o n e n t r i e s i n t h e s u b s c h e m a R e c o r d D i v i
s i o n r e p l a c e t h e fi l e d e s c r i p t i o n e n t r i e s n o r m a l l y
written in the COBOL program.
T h e r e c o r d s w i t h i n t h e r e a l m s s p e c i fi e d i n t h e
Realm Division are described in the Record Divi
sion. Only those records that are to be used by
the COBOL programs are included. The record
description entry consists of a series of state
ments (data description entries) that describe the
data as it is used by the COBOL programs.
T h e fi r s t d a t a d e s c r i p t i o n e n t r y m u s t b e l e v e l
n u m b e r 0 1 , t h e r e c o r d n a m e e n t r y. S u b s e q u e n t
entries begin with level numbers 02 through 49 for
group and elementary data items, level number 66
for renaming a data item, and level number 88 for
d e fi n i n g v a l u e s t o b e a s s o c i a t e d w i t h a c o n d i t i o n .
The formats for data description entries are shown
in figure 3-14.

JUSTIFIED Clause
The JUSTIFIED clause specifies nonstandard posi
t i o n i n g o f d a t a w i t h i n a r e c e i v i n g fi e l d . T h e
format of the JUSTIFIED clause is shown in figure
3-15.

60485200 A

Figure 3-15. JUSTIFIED Clause Format,
COBOL Subschema

This clause can be specified only for nonnumeric
elementary data items. JUST is the legal abbrevi
ation for JUSTIFIED.
The JUSTIFIED clause overrides the normal position
ing of data when the size of the receiving field
does not equal the number of characters in the data
item. When the receiving field contains fewer
character positions than the data item, positioning
occurs as follows:
In normal positioning, the data item is aligned
at the leftmost character position and trun
cated at the right.
If the JUSTIFIED clause is specified, the data
item is aligned at the rightmost character
position and truncated at the left.
When the receiving field contains more character
positions than the data item, positioning occurs as
follows:
In normal positioning, the data item is aligned
at the leftmost character position and blank
filled at the right.

3-13

If the JUSTIFIED clause is specified, the data
item is aligned at the rightmost character
p o s i t i o n a n d b l a n k fi l l e d a t t h e l e f t .
Figure 3-16 illustrates character positioning.

OCCURS clause is used to indicate a repeated
item where all occurrences of the data item
identical in every respect except value. The
item can be an elementary item or a group

Data
Item

P i c t u r e J u s t i fi e d
9(5)

Right

X(5)
X(5)

Right

X{2)
X(2)

Right

NOTE
Refer to appendix F for recommendations on
the use of repeating groups.

OCCURS Clause
The
data
are
data

item. The format of the OCCURS clause is shown in
figure 3-17.

The KEY and INDEXED options are not used by CDCS;
the options can be included in an OCCURS clause for
use by the COBOL application program. The OCCURS
clause must not be specified in a data description
entry that has level number 66 or 88.

Receiving
Field
Illegal; item is numeric.

|1 | 2|3 |
|A|B|c|

A B C

Left-justified normally.

| a| b 1 c 1

A A A

Right-justified; blanks filled in.

|A|B|c|

A B

Left-justified normally; right character truncated.

|a|b|c|

B C

Right-justified; left character truncated.

Figure 3-16. Character Positioning

Format 1
OCCURS intecer-2 TIMES

[j ASCENDING \
I 1 DESCENDING f

KEY IS data-name-2

[data- name -3] .

[INDEXED BY index-name-1 [index-name-2] . .

..]...

•]

Format 2
OCCURS inteaer-1 TO inteqer-2 TIMES DEPENDING ON data-name-1

f» ASCENDING )
|t DESCENDING )

KEY IS data-name-2

[data--name -3] .

■■]•■■

[INDEXED BY index--name--1 {index-name -2] . .
Figure 3-17. OCCURS Clause Format, COBOL Subschema

3-14

60485200 A

A data description entry with format 1 of the
OCCURS clause can be subordinate to another entry
with either format of the OCCURS clause. An entry
with format 2 cannot be subordinate to an entry
with the OCCURS clause. Up to three levels of
nested data items can be specified with the OCCURS
clause. When repeating groups and vectors are
nested, the vector is considered to be a repeating
group and is included in the level count.
Integer-1 and integer-2 must be positive numbers.
In format 2, integer-2 must be greater than
integer-1. The value of integer-1 can be zero;
integer-2 must never be zero.
An elementary data item described with the OCCURS
clause must also be described with the PICTURE or
USAGE clause. A group data item cannot be described
with both the OCCURS clause and the PICTURE clause.
When an item occurs a fixed number of times, format
1 is used and integer-2 specifies the exact number
of occurrences. When an item occurs a variable
number of times, format 2 is used and the number of
occurrences for each record is determined as
follows:
Integer-1 represents the minimum number of
occurrences.
Integer-2 represents the maximum number of
occurrences.
Data-name-1 references a data item whose
current value represents the number of occurr
ences. The value of data-name-1 must be a
positive value within the range of integer-1
through integer-2.
In format 2, data-name-1 names an elementary item
that is unique or can be made unique by qualifica
tion. It cannot be subscripted and it should not
be described as C0MPUTATI0NAL-2. The size of the
data item cannot exceed six characters. The ele
mentary data item must precede the group data item
that references it.
A data item that occurs a variable number of times
must be the last item in a record description
e n t r y. T h e d a t a d e s c r i p t i o n e n t r y t h a t c o n t a i n s
the OCCURS clause can only be followed by subordi
nate entries.
If the OCCURS clause is used with a group data
item, any data-name belonging to the group must be
referenced by subscripting or indexing whenever it
is used as an operand, unless the data-name is the
object of a REDEFINES clause. Other clauses
s p e c i fi e d w i t h t h e O C C U R S c l a u s e a p p l y t o e a c h
occurrence of the data item.

ASCENDING/DESCENDING KEY Option
When repeated data items are sequenced, the
ASCENDING KEY or DESCENDING KEY option specifies
the order according to the values of data-name-2,
data-name-3, etc. This option can be included in
the OCCURS clause for use by the COBOL program; it
is not used by CDCS.

60485200 A

The data-names in the KEY option can be qualified.
D a ta -n a me -2 re fe re n ce s e i th e r th e e n try containing
the OCCURS clause or a subordinate entry in a
repeating group item. Data-name-3 and any addi
tional data-names specify entries subordinate to
the group item that contains the OCCURS clause.
If data-name-2 does not reference the entry con
taining the OCCURS clause, the following conditions
apply to the key data-names:
All items identified by the data-names must be
subordinate to the group item containing the
OCCURS clause.
N o n e o f t h e k e y d a t a - n a m e s c a n r eference an
item that contains an OCCURS clause.
No item between the entry containing the KEY
o p t i o n a n d t h e e n t r i e s i d e n t i fi e d b y t h e k e y
data-names can be described with an OCCURS
clause.
INDEXED BY Option
The INDEXED BY option is used when the entry con
taining the OCCURS clause or an item subordinate to
it is referenced by indexing. This option is
included only for use by the COBOL program; it is
not used by CDCS.
T h e i n d e x - n a m e s p e c i fi e d i n t h i s o p t i o n i s n o t
described anywhere else in the Record Division. It
is not data and cannot be associated with any data
h i e r a r c h y. T h e f o r m a t a n d a l l o c a t i o n o f t h e i n d e x name are hardware dependent. The index-name must
be unique; it cannot be qualified.

PICTURE Clause
The PICTURE clause describes the general character
istics of an elementary data item in terms of its
size and class. The location of an operational
sign or an assumed decimal point can also be indi
cated in the clause. The format of the PICTURE
clause is shown in figure 3-18.

( PICTURE )

|pic

|

IS picture-specification

Figure 3-18. PICTURE Clause Format,
COBOL Subschema
T h i s c l a u s e c a n b e s p e c i fi e d o n l y f o r e l e m e n t a r y
data items. It cannot be used with a level 66,
level 88, or index data item. PIC is the legal
abbreviation for PICTURE.
The class of a data item is determined by the type
o f c h a r a c t e r s i n t h e p i c t u r e - s p e c i fi c a t i o n . T h e
c h a r a c t e r s 9 , S , V, a n d P a r e u s e d t o d e s c r i b e
numeric data items. An alphabetic data item is
described by the character A. The pictures p e c i fi c a t i o n f o r a n a l p h a n u m e r i c d a t a i t e m
contains the character X or any combination of the
characters X, 9, and A.

3-15

The size of a data item is determined by the number
of 9, X, or A characters in the pictures p e c i fi c a t i o n . T h e c h a r a c t e r s S , V, a n d P a r e n o t
counted in determining the size. Consecutive
identical characters in the string can be specified
by a number in parentheses following the character.
For example: 99999999 is equivalent to 9(8),
XXXXXXXX is equivalent to X(8), and 9999AAAA is
equivalent to 9(4)A(4); each indicates a data item
with eight character positions.
The picture-specification can contain a maximum of
3 0 c h a r a c t e r s , i n c l u d i n g p a r e n t h e s e s ; h o w e v e r, a
pictured item can be larger. A pictures p e c i fi c a t i o n c o n t a i n i n g t h e c h a r a c t e r A r e p e a t e d
75 times is too long, but A(75) is a valid descrip
tion for a data item with 75 alphabetic characters.
Numeric data items can contain only 18 significant
digits; additional leading or trailing zeros for
d e c i m a l p o i n t a l i g n m e n t c a n b e s p e c i fi e d u p t o a
total of 30 characters.
When a PICTURE clause is specified with a USAGE
clause, the specifications must be compatible. For
example, COMP usage must have a numeric picture
s p e c i fi c a t i o n .

Alphabetic Data Items
The picture-spec i fi c a t i o n t o d e s c r i b e a n a l p h a b e t i c
data item can contain only the character A. The A
can be specified as many times as necessary as long
as the size of the item does not exceed 32767
characters.
The function of the characters in a PICTURE clause
p i c t u r e - s p e c i fi c a t i o n f o r a n a l p h a b e t i c d a t a i t e m
is as follows:
A E a c h A i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a character position that can contain
either a letter of the alphabet or a space
(blank).
Some typical alphabetic data items are shown in
figure 3-19.

PictureSoecification

Data Value

AAAAA or A{5)

COSTS

C 0

AAAA or A(4)

WXYZ

WX Y Z

Display Code
Stored

s

T

Figure 3-19. Alphabetic Data Items
Numeric Data Items
T h e p i c t u r e - s p e c i fi c a t i o n t o d e s c r i b e a n u m e r i c
data item can contain a combination of the char
a c t e r s 9 , S , V , a n d P. E a c h 9 r e p r e s e n t s a
s i g n i fi c a n t d i g i t ; a m a x i m u m o f 1 8 s i g n i fi c a n t
d i g i t s c a n b e s p e c i fi e d . T h e c h a r a c t e r P i s u s e d
to indicate leading or trailing zeros for decimal
point alignment. The combined number of positions
indicated by the characters 9 and P cannot exceed
30 characters.

3-16

Unsigned numeric data items consist of a combina
tion of the digits 0 through 9. In a signed
numeric data item, the minus sign is combined with
the rightmost digit in the item; the plus sign is
not carried in the number unless it already exists
in the data. The representation of the minus sign
in the rightmost digit is shown in figure 3-20.

Digit
Minus
Representation

Figure 3-20. Minus Sign Representation
The function of the characters in a PICTURE clause
picture-specification for a numeric data item is as
follows:
9 E a c h 9 i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a digit position that can contain a
n u m b e r. T h e 9 i s c o u n t e d i n d e t e r m i n i n g
the size of the data item.
The character S is used in the pictures p e c i fi c a t i o n t o i n d i c a t e t h a t t h e d a t a
i t e m h a s a n o p e r a t i o n a l s i g n . T h e S must
be the leftmost character in the pictures p e c i fi c a t i o n ; i t c a n n o t a p p e a r m o r e t h a n
once. The operational sign does not occupy
a character position in the data item and
is not counted in its size.
The character V is used in the pictures p e c i fi c a t i o n t o i n d i c a t e t h e p o s i t i o n o f
an assumed decimal point. A V as the
rightmost character in the pictures p e c i fi c a t i o n i s r e d u n d a n t . T h e V c a n n o t
appear more than once in the pictures p e c i fi c a t i o n . S i n c e t h e a s s u m e d d e c i m a l
point does not occupy a character position,
the V is not counted in the size of the
data item. An explicit decimal point is
valid in the schema but not in the sub
schema.
P T h e c h a r a c t e r P i n t h e p i c t u r e - s p e c i fi c a t i o n
indicates an assumed decimal scaling posi
tion. It is used to specify an assumed
decimal point when its position is not
within the number that appears in the data
item. If the assumed decimal point extends
beyond the rightmost digit, one P is speci
fi e d f o r e a c h i m p l i e d p o s i t i o n b e t w e e n t h e
rightmost digit and the assumed decimal
p o i n t . S i m i l a r l y, i f t h e a s s u m e d d e c i m a l
point extends beyond the leftmost digit,
o n e P i s s p e c i fi e d f o r e a c h i m p l i e d p o s i t
ion between the leftmost digit and the
assumed decimal point. Since the P indi
cates an assumed decimal point, a V in the
p i c t u r e s p e c i fi c a t i o n w o u l d b e r e d u n d a n t .
The character P is not counted in determin
i n g t h e s i z e o f t h e d a t a i t e m ; h o w e v e r, i t
is counted in determining the maximum
number of digit positions (30) in numeric
data items.
Some typical numeric data items are shown in figure
3-21.

60485200 A

/O^i^V

yf5H^»y

Picture-Specification

Data Value

Display Code Stored

999

123

1

2

3

99V999

12345

1

2

3

4

S99V99

+1234

1

2

3

+
4

PPP9999

.0001234

0

0

0

SPPP9999

-.0001234

0

0

0

S999PPP

-123000.

5

4

I

0

0

0

Figure 3-21. Numeric Data Items
Alphanumeric Data Items
T h e p i c t u r e - s p e c i fi c a t i o n t o d e s c r i b e a n a l p h a
numeric data item contains either a combination of
the characters 9, A, and X or only the character
X. The size of the data item cannot exceed 32767
characters.
The function of the characters 9 and A is the same
as for numeric and alphabetic data items; the
function of the character X is as follows:
X E a c h X i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a character position that can contain
any character in the DDL character set.
Some typical alphanumeric data items are shown in
figure 3-22.
REDEFINES Clause
The REDEFINES clause allows data to be described in
a n a l t e r n a t e f o r m a t . T h e r e d e fi n e d d a t a i t e m i s
given a new name; since it is still the same data
value, it occupies the same physical area in memory.
The REDEFINES clause is not used by CDCS; it can be
included in the subschema for use by the COBOL
application program. The format of the REDEFINES
clause is shown in figure 3-23.

level-number

data-name-1 REDEFINES data-name-2

Figure 3-23. REDEFINES Clause Format,
COBOL Subschema
NOTE
Refer to appendix F for recommendations on
the use of the REDEFINES clause.
T h i s c l a u s e c a n b e s p e c i fi e d f o r b o t h e l e m e n t a r y
and nonrepeating group data items. The level
number and size of data-name-1 and data-name-2 must
be identical. The REDEFINES clause cannot be used
with a level 01, level 66, or level 88 data item.
T h e d a t a d e s c r i p t i o n e n t r y f o r d a t a - n ame-2 cannot
contain an OCCURS clause. Data-name-2 can be
subordinate to an entry containing an OCCURS
clause, but data-name-2 cannot be subscripted or
i n d e x e d t o r e f e r e n c e a s p e c i fi c o c c u r r e n c e o f t h e
data item. Data-name-1 can be described as a
repeating data item as long as the total number of
character positions is equal to the number of
characters in data-name-2.

Pictu re-Spec i f icat i on

Data Value

XXXXXXXX or X(8)

ABCD-***

A B C D

- * »

XXXXXXXX or X(8)

123.4567

1 2 3

4 5 6

AAAA999

ABCD 123

A B C D 1 2 3

A(4}9(3)

ABCD 123

A B C D 1 2 3

Display Code Stored

Figure 3-22. Alphanumeric Data Items

60485200 A

3-17

Data-name-2 must not be qualified even if it is not
unique; data-name-2 can only refer to the previous
entry with the same level number. If the REDEFINES
clause is used for an elementary data item, no
e n t r i e s c a n b e s p e c i fi e d b e t w e e n t h e e n t r y r e f e r
enced by data-name-2 and the entry containing the
REDEFINES clause. If a group data item is being
r e d e fi n e d , o n l y s u b o r d i n a t e e n t r i e s c a n b e s p e c i
fied between the e n t r y r e f e r e n c e d b y d a t a - n a m e - 2
and the entry containing the REDEFINES clause.

LEFT
RIGHT
j L
-1

) SYNCHRONIZED )
|SYNC

Figure 3-25. SYNCHRONIZED Clause Format,
COBOL Subschema

M u l t i p l e r e d e fi n i t i o n s o f t h e s a m e d a t a i t e m a r e
allowed; data-name-2 in each entry must reference
t h e e n t r y t h a t o r i g i n a l l y d e fi n e d t h e d a t a i t e m .
Within the Procedure Division of the COBOL applica
tion program, the original data-name and the
redefined data-names can be used to reference the
data item.

SYNCHRONIZED LEFT places the leftmost character of
t h e d a t a i t e m i n t h e l e f t m o s t p o s i t i o n o f t h e fi r s t
word allocated to the data item. Subsequent char
acters are placed in successive positions to the
right. If more than one word is needed, consecu
tive words are allocated from left to right. The
unused portion of the last word is not available.

The use of the REDEFINES clause is illustrated in
figure 3-24.

SYNCHRONIZED RIGHT places the rightmost character
of the data item in the rightmost position of the
last word allocated to the data item. Preceding
characters are placed in successive positions to
the left. If more than one word is needed, conse
cutive words are allocated to the left. The unused
portion of the first word is not available.

SYNCHRONIZED Clause
The SYNCHRONIZED clause causes an elementary data
item to start or end on a word boundary within the
computer memory. The format of the SYNCHRONIZED
clause is shown in figure 3-25.
This clause can only be used in a data description
entry for an elementary data item. SYNC is the
legal abbreviation for SYNCHRONIZED. If neither
LEFT nor RIGHT is specified, LEFT is assumed and a
warning diagnostic is issued.
Data items are normally packed without regard for
machine words. The SYNCHRONIZED clause causes the
data item to be allocated as many whole computer
words as needed to contain the item. No other data
item can occupy any of the character positions
between the leftmost and rightmost word boundaries
of the words allocated to the data item. If the
data item does not use all the character positions
between the boundaries, the unused character posi
tions are included in:
The size of any group item to which the elemen
tary item belongs
The character positions redefined when the data
item is referenced in a REDEFINES clause

When a COBOL application program references a data
item that has been described with the SYNCHRONIZED
clause, the original size of the data item is used
in determining any action that depends on size.
The original size of the data item is the size
indicated in the PICTURE clause.
The operational sign in a data item that is synch
ronized appears in its normal position. The LEFT
or RIGHT option has no effect on the positioning of
the operational sign.
When an entry is described with both the
SYNCHRONIZED clause and the OCCURS clause, each
occurrence of the data item is synchronized. This
also applies to a synchronized item that is sub
ordinate to an entry containing the OCCURS clause.

USAGE Clause
The USAGE clause specifies the internal representa
tion of a data item in terms of the primary use of
the data item. The format of the USAGE clause is
shown in figure 3-26.

Schema

Subschema

Example 1
01 STOCK-NUM PICTURE *X<6)*.

03
03

STOCK-NUM PICTURE X(6).
STOCK-ID REDEFINES STOCK-NUM.
05 TYPE-ID PICTURE XX.
05 COLOR PICTURE X<4>.

02

CHARGE-ID REDEFINES CHARGE-NUM
PIC XX OCCURS 5 TIMES.

Example 2
02 CHARGE-NUM PICTURE v*X(10)#.

Figure 3-24. Redefining Data Items

3-18

60485200 A

COMPUTATIONAL
COMP
COMPUTATIONAL-1
USAGE IS

COMP-1
COMPUTATIONAL-2
COMP-2
DISPLAY
INDEX

Figure 3-26. USAGE Clause Format,
COBOL Subschema
This clause can describe a data item at any level.
W h e n t h e U S A G E c l a u s e i s s p e c i fi e d f o r a g r o u p
item, it applies to each subordinate item in the
group. The USAGE clause of an elementary item in a
group canno t co n tra d i ct th e U SAGE cl a u se o f th e
g r o u p i t e m . I f t h e U S A G E c l a u s e i s n o t s p e c i fi e d
for an elementary item or for any group to which
the elementary item belongs, DISPLAY is assumed.
COMP, COMP-1, and COMP-2 are legal abbreviations
f o r C O M P U TAT I O N A L , C O M P U TAT I O N A L - 1 , a n d
COMPUTATIONAL-2.
A d a t a i t e m d e s c r i b e d a s C O M P U TAT I O N A L ,
COMPUTATIONAL-1, or COMPUTATIONAL-2 must be numeric
w i t h a s i z e n o t e x c e e d i n g 1 8 s i g n i fi c a n t d i g i t s .
If a group item is described as computational, the
elementary items within the group are all computa
t i o n a l ; h o w e v e r, t h e g r o u p i t e m i t s e l f i s n o t
computational and cannot be used in computations.
When a PICTURE clause Is specified with a USAGE
clause, the specifications must be compatible.
COMPUTATIONAL Option
A COMPUTATIONAL data item has a decimal numeric
v a l u e . T h e P I C T U R E p i c t u r e - s p e c i fi c a t i o n c a n o n l y
contain the characters 9 (digit position), S
(operational sign), V (implied decimal point), and
P (assumed decimal scaling position).
COMPUTATIONAL-1 Option
The COMPUTATIONAL-1 format describes a fixed-point
i n t e g e r, w h i c h i s r e p r e s e n t e d i n t e r n a l l y a s a
4 8 - b i t b i n a r y i n t e g e r, r i g h t - a l i g n e d i n t h e w o r d .
A corresponding PICTURE clause must be numeric. If
a P I C T U R E c l a u s e i s n o t s p e c i fi e d , t h e d e f a u l t i s
PIC 9.
COMPUTATIONAL-2 Option
A COMPUTATIONAL-2 data item is stored as a normal
i z e d fl o a t i n g - p o i n t b i n a r y r e p r e s e n t a t i o n o f a
d e c i m a l n u m b e r. T h e d e c i m a l p o i n t l o c a t i o n i s
carried in the data item itself as a binary expo
nent. The data item is single-precision and is
stored in one computer word.

60485200 A

A corresponding PICTURE clause must be numeric. If
a P I C T U R E c l a u s e i s n o t s p e c i fi e d , t h e d e f a u l t i s
PIC 9.

DISPLAY Option
A D I S P L AY d a t a i t e m i s s t o r e d i n d i s p l a y c o d e
format. The data item can be alphabetic, numeric,
or alphanumeric. When no USAGE clause is associ
a t e d w i t h a d a t a i t e m , D I S P L AY i s t h e d e f a u l t
format.

INDEX Option
The USAGE IS INDEX clause specifies a data item
that is used with indexed tables. The index data
item contains a value that must correspond to an
occurrence number of a table element. It cannot be
a conditional variable (level 88 data item). The
INDEX option is not used by CDCS; it can be in
cluded in the subschema description for use by the
COBOL application program.
An index data item is an elementary item, one
computer word in length, and binary in format. Its
mode corresponds to an item described as
COMPUTATIONAL-1; the item must be numeric and must
not exceed 18 digits.
The SYNCHRONIZED, JUSTIFIED, and PICTURE clauses
cannot be used to describe a group or elementary
item that specifies USAGE IS INDEX.

RENAMES Clause
A level 66 data description entry uses the RENAMES
clause. This clause permits alternate grouping and
renaming of data items. The RENAMES clause is not
used by CDCS; it can be included in the subschema
description for use by the COBOL application pro
gram. The format of the RENAMES clause is shown in
fi g u r e 3 - 2 7 .
66

data-name-1 RENAMES data--name-2

(thru

)

\ — ~ ~ ? data-name-3
(THROUGH J

Figure 3-27. RENAMES Clause Format,
COBOL Subschema
This clause is always used in a level 66 entry. No
o t h e r c l a u s e c a n b e i n c l u d e d i n a l e v e l 6 6 e n t r y.
The RENAMES clause cannot be used to rename another
l e v e l 6 6 e n t r y o r a l e v e l 8 8 e n t r y. T H R U i s t h e
legal abbreviation for THROUGH.
More than one level 66 entry can rename the same
data item. Level 66 entries must be the last
e n t r i e s d e fi n e d i n a r e c o r d . N o e n t r y c a n b e s u b
ordinate to a level 66 entry.

3-19

D a t a - n a m e - 1 c a n n o t b e u s e d a s a q u a l i fi e r ; d a t a n a m e - 2 a n d d a t a - n a m e - 3 c a n b e q u a l i fi e d . T h e
entries referred to by data-name-2 and data-name-3
cannot be described with the OCCURS clause or be
subordinate to an entry described with the OCCURS
clause. When the THRU option is included, none of
t h e d a t a i t e m s w i t h i n t h e s p e c i fi e d r a n g e c a n b e
variable-occurrence data items. Data-name-2 and
data-name-3 must be names of elementary items or
groups of elementary items. Data-name-3 cannot be
the same name as data-name-2 or subordinate to
data-name-2.
The THRU option is used to rename a series of
consecutive elementary or group items. Data-name-1
Is a group item that includes all elementary items
beginning with data-name-2 (or the first elementary
Item if it is a group Item) and ending with dataname-3 (or the last elementary item if it is a
group item).
If the THRU option is not used, data-name-1 can be
either an elementary item or a group item. Dataname-1 is an elementary item if data-name-2 is an
elementary item or a group item if data-name-2 is a
group item.
The use of the RENAMES clause is illustrated in
figure 3-28.

VALUE Clause
Th e VA L U E c l a u s e s p e c i fi e s th e v a l u e s a s s ociated
with a condition name. It is used in a level 88
d a t a d e s c r i p t i o n e n t r y. T h e VA L U E c l a u s e i s n o t
used by CDCS; it can be included in the subschema
description for use by the COBOL application pro
gram. The format of the VALUE clause is shown in
fi g u r e 3 - 2 9 .
This clause defines one or more values or ranges of
values for a condition-name. It is always used in
a level 88 entry and is the only clause that can be
used in a level 88 entry. THRU is the legal abbre
viation for THROUGH. The THRU option is used to
specify a range of values. Literals that specify a
range must appear in ascending order.
The condition-name is the name assigned to the
values an item can assume. The following rules
apply to a condition-name and its associated VALUE
clause:
The condition-name can describe only an elemen
tary data item; the name cannot be used to
describe a repeating group or renamed item.
The condition-name must immediately follow the
data item to which it refers.

Schema

Subschema

01
01
01

JANUARY PICTURE * X < 3 1 ) . * .
FEBRUARY PICTURE #X<29).«.
MARCH
PICTURE * X < 3 ] ) * .

01

DECEMBER PICTURE * X < 3 1 > * .

03 CURRENT-YEAR.
05 JANUARY PICTURE X<31).
05 FEBRUARY PICTURE X(29).

05
66
66
66

.
8 8 L 8 B VA L U E A L L
88 L881 VALUE ALL
88 L882 VALUE ALL
88 L883 VALUE ALL

*ABC*.
SPACES.
HIGH-VALUES.
LOW-VALUES.

Figure 3-31. Examples of Valid Level 88
Figurative Constants

RECORD DIVISION,
QUERY UPDATE SUBSCHEMA
The Record Division immediately follows the Realm
D i v i s i o n . I t s p e c i fi e s t h e r e c o r d t y p e t o b e m a d e
available to a Query Update application program and
describes the format of the data in each record
type. The format of the Record Division is as
follows:
RECORD DIVISION.
{ r e c o r d d e s c r i p t i o n e n t r y. }
T h e r e c o r d s w i t h i n t h e r e a l m s s p e c i fi e d i n t h e
Realm Division are described in the Record Divi
sion. Only those records that are to be used by
the Query Update programs are included. The record
description entry consists of a series of state
ments (data description entries) that describe the
data as it is used by the Query Update programs.
T h e fi r s t d a t a d e s c r i p t i o n e n t r y m u s t b e l e v e l
n u m b e r 0 1 , t h e r e c o r d n a m e e n t r y. S u b s e q u e n t
entries begin with level numbers 02 through 49 for
group and elementary data items, level number 66
for renaming a data item, and level number 88 for
d e fi n i n g v a l u e s t o b e a s s o c i a t e d w i t h a c o n d i t i o n .
The formats for data description entries are shown
i n fi g u r e 3 - 3 2 .
60485200 A

/*®%v

01

I n n o r m a l p o s i t i o n i n g , t h e d a t a i t em is aligned
at the leftmost character position and trun
cated at the right.

record-name

Format 1

I f t h e J U S T I F I E D c l a u s e i s s p e c i fi e d , t h e d a t a
item is aligned at the rightmost character
position and truncated at the left.

level-number data-name
[JUSTIFIED clause]

W h e n t h e r e c e i v i n g fi e l d c o n t a i n s m o r e c h a r a c t e r
positions than the data item, positioning is as
follows:

[OCCURS clause]
[PICTURE clause]

In normal positioning, the data item is aligned
at the leftmost character position and blank
fi l l e d a t t h e r i g h t .

[REDEFINES clausel
[SYNCHRONIZED clause]

I f t h e J U S T I F I E D c l a u s e i s s p e c i fi e d , t h e d a t a
item is aligned at the rightmost character
p o s i t i o n a n d b l a n k fi l l e d a t t h e l e f t .

[USAGE clause] .

Format 2

R e f e r t o fi g u r e 3 - 1 6 f o r e x a m p l e s o f c h a r a c t e r
positioning.

66 data-name
RENAMES clause.

OCCURS Clause
The OCCURS clause is used to indicate a repeated
data item where all occurrences of the data item
are identical in every respect except value. The
data item can be an elementary item or a group
item. The format of the OCCURS clause is shown in
fi g u r e 3 - 3 4 .

Figure 3-32. Formats of Data Description
Entries, Query Update Subschema

JUSTIFIED Clause

r

T h e J U S T I F I E D c l a u s e s p e c i fi e s n o n s t a n d a r d p o s i
t i o n i n g o f d a t a w i t h i n a r e c e i v i n g fi e l d . T h e
format of the JUSTIFIED clause is shown in figure
3-33.

JUSTIFIED
JUST

RIGHT

Figure 3-33. JUSTIFIED Clause Format,
Query Update Subschema
T h i s c l a u s e c a n b e s p e c i fi e d o n l y f o r n o n n u m e r i c
elementary d a ta i te m s . J U S T i s th e l e g a l a b b r e v i
ation for JUSTIFIED.
The JUSTIFIED clause overrides the normal position
i n g o f d a t a w h e n t h e s i z e o f t h e r e c e i v i n g fi e l d
does not equal the number of characters in the data
i t e m . W h e n t h e r e c e i v i n g fi e l d c o n t a i n s f e w e r
character positions than the data item, positioning
occurs as follows:

NOTE
Refer to appendix F for recommendations on
the use of repeating groups.
A data description entry with format 1 of the
OCCURS clause can be subordinate to another entry
with either format of the OCCURS clause. An entry
with format 2 cannot be subordinate to an entry
with the OCCURS clause. Up to three levels of
nested data items can be specified with the OCCURS
clause. When repeating groups and vectors are
nested, the vector is considered to be a repeating
group and is included in the level count. The
O C C U R S c l a u s e m u s t n o t b e s p e c i fi e d i n a d a t a
description that has level number 66.
Integer-1 and integer-2 must be positive numbers.
In format 2, integer-2 must be greater than
integer-1. The value of integer-1 can be zero;
integer-2 must never be zero.
An elementary data item described with the OCCURS
clause must also be described with the PICTURE or
USAGE clause. A group data item cannot be described
with both the OCCURS clause and the PICTURE clause.

Format 1
OCCURS integer--2 TIMES
Format 2
OCCURS i n t e g e r --1

IP-

integer--2 TIMES DEPENDING ON data-■name-1

Figure 3-34. OCCURS Clause Format, Query Update Subschema

60485200 A

3-23

When an item occurs a fixed number of times, format
1 is used and integer-2 specifies the exact number
of occurrences. When an Item occurs a variable
number of times, format 2 is used and the number of
occurrences for each record is determined as
follows:
Integer-1 represents the minimum number of
occurrences.
Integer-2 represents the maximum number of
occurrences.
Data-name-1 references a data item whose cur
rent value represents the number of occurrences.
The value of data-name-1 must be a positive
value within the range of integer-1 through
integer-2.
In format 2, data-name-1 names an elementary item
that is unique or can be made unique by qualifica
tion. It cannot be subscripted and it should not
be described as COMPUTATIONAL-2. The size of the
data item cannot exceed six characters. The
elementary data item must precede the group data
item that references it.
A data item that occurs a variable number of times
must be the last item in a record description
e n t r y. T h e d a t a d e s c r i p t i o n e n t r y t h a t c o n t a i n s
the OCCURS clause can only be followed by subordi
nate entries.
If the OCCURS clause is used with a group data
item, any data-name belonging to the group must be
referenced by subscripting or indexing whenever it
is used as an operand, unless the data-name is the
object of a REDEFINES clause. Other clauses speci
fied with the OCCURS clause apply to each occur
rence of the data item.

The size of a data item is determined by the number
of 9, X, or A characters in the pictures p e c i fi c a t i o n . T h e c h a r a c t e r s S , V, a n d P a r e n o t
counted in determining the size. Consecutive
i d e n t i c a l c h a r a c t e r s i n t h e s t r i n g c a n b e s p e c i fi e d
by a number in parentheses following the char
a c t e r. F o r e x a m p l e : 9 9 9 9 9 9 9 9 i s e q u i v a l e n t t o
9(8), XXXXXXXX is equivalent to X(8), and 9999AAAA
is equivalent to 9(4)A(4); each indicates a data
item with eight character positions.
The picture-specification can contain a maximum of
3 0 c h a r a c t e r s , i n c l u d i n g p a r e n t h e s e s ; h o w e v e r, a
pictured item can be larger. A pictures p e c i fi c a t i o n c o n t a i n i n g t h e c h a r a c t e r A r e p e a t e d
75 times is too long, but A(75) is a valid descrip
tion for a data item with 75 alphabetic characters.
Numeric data items can contain 18 digits, 14 of
w h i c h a r e s i g n i fi c a n t ; a d d i t i o n a l l e a d i n g o r
trailing zeros for decimal point alignment can be
specified up to a total of 30 characters.
When a
cl a u se ,
example,
picture

PICTURE clause is specified with a USAGE
th e sp e ci fica ti o n s mu st b e co mp a ti b l e. For
COMPUTATIONAL usage must have a numeric
s p e c i fi c a t i o n .

The application of format and punctuation to a
numeric source data item at the time it is dis
played is called editing. Editing characters are
insertion characters or replacement characters.
The displayed format is referred to as a report
item rather than as a source data item. Insertion
and replacement characters are not included in the
size of a numeric source item. Insertion and
replacement characters must be included in the size
of a report item.

Alphabetic Data Items

PICTURE Clause
The PICTURE clause describes the general character
istics of an elementary data item in terms of its
size and class. The location of an operational
sign or an assumed decimal point can also be indi
cated in the clause. The format of the PICTURE
clause is shown in figure 3-35.

T h e p i c t u r e - s p e c i fi c a t i o n t o d e s c r i b e a n a l p h a b e t i c
data item can contain only the character A. The A
can be specified as many times as necessary as long
as the size of the item does not exceed 32767
characters.
The function of the characters in a PICTURE clause
p i c t u r e - s p e c i fi c a t i o n f o r a n a l p h a b e t i c d a t a i t e m
is as follows:
A E a c h A i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a character position that can contain
either a letter of the alphabet or a space
(blank).

Figure 3-35. PICTURE Clause Format,
Query Update Subschema
T h i s c l a u s e c a n b e s p e c i fi e d o n l y f o r e l e m e n t a r y
data items. It cannot be used with a level 66 or
index data Item. PIC is the legal abbreviation for
PICTURE.
The class of a data item is determined by the type
o f c h a r a c t e r s i n t h e p i c t u r e - s p e c i fi c a t i o n . T h e
c h a r a c t e r s 9 , S , V, a n d P a r e u s e d t o d e s c r i b e
numeric data items. An alphabetic data item is
described by the character A. The pictures p e c i fi c a t i o n f o r a n a l p h a n u m e r i c d a t a i t e m c o n
tains the character X or any combination of the
characters X, 9, and A.

3-24

R e f e r t o fi g u r e 3 - 1 9 f o r e x a m p l e s o f a l p h a b e t i c
data items.

Numeric Data Items
T h e p i c t u r e - s p e c i fi c a t i o n t o d e s c r i b e a n u m e r i c
data item can contain a combination of the char
a c t e r s 9 , S , V , a n d P. E a c h 9 r e p r e s e n t s a
s i g n i fi c a n t d i g i t ; a m a x i m u m o f 1 8 d i g i t s c a n b e
s p e c i fi e d ( o n l y 1 4 d i g i t s a r e s i g n i fi c a n t ) . T h e
character P is used to indicate leading or trailing
zeros for decimal point alignment. The combined
number of positions indicated by the characters 9
and P cannot exceed 30 characters.

60485200 A

/^-&%\

Unsigned numeric data items consist of a combina
tion of the digits 0 through 9. In a signed
numeric data item, the minus sign is combined with
the rightmost digit in the item; the plus sign is
not carried in the number unless it already exists
in the data. The representation of the minus sign
in the rightmost digit is shown in figure 3-20.
The function of the characters in a PICTURE clause
picture-specification for a numeric data item is as
follows:

The function of the characters 9 and A is the same
as for numeric and alphabetic data items; the func
tion of the character X is as follows:
X E a c h X i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a character position that can contain
any character in the DDL character set.
R e f e r t o fi g u r e 3 - 2 2 f o r e x a m p l e s o f a l p h a n u m e r i c
data items.
Insertion Characters

9 E a c h 9 i n t h e p i c t u r e - s p e c i fi c a t i o n r e p r e
sents a digit position that can contain a
n u m b e r. T h e 9 i s c o u n t e d i n d e t e r m i n i n g
the size of the data item.
S The character S is used in the pictures p e c i fi c a t i o n t o i n d i c a t e t h a t t h e d a t a
item h a s a n o p e r a t i o n a l s i g n . T h e S m u s t
be the leftmost character in the pictures p e c i fi c a t i o n ; i t c a n n o t a p p e a r m o r e t h a n
once. The operational sign does not occupy
a character position in the data item and
is not counted in its size.
V The character V is used in the pictures p e c i fi c a t i o n t o i n d i c a t e t h e p o s i t i o n o f
an assumed decimal point. A V as the
rightmost character in the pictures p e c i fi c a t i o n i s r e d u n d a n t . T h e c h a r a c t e r
V cannot appear more than once in the
p i c t u r e - s p e c i fi c a t i o n . S i n c e t h e a s s u m e d
decimal point does not occupy a character
position, the V is not counted in the size
of the data item. An explicit decimal
point is valid in the schema, but it is not
valid in the subschema.
P T h e c h a r a c t e r P i n t h e p i c t u r e - s p e c i fi c a t i o n
indicates an assumed decimal scaling posi
tion. It is used to specify an assumed
decimal point when its position is not
within the number that appears in the data
item. If the assumed decimal point extends
beyond the rightmost digit, one P is speci
fied f o r e a c h i m p l i e d p o s i t i o n b e t w e e n t h e
rightmost digit and the assumed decimal
p o i n t . S i m i l a r l y, i f t h e a s s u m e d d e c i m a l
point extends beyond the leftmost digit,
o n e P i s s p e c i fi e d f o r e a c h i m p l i e d p o s i
tion between the leftmost digit and the
assumed decimal point. Since the character
P indicates an assumed decimal point, the
c h a r a c t e r V i n t h e p i c t u r e - s p e c i fi c a t i o n
would be redundant. The character P Is not
counted in determining the size of the data
item; however, it is counted in determining
the maximum number of digit positions (30)
in numeric data items.
Refer to figure 3-21 for examples of numeric data
i terns.

Alphanumeric Data Items
T h e p i c t u r e - s p e c i fi c a t i o n t o d e s c r i b e a n a l p h a
numeric data item contains either a combination of
the characters 9, A, and X or only the character
X. The size of the data item cannot exceed 32767
characters.
60485200 A

Insertion characters in the picture of an item
appear in the edited data item and are counted in
the size of the report item. A maximum of 63 char
acters is allowed. Insertion characters for the
PICTURE clause are as follows:
$ A s i n g l e d o l l a r s i g n s p e c i fi e d a s t h e l e f t
most symbol in an item picture appears as
the leftmost character in a report item.
+ A p l u s s i g n s p e c i fi e d a s t h e fi r s t o r l a s t
symbol in an item picture is inserted in
the indicated character position of the
r e p o r t i t e m i f t h e d a t a c o n t a i n s a p o s i ti v e
operational sign or is unsigned. If the
data is negative, a minus sign is inserted
in the indicated character position.
- A m i n u s s i g n s p e c i fi e d a s t h e fi r s t o r l a s t
symbol in an item picture is inserted in
the indicated character position of the
report item if the data contains a negative
operational sign. If the data is positive,
a blank is inserted in the indicated char
acter position.
A period is used in a report item picture
to represent a decimal point. When it is
used, a decimal point appears in the report
item as a character in the indicated char
acter position.
, A comma used in the picture of an item is
inserted in the corresponding character
position of the report item.
/ A slash used in the picture of an item is
inserted in the corresponding character
position of the report item.
0 A zero used in the picture of an item is
inserted in the corresponding character
position of the report item.
B The character B used in the picture of an
item causes a blank to be inserted in the
corresponding character position of the
report item.
CR The CR symbol represents credit and can be
s p e c i fi e d o n l y a t t h e r i g h t m o s t p o s i t i o n o f
the picture of an item. The symbol is
inserted in the last two character posi
tions of the report item if the data
contains a negative operational sign. If
the data is positive or unsigned, the last
two character positions are set to blanks.
Since the credit symbol always results in
two characters - CR or blanks - it is
included as two characters in the size of
the report item.
3-25

an assumed or actual decimal point sup
pressed unless the value of the data is
zero and all character positions in the
item are described by a Z. In this special
case, even the actual decimal point is
suppressed and the edited item is all
blanks.

DB The DB symbol represents debit and can be
s p e c i fi e d o n l y a t t h e r i g h t m o s t p o s i t i o n o f
the picture of an item. The debit symbol
has the same result as the credit symbol.
Examples of insertion characters
fi g u r e 3 - 3 6 .

are shown in

If a $ + or - precedes the Z characters, it
is inserted in the far left character
position of the item even if succeeding
zeros in the item are suppressed. In the
special case where the value of the data is
zero and all the character positions fol
lowing the $ + or - are Zs, the $ + or - is
replaced by blanks.

Replacement Characters
A replacement character in the picture of an item
suppresses leading zeros in the source data and
r e p l a c e s t h e m w i t h t h e s p e c i fi e d c h a r a c t e r o r a
blank in the report item. Only one type of
replacement character can be used in a picture.
Replacement characters for the PICTURE clause are
as follows:

If a comma, zero, or B is encountered
before zero suppression terminates, the
character is not inserted in the edited
d a t a i t e m . R a t h e r, t h e c h a r a c t e r i s s u p
pressed and a blank is inserted in its
place.

Z O n e c h a r a c t e r Z I s s p e c i fi e d a s t h e l e f t
most symbol in an item picture for each
leading zero to be suppressed and replaced
by blanks. The character Z can be preceded
by one of the insertion characters and
interspersed with any of the insertion
characters decimal point, comma, zero, or B.

* The asterisk causes leading zeros to be
replaced by an asterisk instead of a
b l a n k . I t i s s p e c i fi e d i n t h e s a m e w a y a s
the editing character Z and follows the
same rules, except an actual decimal point
is not replaced by an asterisk when the
value of the data is zero.

No zeros are suppressed to the right of the
fi r s t n o n z e r o d i g i t w h e t h e r a Z i s p r e s e n t
or not, nor are any zeros to the right of

Picture-Specification

Data Value

Displayed Item

S99

48

$

$99.99

4834
t
4834

$|4|8| .| 3~]~4|

+ 2

+999

292
+
292

|+|2|9|2

+999

292

1 - I 21 9 I 2

999-

292

|2|9|2|-

-999

292

999-

292

SBB999.99

24321

$00999.99

24321
t
1134
t
1134
t
2376
t
2376

9,999
+999

99.99CR
99.99CR
99.99DB '
99.99DB

t

4 8

4 r 8 3 4

•* 2
|2|9|2|A

$

a A

2|4 3 .

$|0|0|2|4|3| .| 2| 1
1 1

.

3 4 C R

1 1 . 3
2 3

.

7

2 3

.

7

£t\ £t

t
Figure 3-36. Examples of Insertion Characters

3-26

60485200 A

$ When the dollar sign is used as a replace
ment character to suppress leading zeros,
i t a c t s a s a fl o a t i n g s i g n a n d i s i n s e r t e d
d i r e c t l y p r e c e d i n g t h e fi r s t n o n s u p p r e s s e d
c h a r a c t e r. O n e m o r e d o l l a r s i g n t h a n t h e
number of zeros to be suppressed must be
s p e c i fi e d . T h i s d o l l a r s i g n i s a l w a y s
present in the edited data whether or not
any zero suppression occurs. The remaining
dollar signs act in the same way as the Z
characters to suppress leading zeros.

negative; a blank is placed in this posi
tion if the edited data is positive or
unsigned.
Examples of replacement characters are shown in
figure 3-37. Examples of picture editing are shown
i n fi g u r e 3 - 3 8 .
Picture-

+ When a plus sign is used as a replacement
c h a r a c t e r, i t i s a fl o a t i n g s i g n . T h e p l u s
s i g n i s s p e c i fi e d o n e m o r e t i m e t h a n t h e
number of leading zeros to be suppressed.
It functions in the same way as the float
ing dollar sign. A plus sign is placed
d i r e c t l y p r e c e d i n g t h e fi r s t n o n s u p p r e s s e d
character if the edited data is positive or
unsigned; a minus sign is placed in this
position if the edited data is negative.

Data

ZZZ.999.99

12345

Z99.999.99

!234

SZZZ.ZZ9.99

N

1

123

2

0

|

ZZZ99

00923

ZZZZ.ZZ

oooooo

A|A|A|A|A|A|A

S**\99

00923
1
000824
t
00526
1
3265
1

S|-|'|9|.|2|3

9.99
SSS.99

A|A|S|8|.|2|4
A

A

.k
S|3|2|.|6|.|

Figure 3-37. Examples of Replacement
Characters

,

|o|

,

Displayed

|
|

t
|a]a|a|a|

|$

00923

Va l u e

|

|A|

ZZ999

SSS9.99

When a minus sign is used as a replacement
c h a r a c t e r , I t i s a fl o a t i n g s i g n . T h e
minus sign is specified one more time than
the number of leading zeros to be sup
pressed. It functions in the same way as
t h e fl o a t i n g p l u s s i g n . A m i n u s s i g n i s
p l a c e d d i r e c t l y p r e c e d i n g t h e fi r s t n o n suppressed character If the edited data is

P i c t u r e - S p e c i fi c a t i o n

Displayed Item

S p e c i fi c a t i o n D a t a V a l u e

3|

4

0|

|

5|

|

2

.

|

.

|

2|

1

A|

A|

Item

11

.

|

0|

0

|

3|

4

3

|

t
SZZZ.ZZZ.99

12

$

A

A

A

A

t
$•••.••9.99

1234

$|*|"

$•••.•••.99

A|a|A

.

,
'I'

2

3

4

2

'1°

123456

S - V. A 9

1

,
°

$12|3,|456.00

123

I$|-|-|-|-I'|-Il|.|2|3|

/(S*^\
+999.999

12

-ZZZ.ZZZ

|

+

12

|0

|-

A

0

A

SZZZ.ZZ9.99CR
$ZZZ.ZZ9.99DB

0

,

0|

A

1

A|A|

1

123456
123

S

A

A
t

$(4).SS9.99
S(4).SS.99

A|A

gg

2

$123,456.00CR
A

A

1

.

1234
t
AAAAAAA$

0000

2

12

2

3

A

A

AAAA$123.40
.

00

AAAAAAA-.

12

t

BBBB.BBB.99

12

N^W

a|a|a|a|a|

.

|

11

2

|

t
SSSS.SZZ.99
S99.99

12
12

illegal
illegal

picture
picture

/ f fi f ^ N y

Figure 3-38. Examples of Picture Editing
60485200 A

3-27

REDEFINES Clause
The REDEFINES clause allows data to be described in
a n a l t e r n a t e f o r m a t . T h e r e d e fi n e d d a t a i t e m I s
given a new name; since it is still the same data
value, it occupies the same physical area in
memory. The REDEFINES clause is not used by CDCS;
it can be included in the subschema for use by the
Query Update application program. The format of
the REDEFINES clause Is shown in figure 3-39.

level-number data-name-1 REDEFINES data-name-2

Figure 3-39. REDEFINES Clause Format,
Query Update Subschema
NOTE
Refer to appendix F for recommendations on
the use of the REDEFINES clause.
T h i s c l a u s e c a n b e s p e c i fi e d f o r b o t h e l e m e n t a r y
and nonrepeating group data items. The level
number and size of data-name-1 and data-name-2 must
be identical. The REDEFINES clause cannot be used
with a level 01 or level 66 data Item.
The data description entry for data-name-2 cannot
contain an OCCURS clause. Data-name-2 can be sub
ordinate to an entry containing an OCCURS clause,
but data-name-2 cannot be subscripted or indexed to
r e f e r e n c e a s p e c i fi c o c c u r r e n c e o f t h e d a t a i t e m .
Data-name-1 can be described as a repeating data
item as long as the total number of character
positions is equal to the number of characters in
data-name-2.
Data-name-2 must not be qualified even if it is not
unique; data-name-2 can only refer to the previous
entry with the same level number. If the REDEFINES
clause is used for an elementary data item, no
e n t r i e s c a n b e s p e c i fi e d b e t w e e n t h e e n t r y r e f e r
enced by data-name-2 and the entry containing the
REDEFINES clause. If a group data item is being
r e d e fi n e d , o n l y s u b o r d i n a t e e n t r i e s c a n b e s p e c i
fied between the e n t r y r e f e r e n c e d b y d a t a - n a m e - 2
and the entry containing the REDEFINES clause.
M u l t i p l e r e d e fi n i t i o n s o f t h e s a m e d a t a i t e m a r e
allowed; data-name-2 in each entry must reference
t h e e n t r y t h a t o r i g i n a l l y d e fi n e d t h e d a t a i t e m .
Within the Query Update application program, the
original data-name and the redefined data-names can
be used to reference the data item.
Refer to figure 3-24 for examples of the use of the
REDEFINES clause.

( synchronized)
(SYNC

Figure 3-40. SYNCHRONIZED Clause Format,
Query Update Subschema
This clause can only be used in a data description
entry for an elementary data item. SYNC is the
legal abbreviation for SYNCHRONIZED. If neither
LEFT nor RIGHT is specified, LEFT is assumed and a
warning diagnostic is issued.
Data items are normally packed without regard for
machine words. The SYNCHRONIZED clause causes the
data item to be allocated as many whole computer
words as needed to contain the item. No other data
item can occupy any of the character positions
between the leftmost and rightmost word boundaries
of the words allocated to the data item. If the
data item does not use all the character positions
between the boundaries, the unused character posi
tions are included in:
The size of any group item to which the elemen
tary item belongs
The character positions redefined when the data
item is referenced in a REDEFINES clause
SYNCHRONIZED LEFT places the leftmost character of
t h e d a t a i t e m i n t h e l e f t m o s t p o s i t i o n o f t h e fi r s t
word allocated to the data item. Subsequent char
acters are placed in successive positions to the
right. If more than one word is needed, consecu
tive words are allocated from left to right. The
unused portion of the last word is not available.
SYNCHRONIZED RIGHT places the rightmost character
of the data item in the rightmost position of the
last word allocated to the data item. Preceding
characters are placed in successive positions to
the left. If more than one word is needed, conse
cutive words are allocated to the left. The unused
p o rti o n o f th e first w o rd i s n o t a va i l a b l e .
When a Query Update application program references
a data item that has been described with the
SYNCHRONIZED clause, the original size of the data
item is used in determining any action that depends
on size. The original size of the data item is the
size indicated in the PICTURE clause.
The operational sign in a data item that is synch
ronized appears in its normal position. The LEFT
or RIGHT option has no effect on the positioning of
the operational sign.
When an entry is described with both the SYNCHRO
NIZED clause and the OCCURS clause, each occurrence
of the data item is synchronized. This also
applies to a synchronized item that is subordinate
to an entry containing the OCCURS clause.

SYNCHRONIZED Clause

USAGE Clause

The SYNCHRONIZED clause causes an elementary data
item to start or end on a word boundary within the
computer memory. The format of the SYNCHRONIZED
clause is shown in figure 3-40.

The USAGE
tation of a
of the data
is shown in

3-28

)

LEFT 1
RIGHT J

clause specifies the internal represen
data item In terms of the primary use
item. The format of the USAGE clause
figure 3-41.

60485200 A

y^3^V

COMPUTATIONAL
COMP
COMPUTATIONAL-1
COMP-1
USAGE is

COMPUTATIONAL-2
COMP-2
DISPLAY
INDEX
DOUBLE
LOGICAL
COMPLEX

Figure 3-41. USAGE Clause Format,
Query Update Subschema
This clause can describe a data item at any level.
W h e n t h e U S A G E c l a u s e i s s p e c i fi e d f o r a g r o u p
item, it applies to each subordinate item in the
group. The USAGE clause of an elementary item in a
group cannot contradict the USAGE clause of the
g r o u p i t e m . I f t h e U S A G E c l a u s e i s n o t s p e c i fi e d
for an elementary item or for any group to which
the elementary item belongs, DISPLAY is assumed.
COMP, COMP-1, and COMP-2 are legal abbreviations
f o r C O M P U TAT I O N A L , C O M P U TAT I O N A L - 1 , a n d
COMPUTATIONAL-2.
A d a t a i t e m d e s c r i b e d a s C O M P U TAT I O N A L ,
COMPUTATIONAL-1, or COMPUTATIONAL-2 must be numeric
with a size not exceeding 18 digits. If a group
item is described as computational, the elementary
items within the group are all computational; how
e v e r, t h e g r o u p i t e m i t s e l f i s n o t c o m p u t a t i o n a l
and cannot be used in computations.

d e c i m a l n u m b e r. T h e d e c i m a l p o i n t l o c a t i o n i s
carried in the data item itself as a binary expo
nent. The data item is single precision and is
stored in one computer word.
A corresponding PICTURE clause must be numeric and
can include editing characters. If a PICTURE
clause is not specified, the default is PIC 9.
DISPLAY Option
A D I S P L AY d a t a i t e m i s s t o r e d i n d i s p l a y c o d e
format. The data item can be alphabetic, numeric,
or alphanumeric. When no USAGE clause is associ
a t e d w i t h a d a t a i t e m , D I S P L AY i s t h e d e f a u l t
format.
INDEX Option
The USAGE IS INDEX clause specifies a data item
that is used with indexed tables. The index data
item contains a value that must correspond to an
occurrence number of a table element. The INDEX
option Is not used by CDCS; it can be included in
the subschema description for use by the Query
Update application program.
An index data item is an elementary item, one
computer word in length, and binary in format. Its
mode corresponds to an item described as
COMPUTATIONAL-1; the item must be numeric and must
not exceed 18 digits.
The SYNCHRONIZED, JUSTIFIED, and PICTURE clauses
cannot be used to describe a group or elementary
item that specifies USAGE IS INDEX.

DOUBLE Option
When a PICTURE clause is specified with a USAGE
clause, the specifications must be compatible.
COMPUTATIONAL Option
A COMPUTATIONAL data item has a decimal numeric
v a l u e . T h e P I C T U R E p i c t u r e - s p e c i fi c a t i o n c a n
contain the characters 9 (digit position), S
(operational sign), V (implied decimal point), and
P (assumed decimal scaling position); editing
characters can also be included.
COMPUTATIONAL-1 Option
The COMPUTATIONAL-1 format describes a fixed-point
I n t e g e r, w h i c h i s r e p r e s e n t e d i n t e r n a l l y a s a
4 8 - b i t b i n a r y i n t e g e r, r i g h t - a l i g n e d i n t h e w o r d .
A corresponding PICTURE clause must be numeric and
can include editing characters. If a PICTURE
clause is not specified, the default is PIC 9.
COMPUTATIONAL-2 Option
A COMPUTATIONAL-2 data item is stored as a normal
i z e d fl o a t i n g - p o i n t b i n a r y r e p r e s e n t a t i o n o f a

60485200 A

A DOUBLE data item is stored as a normalized
fl o a t i n g - p o i n t n u m b e r t h a t o c c u p i e s t w o c o m p u t e r
words. The data item can be 29 digits.
A corresponding PICTURE clause must be numeric and
can include editing characters. If a PICTURE
clause is not specified, the default is PIC 9.
LOGICAL Option
A LOGICAL data item assumes only the values true or
false. When this option is selected, Query Update
displays the true/false condition rather than the
value of the described data. A corresponding
PICTURE clause must be numeric.
COMPLEX Option
A COMPLEX data item is an ordered pair of signed or
u n s i g n e d r e a l c o n s t a n t s ; t h e fi r s t r e p r e s e n t s t h e
real part of the complex number and the second
represents the imaginary part of the complex number.
A corresponding picture clause must be numeric and
can include editing characters. If a PICTURE
clause is not specified, the default is PIC 9.

3-29

RENAMES Clause
A level 66 data description entry uses the RENAMES
clause. This clause permits alternate grouping and
renaming of data items. The RENAMES clause is not
used by CDCS; it can be included in the subschema
description for use by the Query Update application
program. The format of the RENAMES clause is shown
in figure 3-42.

66 data-name-1 RENAMES data-name-2
|"(THRU
)
J
/]
| < \ data-name-3

[(THROUGH

j

J

q u a l i fi c a t i o n c r i t e r i a t h a t m u s t b e s a t i s fi e d b y
records that are to be returned to the application
programs from the data base. The format of the
Relation Division Is as follows:

The relation description entry is a statement
consisting of the RN and RESTRICT clauses that
specify the relation name and the record qualifica
tion restrictions. Each relation description entry
i d e n t i fi e s o n e r e l a t i o n .

RN Clause
The RN clause specifies the name of the relation.
I t m u s t b e t h e fi r s t c l a u s e i n t h e r e l a t i o n
d e s c r i p t i o n e n t r y. T h e f o r m a t o f t h e R N c l a u s e i s
shown in figure 3-43.

This clause is always used in a level 66 entry. No
other clause can be included in a level 66 entry.
The RENAMES clause cannot be used to rename another
level 66 entry. THRU is the legal abbreviation for
THROUGH.

RN IS relation-name

D a t a - n a m e - 1 c a n n o t b e u s e d a s a q u a l i fi e r ; d a t a n a m e - 2 a n d d a t a - n a m e - 3 c a n b e q u a l i fi e d . T h e
entries referred to by data-name-2 and data-name-3
cannot be described with the OCCURS clause or be
subordinate to an entry described with the OCCURS
clause. When the THRU option is included, none of
t h e d a t a i t e m s w i t h i n t h e s p e c i fi e d r a n g e c a n b e
variable-occurrence data items. Data-name-2 and
data-name-3 must be names of elementary items or
groups of elementary items. Data-name-3 cannot be
the same name as data-name-2 or subordinate to
data-name-2.
The THRU option is used to rename a series of
consecutive elementary or group items. Data-name-1
is a group item that includes all elementary items
beginning with data-name-2 (or the first elementary
item if it Is a group item) and ending with dataname-3 (or the last elementary Item if it is a
group item).
If the THRU option is not used,
either an elementary item or a
name-1 is an elementary item if
elementary item or a group item
group item.

data-name-1 can be
group item. Datadata-name-2 is an
if data-name-2 is a

Refer to figure 3-28 for examples of renaming data
items.

RELATION DIVISION
The Relation Division is the last division in the
DDL source program. It is optional and, If
included, must immediately follow the Record Divi
s i o n . T h e R e l a t i o n D i v i s i o n i d e n t i fi e s t h e s p e c i
fi c r e a l m ( a r e a o r fi l e ) r e l a t i o n s h i p s t h a t a r e t o
be used in the subschema and in the COBOL or Query
Update application programs referencing the sub
s c h e m a . T h e R e l a t i o n D i v i s i o n a l s o s p e c i fi e s t h e

^

[ r e l a t i o n d e s c r i p t i o n e n t r y. ] . . .

Figure 3-42. RENAMES Clause Format,
Query Update Subschema

More than one level 66 entry can rename the same
data item. Level 66 entries must be the last
e n t r i e s d e fi n e d i n a r e c o r d . N o e n t r y c a n b e
subordinate to a level 66 entry.

-

RELATION DIVISION.

Figure 3-43. RN Clause Format
The relation-name must be unique among all relation
and realm names in the subschema. It must be the
same name specified in the RELATION NAME clause in
the schema. The RN clause can be the only clause
s p e c i fi e d i n t h e r e l a t i o n d e s c r i p t i o n e n t r y i f
r e c o r d q u a l i fi c a t i o n i s n o t d e s i r e d .
The subschema Record Division must contain record
descriptions for all record types that are refer
enced within a relationship named in the subschema.
A l l r e a l m s i n w h i c h t h e r e c o r d t y p e s a r e d e fi n e d
must be declared in the subschema Realm Division.

RESTRICT Clause
The RESTRICT clause specifies the record qualifica
t i o n c r i t e r i a t h a t m u s t b e s a t i s fi e d b y a r e c o r d
occurrence that is to be returned to the applica
tion program work area. Record qualification using
the RESTRICT clause is optional; if a relationship
is to be referenced by a program, the RN clause is
r e q u i r e d w h e t h e r o r n o t q u a l i fi c a t i o n i s s p e c i
fied. The format of the RESTRICT clause is shown
i n fi g u r e 3 - 4 4 .
Only one RESTRICT clause can be included for a
given record. A maximum of 1024 entities (identi
fi e r s , o p e r a t o r s , l i t e r a l s , o r d a t a - n a m e s ) c a n
appear in RESTRICT clauses for any one relation.
Record-name designates the record type to which the
q u a l i fi c a t i o n r e s t r i c t i o n s p e r t a i n . T h e r e c o r d
type must be described in the Record Division of
the subschema. The record name must be contained
in a realm that has been joined by the relation
named in the preceding RN clause.
T h e i d e n t i fi e r s r e p r e s e n t d a t a i t e m s w h o s e v a l u e s
are examined by CDCS to determine whether a record
o c c u r r e n c e q u a l i fi e s t o b e r e t u r n e d t o t h e u s e r ' s
w o r k a r e a . T h e y a r e t e r m e d q u a l i fi e r i d e n t i fi e r s .
R e f e r t o t h e I d e n t i fi e r s u b s e c t i o n ( u n d e r D a t a
Reference).

*^\
,^o?v

3-30

60485200 A

RESTRICT record-name
NQ
NE
GR
GT
WHERE [NOT] l(] identifier-1

OT

H
GQ

identifier-2
literal-1
data-name

[)]

identifier-4
literal-2
data-name-2

[)]

-,l

GE

W.
LE

IS
NQ
NE
GR
GT
[NOT] [(] identifier-3

H
"
LT
GQ

GT

0
1
LE
Figure 3-44. RESTRICT Clause Format
A n i d e n t i fi e r i n o n e r e a l m c a n n o t b e u s e d a s a
q u a l i fi e r i d e n t i fi e r f o r r e c o r d s i n a n o t h e r r e a l m .
A l l q u a l i fi e r i d e n t i fi e r s m u s t b e d e fi n e d i n t h e
record type named in the RESTRICT clause. An
identifier can be used as both a join term in the
schema and a qualifier identifier in the subschema.
A q u a l i fi e r i d e n t i fi e r m u s t b e d e s c r i b e d i n t h e
subschema. It cannot be any of the following
subschema data descriptions:
A data item that redescribes another item in a
REDEFINES clause

Q u a l i fi e r i d e n t i fi e r s m u s t b e e l e m e n t a r y i t e m s .
Only constant integers are allowed as item sub
scripts.
Literals specified in the RESTRICT clause must be
compatible with the schema representation of the
i d e n t i fi e r c o r r e s p o n d i n g t o t h e l i t e r a l . Ta b l e 3 - 5
l i s t s v a l i d i d e n t i fi e r a n d l i t e r a l c o m b i n a t i o n s .
L i t e r a l s p r o v i d e s t a t i c q u a l i fi c a t i o n a n d c a n n o t b e
changed from within a COBOL or Query Update pro
gram. In a COBOL subschema, literals cannot be
figurative constants such as ZERO, SPACES, and so
on.
TABLE 3-5. VALID IDENTIFIER AND
LITERAL COMBINATIONS

A condition-name assigned to the values an item
can assume in a level 88 data description entry
(COBOL subschema only)
A data item that renames another data item in a
RENAMES clause
I n a d d i t i o n , t h e q u a l i fi e r i d e n t i fi e r m u s t n o t h a v e
been defined in a VIRTUAL RESULT or a DECODING
clause in the schema.
I d e n t i fi e r s t o t h e l e f t a n d t o t h e r i g h t o f t h e
operator must be similar in type: both must be
display coded data or both must be the same type of
b i n a r y d a t a . I f t w o i d e n t i fi e r s a r e d i f f e r e n t
display coded data classes, they are compared as
a l p h a n u m e r i c d a t a . I f t w o i d e n t i fi e r s a r e b i n a r y
data, both must be of the same data class. Refer
to the Data Size and Class subsection for details
regarding data class representation.

60485200 A

I d e n t i fi e r
Data
Inte
Type
ger

Literal Data Type
FixedPoint

FloatingPoint

Com
plex

NonNumeric

Integer
FixedPoint
FloatingPoint
Complex
NonNumeric

3-31

Data-name-1 in a COBOL subschema references a data
item contained in the Data Division of the COBOL
application program; such an item is initialized
within the COBOL program. Data-name-1 in a Query
Update subschema references a data item defined by
the user within the Query Update session prior to
the INVOKE (or USE) directive that specifies the
subschema. In either subschema, data-name-1 must
be unique among all names in the subschema. Use of
a data-name in the RESTRICT clause allows for
dynamic qualification of the relationship. The
data-name specified to the right of the operator
must have a data representation that is identical
to the subschema representation of the identifier
specified to the left of the operator.

g e n e r a l u s e c a n b e s t o r e d i n a d i f f e r e n t l i b r a r y.
E a c h l i b r a r y i s i d e n t i fi e d b y a u n i q u e p e r m a n e n t
fi l e n a m e . W h e n a C O B O L a p p l i c a t i o n p r o g r a m i s
compiled, a subschema library must be attached by
s p e c i f y i n g t h e p e r m a n e n t fi l e n a m e o f t h e l i b r a r y.
Subschemas stored in other libraries are not avail
able to the COBOL program. When a Query Update
INVOKE (or USE) directive names a subschema
l i b r a r y, Q u e r y U p d a t e a u t o m a t i c a l l y a t t a c h e s t h e
subschema library file. Subschemas stored in other
libraries are not available to the Query Update
program. COBOL and Query Update subschemas can
reside in the same library.

DDL3 CONTROL STATEMENT

SUBSCHEMA COMPILATION AND
SUBSCHEMA LIBRARY MAINTENANCE
A COBOL or Query Update subschema source program is
c o m p i l e d b y t h e D D L c o m p i l e r. T h e c o m p i l e r
generates a subschema directory or object subschema
from the subschema source program. A subschema
directory is often simply called a subschema.
The DDL compiler is a multifunctional compiler. In
a d d i t i o n t o g e n e r a t i n g a s u b s c h e m a d i r e c t o r y, t h e
compiler stores the directory in a subschema
library and performs maintenance operations on the
subschema library. More than one subschema can be
compiled with one control statement call to the DDL
compiler. The particular operation to be performed
by the DDL compiler is selected by a parameter in
the DDL3 control statement.
The field length requirements for subschema compil
ation are indicated in appendix G.

The DDL3 control statement executes the DDL com
p i l e r. I t p r o v i d e s t h e D D L c o m p i l e r w i t h i n f o r
m a t i o n a b o u t a s p e c i fi c s u b s c h e m a , s p e c i fi e s t h e
l i s t i n g s t o b e g e n e r a t e d , a n d s p e c i fi e s t h e
subschema library maintenance operations to be
performed. The format of the DDL3 control statement
i s s h o w n i n fi g u r e 3 - 4 5 . T h e c o m m a i m m e d i a t e l y
following DDL3 can be replaced by a left paren
thesis; the terminating period can be replaced by a
right parenthesis.
Either the C5 or QC parameter must be specified.
All other parameters of the DDL3 control statement
are optional.
The C5 and QC parameters select compilation for
either a COBOL or Query Update subschema, respec
tively. The C5 and QC parameters are interpreted
as follows:

C5
Specifies a COBOL subschema for use with a
COBOL 5 application program.

SUBSCHEMA LIBRARY

Q
C

One or more compiled subschemas are stored in a
p e r m a n e n t fi l e c a l l e d t h e s u b s c h e m a l i b r a r y. T h e
l i b r a r y i s c r e a t e d w h e n t h e fi r s t s u b s c h e m a I s
stored in it. Subsequent subschemas can be added
to the library or can replace existing subschemas
i n t h e l i b r a r y. A s u b s c h e m a c a n b e d e l e t e d f r o m
the library through use of the purge parameter in
the DDL3 control statement. A subschema library
that has had subschemas replaced or purged can be
transferred to a new, compacted subschema library.
Data security can be maintained by creating more
than one subschema library to control the avail
ability of the subschemas to the application
programs. Subschemas providing access to data that
i s r e s t r i c t e d t o s p e c i fi c a p p l i c a t i o n s c a n b e
stored in one subschema library; subschemas for

DDL3{;«}cs'B=fn
i3

,A
,N
,NL=lfn
,P
,R

Specifies a Query Update subschema for use
with a Query Update application program.
The SB parameter identifies the local file name of
t h e s u b s c h e m a l i b r a r y fi l e . T h i s p a r a m e t e r i s
interpreted as follows:
omitted

Local file SBLFN is assumed to contain the
subschema library.
SB=lfn
T h e l o c a l fi l e n a m e s p e c i fi e d i d e n t i fi e s
t h e fi l e t h a t c o n t a i n s t h e s u b s c h e m a
l i b r a r y.

C,SC=lfn:C,I=lfn3i:,L=lfnj:,L0=op].

Figure 3-45. DDL3 Control Statement Format for COBOL and Query Update Subschemas

3-32

60485200 A

The A, N, NL=lfn, P and R parameters along with a
default operation select subschema library mainte
nance operations. Only one of the operations can
be performed in a single execution of the DDL
c o m p i l e r. I f t w o o r m o r e o f t h e s e p a r a m e t e r s a r e
s p e c i fi e d , a c o n t r o l s t a t e m e n t e r r o r i s i s s u e d . I f
a library manipulation function is attempted on a
n o n e m p t y fi l e t h a t d o e s n o t c o n t a i n a l i b r a r y, a
diagnostic is issued and the job is aborted. The
parameters are interpreted as follows:

omitted
T h e fi r s t s e v e n c h a r a c t e r s o f t h e s c h e m a
n a m e s p e c i fi e d i n T i t l e D i v i s i o n o f t h e
subschema source program is assumed to
i d e n t i f y t h e l o c a l fi l e t h a t c o n t a i n s t h e
schema directory.
SC=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
the file that contains the schema directory.

omitted
Each subschema source program in the job
stream is compiled and added to the
s u b s c h e m a l i b r a r y i d e n t i fi e d b y t h e S B
parameter.

T h e I p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s s o u r c e i n p u t f o r t h e D D L c o m p i l e r. T h i s
parameter is interpreted as follows:
omitted

A u d i t p a r a m e t e r. A l i s t o f t h e s u b s c h e m a s
and their corresponding schemas, together
with their creation dates, is produced from
the subschema library identified by the SB
parameter.

Compile parameter. Each subschema source
program in the job stream is compiled but
not added to the subschema library identi
fied by the SB parameter.
NL=lfn

The local file INPUT is assumed to contain
the source input for the DDL compiler.
1=1 fn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t c o n t a i n s s o u r c e i n p u t f o r t h e
DDL compiler.
T h e L p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
receives listings and diagnostics generated by the
D D L c o m p i l e r. T h i s p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted

N e w l i b r a r y p a r a m e t e r. T h e s p e c i fi e d l o c a l
fi l e n a m e i d e n t i fi e s a n e w s u b s c h e m a
library to which the active subschemas in
the subschema library (identified by the SB
parameter) are transfered. If the NL
p a r a m e t e r i s s p e c i fi e d w i t h n o fi l e n a m e
i n d i c a t e d , l o c a l fi l e n a m e N E W L I B i s
assumed.

The local file OUTPUT receives the listings
and diagnostics generated by the DDL
c o m p i l e r.

L=0
T h e l o c a l fi l e O U T P U T r e c e i v e s o n l y t h e
diagnostics generated by the DDL compiler.
L=lfn

Purge parameter.
the job stream is
l i b r a r y i d e n t i fi e d
compilation takes

A subschema specified in
purged from the subschema
b y t h e S B p a r a m e t e r. N o
place.

Replace parameter. Each subschema source
program in the job stream is compiled and
r e p l a c e s t h e e x i s t i n g s u b s c h e m a ( i d e n t i fi e d
by the Title Division) in the subschema
l i b r a r y . T h e s u b s c h e m a l i b r a r y fi l e i s
i d e n t i fi e d b y t h e S B p a r a m e t e r. R e p l a c e
ment takes place only if no compilation
errors other than informative diagnostics
are encountered.

T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t r e c e i v e s t h e l i s t i n g s a n d
diagnostics generated by the DDL compiler.
The LO parameter selects the listing produced by
the DDL compiler. Two listing options (op) can be
s p e c i fi e d : a s o u r c e l i s t i n g ( S o p t i o n ) a n d a n
object listing (0 option). Source and object list
i n g s a r e w r i t t e n t o t h e fi l e s p e c i fi e d b y t h e L
p a r a m e t e r . I f L = 0 i s s p e c i fi e d , n o l i s t i n g i s
produced except for error messages, regardless of
L O s p e c i fi c a t i o n . T h i s p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted
Same as LO-S; a source listing is produced.

T h e S C p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s t h e s c h e m a d i r e c t o r y . A s p e c i fi e d l f n
overrides the default file name determined from the
Ti t l e D i v i s i o n . T h i s p a r a m e t e r i s i n t e r p r e t e d a s
follows:

60485200 A

LO
Same as L0=S; only a source listing is
produced.

3-33

Compiling a Subschema

L0=op
L0=opi/op2
T h e s p e c i fi e d l i s t i n g o p t i o n s e l e c t s t h e
listing produced. The listing options are
as follows:

The source program for a subschema can be compiled
without being stored in the subschema library. The
form of the DDL3 control statement (shown with the
QC parameter) needed to compile a Query Update
subschema is as follows:

S Source listing
DDL3,QC,SB=lfn,N,SC=lfn.
0 Object listing; a listing of the
code generated for a mapping
capsule. If no mapping capsule is
required for the subschema, there
is no object listing.

SUBSCHEMA COMPILATION AND
LIBRARY MAINTENANCE OPERATIONS
A COBOL or Query Update subschema must be coded
a c c o r d i n g t o t h e s p e c i fi c a t i o n s i n t h i s m a n u a l .
Subschema source code can be entered through a
terminal, processed by a text editor, and stored in
a fi l e .
The DDL compiler can be executed from a terminal
and through a batch job in the following ways.
When executed from a terminal, the subschema pro
gram must reside on a file whose name is indicated
by the I parameter of the DDL3 control statement.
In a batch job, in which the input file for the DDL
compiler is assumed to be local file INPUT, the job
stream must be structured so that the control
statements precede the subschema source program.
An end-of-record indicator must immediately precede
the first line of subschema source code to separate
the subschema program from the control statements.
Control statements in the job stream and the
resulting subschema source program are used by the
DDL compiler either to compile the subschema and to
store it in the subschema library or to perform a
subschema library maintenance operation such as
replacing or deleting subschemas, generating a new,
compacted subschema library, or producing an audit
listing. The parameters in the DDL3 control state
ment select the operation to be performed. Other
control statements provide information for the
operating system to make necessary information
available for the DDL compiler.
The following paragraphs indicate the parameters
required in the DDL3 control statement to accomplish
compilation of COBOL and Query Update subschemas
and to perform subschema library maintenance opera
tions. Examples of batch jobs that accomplish the
operations are shown. The DDL3 control statements
used in the examples alternately indicate Query
Update and COBOL subschemas. Control statements
are shown for both the NOS and NOS/BE operating
systems*

Either the C5 or QC parameter must be specified: C5
for compilation of a COBOL subschema; QC for com
pilation of a Query Update subschema. The compile
parameter (N) must also be specified. The SB, SC,
I, and L parameters are optional and have default
values (refer to the DDL3 Control Statement sub
section).
Figure 3-46 illustrates a job that accomplishes
subschema compilation only. The schema file must
be attached.

Creating a Subschema Library
T h e s u b s c h e m a l i b r a r y i s c r e a t e d w h e n t h e fi r s t
subschema is stored in it. The form of the DDL3
control statement (shown with the C5 parameter)
needed to create a subschema library and store a
compiled subschema in it is as follows:
DDL3,C5,SB=lfn,SC=lfn.
Either the C5 or QC parameter must be specified: C5
for compilation of a COBOL subschema; QC for
compilation of a Query Update subschema. The SB,
SC, I, L, and LO parameters are optional and have
default values (refer to the DDL3 Control Statement
subsection).
Figure 3-47 illustrates a job that compiles a
subschema and creates a subschema library. In this
example, the schema file SCHPAY is attached. The
s u b s c h e m a l i b r a r y i s i d e n t i fi e d b y t h e l o c a l fi l e
name SUBSCH. The DEFINE and REQUEST/CATALOG
c o n t r o l s t a t e m e n t s s p e c i f y t h e l o c a l fi l e n a m e o f
the subschema library and assign it to a permanent
file device. A password specified in the DEFINE or
CATALOG statement controls subsequent access and
use of the subschema library.
If only one subschema is to be stored in the
l i b r a r y, t h e s u b s c h e m a n a m e c a n b e u s e d f or the
subschema library file name.
Query Update-CDCS
subschemas (C5
Query Update-CRM
fore cannot exist

subschemas (QC option) and COBOL
option) are not compatible with
subschemas (QD option) and there
on the same library file.

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
DDL3,C5,SB=SBTST,N,SC=SCHPAY.
End-of-record
DDL Subschema Source I nput
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
DDL3,QC,SB=SBTST,N,SC=SCHPAY.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 3-46. Compiling a Subschema
3-34

60485200 E

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
DEFINE,SUBSCH/PW=DDL,CT=PU,M=W.
DDL3,QC,SB=SUBSCH,SC=SCHPAY.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
REQUEST,SUBSCH,PF.
DDL3,C5,SB=SUBSCH,SC=SCHPAY.
CATALOG,SUBSCH,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 3-47. Creating a Subschema Library

j0^\

/^^W~

Compiling Multiple Subschemas
A number of subschemas can be compiled with one
control statement call to the DDL compiler. The
parameters specified in the control statement apply
to ail the subschemas. The subschema library
maintenance operations of creating a subschema
library, adding (default operation) subschemas to
the subschema library, replacing (R parameter)
subschemas in the library, or just compiling (N
parameter) subschemas can be used with this
f a c i l i t y.
For the compilation of several subschemas with one
control statement call to the DDL compiler, the
subschema source statements must be contiguous,
with no intervening end-of-record indicator or endof-information indicator. The program source for
each subschema must begin with the TITLE DIVISION
statement. Each subsequent TITLE DIVISION state
ment immediately follows the last source statement
of the preceding subschema. Each subschema is
compiled in turn until end-of-information or endof-record is encountered.
Compiling a Subschema and
Adding to a Subschema Library
Once the subschema library has been created and
s a v e d o n a p e r m a n e n t fi l e ( a s d e s c r i b e d i n t h e
Creating a Subschema Library subsection), new
subschemas can be added to the library. The form
of the DDL3 control statement (shown with the QC
parameter) needed to add a subschema to an existing
subschema library is as follows:
DDL3,QC,SB=lfn,SC=lfn.

Either the C5 or QC parameter must be specified: C5
for compilation of a COBOL subschema; QC for
compilation of a Query Update subschema. The SB,
SC, I, L, and LO parameters are optional and have
default values (refer to the DDL3 Control Statement
subsection).
Figure 3-48 illustrates a job that adds a subschema
to the subschema library created by the example in
fi g u r e 3 - 4 7 . T h e s c h e m a d i r e c t o r y i s a t t a c h e d .
The subschema library is also attached with the
applicable password and (for NOS only) access mode
M=W specified.
Each subschema stored in the library must have a
unique name. If the subschema being added to the
library has the same name as a subschema already
s t o r e d i n t h e l i b r a r y, a d i a g n o s t i c i s i s s u e d a n d
the job is aborted.

Replacing a Subschema
A new subschema can replace one that is stored in
t h e s u b s c h e m a l i b r a r y. T h e f o r m o f t h e D D L 3
control statement (shown with the C5 parameter)
needed to replace a subschema in the subschema
library is as follows:
DDL3,C5,SB=lfn,R,SC=lfn.
Either the C5 or QC parameter must be specified: C5
for compilation of a COBOL subschema; QC for
compilation of a Query Update subschema. The
r e p l a c e m e n t p a r a m e t e r ( R ) m u s t b e s p e c i fi e d . T h e
SB, SC, I, L, and LO parameters are optional and
have default values (refer to the DDL3 Control
Statement subsection).

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
ATTACH,SUBSCH/PW=DDL,M=W.
DDL3,C5,SB=SUBSCH.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDL3,QC,SB=SUBSCH.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 3-48. Compiling a Subschema and Adding to a Subschema Library

60485200 A

3-35

Figure 3-49 illustrates a job that replaces a
s u b s c h e m a i n t h e s u b s c h e m a l i b r a r y. T h e s c h e m a
d i r e c t o r y i s a t t a c h e d . T h e s u b s c h e m a l i b r a r y fi l e
is also attached with the applicable password and
( f o r N O S o n l y ) a c c e s s m o d e M = W i s s p e c i fi e d . I f
the subschema to be replaced cannot be found in the
s u b s c h e m a l i b r a r y, a n i n f o r m a t i v e d i a g n o s t i c i s
issued and the new subschema is added to the
l i b r a r y.

T h e c o n t r o l s t a t e m e n t s a r e f o l l o w e d b y s t a t e ments
that specify the subschemas to be deleted. The
subschema name is entered anywhere from column 8
through column 72. If more than one subschema name
is entered, a space or a comma must follow each
subschema name.
No compilation occurs when a subschema is deleted
from the subschema library.

Auditing a Subschema Library

Deleting a Subschema
A subschema stored in the subschema library can be
d e l e t e d f r o m t h e l i b r a r y. T h e f o r m o f t h e D D L 3
control statement (shown with the QC parameter)
needed to purge a subschema from the subschema
library is as follows:

After a subschema library is created, it can be
searched and a list generated that includes the
name of each subschema and the name of the schema
it references, together with their creation dates.
The form of the DDL3 control statement (shown with
the C5 parameter) needed to generate the audit
listing is as follows:

DDL3,QC,SB=lfn,P.
DDL3,C5,SB=lfn,A.
Either the C5 or QC parameter must be specified.
The purge parameter (P) must be specified. The SB,
I, and L parameters are optional and have default
values (refer to the DDL3 Control Statement sub
section).

Either the C5 or QC parameter must be specified.
The audit parameter (A) must be specified. The SB
and L paramaters are optional and have default
values (refer to the DDL3 Control Statement sub
section) .

Figure 3-50 illustrates a job that purges a sub
schema from the subschema library. The subschema
l i b r a r y fi l e i s a t t a c h e d w i t h t h e a p p l i c a b l e
password and (for NOS only) access mode M=W is
s p e c i fi e d . T h e e n d - o f - r e c o r d i n d i c a t o r d e s i g n a t e s
the end of the control statements.

Figure 3-51 illustrates a job that produces an
a u d i t l i s t i n g o f t h e s u b s c h e m a l i b r a r y. T h e
subschema library is attached with the appropriate
p a s s w o r d s p e c i fi e d . T h e l i s t i n g p r o d u c e d b y t h e
DDL compiler when the audit is performed is shown
i n fi g u r e 3 - 5 2 .

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
ATTACH,SUBSCH/PW=DDL,M=W.
DDL3,QC,SB=SUBSCH,R.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDL3,C5,SB=SUBSCH,R.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 3-49. Replacing a Subschema Library

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL,M=W.
DDL3,C5,SB=SUBSCH,P.
End-of-record
PAYROLL
NEWHIRES
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDL3,QC,SB=SUBSCH,P.
End-of-record
PAYROLL
NEWHIRES
End-of-information

Figure 3-50. Deleting Subschemas From the Library

3-36

60485200 A

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL.
DDL3,C5,SB=SUBSCH,A.
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDL3,QC,SB=SUBSCH,A.
End-of-information

Figure 3-51. Auditing a Subschema Library

* SOURCE LISTING * (82061) DDL 3.2+564.

82/04/05. 09.56.11

BEGIN SUB-SCHEMA FILE MAINTENANCE
LIST OF SUB-SCHEMAS IN FILE
SUB-SCHEMA

CREATION
DATE
TIME

SCHEMA

CREATION
DATE
TIME

C5SS-PR0DUCT-PERS0NNEL
PAYROLL
PRODUCTS
PROJECTS
C5SS-PR0DUCT-MANAGEMENT

82087
82087
82087
82087
82087

MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB

82087
82087
82087
82087
82087

DDL COMPLETE.
45300B CM USED.

14.19
14.19
14.19
14.19
14.19

14.14
14.14
14.14
14.14
14.14

MAINTENArJCE
0 DIAGNOSTICS.
0.022 CP SECS.
Figure 3-52. Audit Listing of the Subschema Library

Compacting a Subschema Library
Subschema library compaction Is an optional facil
ity that generates a new subschema library by
copying only the active subschemas from the speci
fi e d s u b s c h e m a l i b r a r y . W h e n t h i s f a c i l i t y i s
executed, the DDL compiler generates a listing that
includes the name of each transferred subschema and
the schema It references, together with their
creation dates. The form of the DDL3 control
statement (shown with the C5 parameter) needed to
c r e a t e a n e w, c o m p a c t e d s u b s c h e m a l i b r a r y i s a s
follows:
DDL3,C5,SB=1fn,NL=1fn.
Either the C5 or QC parameter must be specified.
The new library parameter (NL) must be specified.

The SB and L parameters are optional and have
default values (refer to the DDL3 Control Statement
subsection).
F i g u r e 3 - 5 3 i l l u s t r a t e s a j o b t h a t c r e a t e s a n e w,
compacted subschema library. The subschema library
is attached with the appropriate password. The
DEFINE and REQUEST/CATALOG control statements
s p e c i f y t h e l o c a l fi l e n a m e o f t h e n e w s u b s c h e m a
l i b r a r y a n d a s s i g n i t t o a p e r m a n e n t fi l e d e v i c e .
A p a s s w o r d s p e c i fi e d i n t h e D E F I N E o r C ATA L O G
statement controls subsequent access and use of the
s u b s c h e m a l i b r a r y. T h e D D L 3 c o n t r o l s t a t e m e n t
specifies the SB parameter with the local file name
of the current subschema library to be compacted,
a n d t h e N L p a r a m e t e r w i t h t h e l o c a l fi l e n a m e o f
t h e n e w s u b s c h e m a l i b r a r y. T h e P U R G E c o n t r o l
s t a t e m e n t d e s t r o y s t h e o l d l i b r a r y fi l e .

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL, M=W.
DEFINE,NEWSUB/PW=DDL,CT=PU,M=W.
DDL3,QC,SB=SUBSCH,NL=NEWSUB.
PURGE,SUBSCH.
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
REQUEST,NEWSUB,PF.
DDL3,C5,SB=SUBSCH,NL=NEWSUB.
CATALOG,NEWSUB,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.
PURGE,SUBSCH,RB=1.
End-of-information

Figure 3-53. Compacting a Subschema Library

60485200 A

3-37

This facility is intended to be used on a subschema
library that has had a number of subschemas purged
or replaced and, therefore, contains wasted space.
The DDL compiler eliminates the wasted space in the
n e w s u b s c h e m a l i b r a r y. A f t e r t h e n e w s u b s c h e m a
l i b r a r y i s s t o r e d a s a p e r m a n e n t fi l e , t h e u s e r
s h o u l d p u r g e t h e o l d s u b s c h e m a l i b r a r y. T h i s
facility does not allow for compilation of sub
schemas .

COMPILATION OUTPUT
A listing of the DDL source program Is provided
whenever a COBOL or Query Update subschema is
compiled. Each line of the listing corresponds to
one source line in the source program. The format
and order of each line of the listing are identical
to the format and order of the statements in the
source program. Figure 3-54 is a sample source
listing for a subschema compilation.
The DDL compiler assigns a line number to each
input statement, beginning with 00001. The line
numbers are printed on the source listing, starting
in column 16. Diagnostic messages begin in column
3 of the listing. After the last input statement
is listed, a compilation summary is printed. When
relation statistics are applicable, relation names
and their traversed areas are included.
The source listing can be suppressed by specifying
L=0 in the DDL3 control statement. Only diagnostic
messages and the compilation summary are printed on
the listing.

When a subschema is compiled, a cross-reference
list and a data map are not printed. When a COBOL
a p p l i c a t i o n p r o g r a m s p e c i fi e s t h e s u b s c h e m a , t h e
COBOL compiler produces a cross-reference list and
a data map containing the realm, record, and data
item entries defined in the subschema.

RECOMPILATION GUIDELINES
The DDL compiler generates a checksum for each area
and relation in the schema. These checksums are
the means for determining the need to recompile a
subschema. If a checksum In a recompiled schema is
d i ff e r e n t f r o m t h e c o r r e s p o n d i n g c h e c k s u m i n t h e
previous schema, any subschema referencing the
changed area or relation must be recompiled. A
list of subschemas that must be recompiled because
of a schema change involving an area or relation
can be obtained from a schema compilation. Refer
to the Recompilation Guidelines subsection in
section 2 for more information. Subschemas not
referencing changed areas or relations need not be
recompiled.
The DDL compiler generates a checksum for each
subschema. This checksum is the means for deter
mining the need to recompile application programs.
When an application program Is complied, the
checksum of the subschema it references is copied
into the program binary output. When the applica
tion program is run, that checksum must be the same
as a checksum of a subschema in the master direc
t o r y. I f t h e a p p l i c a t i o n p r o g r a m r e f e r e n c e s a n
invalid checksum, CDCS aborts the program and
issues a diagnostic.

* SOURCE LISTING * (82061) DDL 3.2+564.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022

TITLE DIVISION.
SS C5SS-PR0DUCT-PERS0NNEL WITHIN MANUFACTURING-DB.
ALIAS DIVISION.
AD REALM JOBDETAIL BECOMES WORK-FILE.
AD RECORD JOBREC BECOMES W0RK-REC.
AD RECORD EMPREC BECOMES EMP-REC.
AD DATA L0C-C0DE BECOMES LOCATION.
REALM DIVISION.
R
D EMPLOYEE, WORK-FILE.
RECORD DIVISION.
01 EMF -REC.
03 EMP-ID
03 SALARY

03
03
03
03

EMP-LAST-NAME
EMP-INITIALS
DEPT
MAILING-ADDRESS.
05 ADDRESS-NUMBERS

PICTURE X(8).
PICTURE 9(6)V99
USAGE IS COMP-1.
PICTURE A(20).
PICTURE A(4).
PICTURE X(4).
PICTURE X(6J.

** WITHIN EMPLOYE
** ORDINAL 1
** ORDINAL 2
**
**
**
**
**

ORDINAL
ORDINAL
ORDINAL
ORDINAL
ORDINAL

3
4
5
6
7

Figure 3-54. Sample COBOL Subschema Compilation Output Listing (Sheet 1 of 2)

3-38

60485200 B

00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
***314*
00041
PRIMARY KEY
00015
ALTERNATE KEY 00020
PRIMARY KEY
00036
*****
*****
00053
00054
00055
00056
00057
*****
*****
RELATION 001

01 WORK-REC.
03 CONCATKEY.
05
EMP-ID
PICTURE
X(8).
05
SEQ-NO
PICTURE
X(4).
03 P R O D U C T - I D P I C T U R E X ( 1 0 ) .
03 S E C U R I T Y- C O D E P I C T U R E X ( 2 ) .
03 MONTHLY-COMPENSATION USAGE IS COMP-1
OCCURS 12 TIMES.
05 REG-HOURS PICTURE 9(3)V99.
05 REG-COMPENSATION PICTURE 9(4)V99.
0 5 OT- H OU R S P IC TU R E 9 ( 3 ) V 9 9 .
05 OT-COMPENSATION PICTURE 9(4)V99.
03 H O U R S - Y T D P I C T U R E 9 ( 4 ) V 9 9
USAGE IS COMP-1.
03 COMPENSATION-YTD PICTURE 9(8)V99
USAGE IS COMP-1.
03 L O C A T I O N
PICTURE
X(4).

**
**
**
**
**
**
**

WITHIN WORK-FI
ORDINAL
ORDINAL
ORDINAL
ORDINAL
ORDINAL
ORDINAL

**
**
**
**
**

ORDINAL
ORDINAL
ORDINAL
ORDINAL
ORDINAL

10
11

* * ORDINAL

12

* * ORDINAL

13

WARNING: SS SIZE GR SCHEMA SIZE - MAY CAUSE TRUNCATION ERRORS AT EXECUTION TIME
EMP-ID FOR AREA EMPLOYEE
DEPT FOR AREA EMPLOYEE
CONCATKEY FOR AREA WORK-FILE
RECORD MAPPING IS NEEDED FOR REALM - EMPLOYEE
RECORD MAPPING IS NEEDED FOR REALM - WORK-FILE
RELATION DIVISION.
R
N IS EMP-REL
RESTRICT WORK-REC WHERE SECURITY-CODE GE "B1".
END OF SUB-SCHEMA SOURCE INPUT
R E L AT I O N
EMP-REL JOINS

S TAT I S T I C S
AREA - WORK-FILE
AREA - EMPLOYEE

*****

BEGIN SUB-SCHEMA FILE MAINTENANCE
SUBSCHEMA
C5SS -PRODUCT--PERSONNEL
DDL COMPLETE.
50200B CM USED.

CHECKSUM
07267725304252560742

END OF FILE MAINTENANCE
1 DIAGNOSTICS.
0.330 CP SECS.

Figure 3-54. Sample COBOL Subschema Compilation Output Listing (Sheet 2 of 2)

06^*y

60485200 A

3-39

FORTRAN SUBSCHEMA DEFINITION

A FORTRAN subschema describes the portion of a data
base to be used by one or more FORTRAN applications
programs. Its descriptions link the descriptions
found in the schema with the variables and arrays
in the FORTRAN program. The subschema uses state
ments similar to FORTRAN specification statements
to indicate the data type and dimensions of vari
ables and arrays used in the applications program.
A FORTRAN subschema is coded and compiled for use
v e ran
s i oapplication
n . T h e oprogram
u t p u t f of
rom
o m p i l a t i o5n language
of the
I by
the c FORTRAN
subschema source program is a subschema directory
or object subschema.
When a FORTRAN program containing Data Manipulation
L a n g u a g e ( D M L ) s t a t e m e n t s i s p r o c e s s e d , t h e fi l e
containing the subschema directory must be made
available to the DML preprocessor. The DML pre
processor inserts FORTRAN statements derived from
subschema definitions into the FORTRAN program.
The subschema is based on the schema; the schema
must be compiled before the subschema. The sub
schema can include all or part of the entities
defined in the schema. Any number of subschemas
can use a given schema. In general, the schema
description of data can be changed in the subschema
to meet the needs of the applications program;
h o w e v e r, s o m e l i m i t i a t i o n s h a v e b e e n i m p o s e d .
These are outlined in the following paragraphs.

SUBSCHEMA STRUCTURING
REQUIREMENTS

0jfa^\

FORTRAN subschemas consist of required and optional
statements. The statements and their functions are
as follows:
SUBSCHEMA statement specifies the name of the
subschema and identifies the schema.

R E S T R I C T s t a t e m e n t s p e c i fi e s t h e q u a l i fi c a t i o n
c r i t e r i a t h a t m u s t b e s a t i s fi e d b y r e c o r d s t h a t
are returned through relation processing.
END statement indicates the end of the sub
schema source program.
The subschema source program must conform to struc
t u r e r e q u i r e m e n t s . Ta b l e 4 - 1 s h o w s t h e o r d e r i n
which groups of FORTRAN Data Description Language
(DDLF) statements must be included in a subschema.
In group 4, the type statements that apply to the
variables and arrays belonging to a record defined
by a RECORD statement appear immediately after the
RECORD statement. In group 5, the RESTRICT state
m e n t s t h a t a p p l y t o a r e l a t i o n d e fi n e d b y t h e
R E L AT I O N s t a t e m e n t a p p e a r i m m e d i a t e l y a f t e r t h e
RELATION statement. A FORTRAN subschema must
contain at least one realm, one record, and one
type statement.
TABLE 4-1. ORDERING OF SUBSCHEMA STATEMENTS
Statement

Group

1

SUBSCHEMA

2

ALIAS (optional)

3

REALM

4

RECORD and type

5

RELATION (optional)
RESTRICT (optional)

6

END

DATA DESCRIPTION

REALM statement identifies the schema areas to
be made available to an application program
through the subschema.

A record description entry is composed of a RECORD
statement and the type statements immediately
following it. The type statements following each
RECORD statement specify the data items that are to
be made available from the corresponding schema
record. The ordering of type statements is inde
pendent of the ordering of items within the schema
record.

RECORD statement and subsequent type statements
describe the structure and content of each
record type in the subschema.

Correspondence between schema and subschema items
is based on the item name. Therefore, a data name
in a type statement must be one of the following:

ALIAS statement assigns alternate names to be
used in place of names assigned in the schema.

R E L AT I O N s t a t e m e n t i d e n t i fi e s a r e l a t i o n d e
fi n e d i n t h e s c h e m a t h a t i s i n c l u d e d i n t h e
subschema.

60485200 E

A data name from the schema description
An alias assigned in an ALIAS statement

4-1

Any data name in the schema longer than seven char
acters, or containing a hyphen, must be renamed in
an ALIAS statement, because these data names are
not allowed in FORTRAN. Once an alias is assigned
to a schema name, the alias must be used in all
FORTRAN DDL statements. Only elementary item names
from the schema can be defined in a FORTRAN sub
schema. Each record type corresponds to a record
type in the schema and must be within one of the
realms specified in REALM statements. Each RECORD
statement must be followed by at least one type
statement.
A l l t h e d a t a i t e m s d e fi n e d i n t h e s u b s c h e m a a r e
included in the FORTRAN program by the DML preproc
e s s o r. T h e r e f o r e , a l l d a t a i t e m s n a m e d i n t h e
subschema are either variables or arrays In the
FORTRAN applications program.
Character variables and arrays should be grouped
together within a record in the subschema to mini
mize the number of common blocks that the DML
preprocessor generates for a FORTRAN program. The
variables and arrays are declared in common blocks
in the same order as they are included in the
subschema. One common block is generated for each
realm. The name for that common block is in the
form DBnnnn, where nnnn is the realm ordinal
assigned by the DDLF compiler. Realm ordinals are
assigned incrementally starting with 1 for each
realm named in the subschema. Character data items
cannot share the same common block with noncharacter items; therefore, a new common block is
generated each time a type statement is encountered
that is not compatible with the previous type
statement. The name for each additional common
block required for a realm is in the form Dnnnnxx,
where nnnn is the realm ordinal and xx is a
2 - l e t t e r i d e n t i fi e r a s s i g n e d i n c r e m e n t a l l y f r o m t h e
series AA, AB, ..., ZZ.

VARIABLES
A variable declaration in a type statement associ
ates a symbolic name of the specified type with a
single data item. Because every data base data
item that is to be referenced in the FORTRAN pro
gram must be declared in the subschema, implicit
typing of variables is overridden. A variable
defined in the subschema must correspond to a non
repeating elementary item in the schema.

ARRAYS

c o r r e s p o n d t o e i t h e r a fi x e d o c c u r r e n c e r e p e a t i n g
item or a variable occurrence repeating item.

SCHEMA/SUBSCHEMA
CORRESPONDENCE
The subschema is created to accommodate the needs
of a FORTRAN applications program. Some character
i s t i c s o f t h e d a t a i n t h e d a t a b a s e a r e fi x e d b y
the schema and cannot be changed by the subschema;
o t h e r c h a r a c t e r i s t i c s s p e c i fi e d i n t h e s c h e m a c a n
be different in the subschema. The following
p a r a g r a p h s o u t l i n e t h e c a s e s i n w h i c h d i ff e r e n c e s
are allowed between the schema and the subschema,
and the actions taken by the DDLF compiler to
resolve the differences in each case.

OMISSION OF DATA ITEMS
The subschema normally describes only a portion of
the data base. Data items that are not required by
the FORTRAN program are not included in the sub
schema description. Elementary items, complete
records, and entire areas in the schema can be
omitted from the subschema. When a record or an
area is not included in the subschema description,
all subordinate entries are automatically omitted
and cannot be referenced in the subschema.
Unlike the COBOL subschema, the FORTRAN subschema
has no mechanism for the description of group
items. Therefore, these items must be omitted from
the subschema. The elementary items making up the
schema group item must also be omitted from the
subschema.
Unlike the COBOL subschema, only one record type
per realm is permitted in the FORTRAN subschema.
The primary key for a realm must be declared in the
subschema; alternate keys are required only if they
are actually used.

ORDERING OF DATA ITEMS
T h e o r d e r i n w h i c h d a t a i t e m s a r e s p e c i fi e d i n a
record description need not match the order in the
schema, unless the data items are constituent items
o f a c o n c a t e n a t e d k e y. T h e n a m e s o f t h e i t e m s ,
however, must match those in the schema or in the
ALIAS statement*

The size, dimensions, and type of an array are
d e fi n e d i n a t y p e s t a t e m e n t . A r r a y d e c l a r a t i o n s
are identical in form and content to those in a
FORTRAN program.

Data items of a concatenated key (primary or
alternate) must be in the same order as in the
schema and must also be contiguous items.

An array in a subschema corresponds to a repeating
elementary item in the schema; that is, to an item
containing an OCCURS clause. A repeating elemen
tary item is called a vector. An array can

DEFINITION OF DATA ITEMS

4-2

Data items can differ in size, type, and number of
array elements from those in the schema.

60485200 E

Data Size and Type
The size and type of data items in the subschema
a r e s p e c i fi e d i n t h e t y p e s t a t e m e n t s . I n t h e
s c h e m a t h e y a r e s p e c i fi e d i n e i t h e r t h e T Y P E o r
PICTURE clause. Since the schema and subschema
statements differ in format, rules have been estab
lished for conversion between subschema and schema
s p e c i fi c a t i o n s . I n s o m e c a s e s , t h e t y p e s s p e c i fi e d
in the schema and subschema match exactly; no
conversion is required. In other cases, the types
d i ff e r, b u t a m e a n i n g f u l c o n v e r s i o n i s e s t a b l i s h e d
by DDLF and carried out through mapping at execu
tion time by CDCS. In still other cases, no
conversion is possible and an error message is
issued by the DDLF compiler.
Variables and Arrays
Complex and double precision variables occupy two
words of storage each; all other variables occupy
one word of storage. Complex and double precision
arrays occupy two words of storage for each array
element; all other arrays occupy one word of stor
age for each array element.
Conversion
Table 4-2 shows the allowed correspondence between
types of items in the subschema and data class
s p e c i fi c a t i o n s i n t h e s c h e m a . ( R e f e r t o s e c t i o n 2
for complete descriptions of these data
classes.) For those cases where conversion is
necessary, the table describes the method used.
If the schema specifies a CHECK IS PICTURE clause,
the data description in the subschema must match
the data description in the schema for both size
and class. The CHECK IS PICTURE clause in the
schema definition inhibits data conversion between

the schema and the subschema. Table 4-2 indicates
the data type required for a subschema item to
correspond to a schema item defined with the CHECK
IS PICTURE clause.

Concatenated Keys
Items in a concatenated key must conform to the
schema description of the items in size and type.
The size of concatenated key items in the subschema
must be identical to the size of concatenated key
items in the schema. The type of the concatenated
key items must match the type of concatenated key
items in the schema; key mapping is not allowed.
All members of a concatenated key must be
elementary items; they cannot be an element of a
v e c t o r o r a n a r r a y. A m a x i m u m o f 6 4 c o n t i g u o u s
items is allowed for a concatenated key.
Because no key mapping is allowed, only the data
types requiring no conversion or type checking from
schema to subschema are accepted for concatenated
k e y i t e m s . Ta b l e 4 - 3 s h o w s t h e a l l o w a b l e s c h e m a |
item types and corresponding subschema item types
for which no conversion or type checking is
performed. The table entries correspond to the
footnoted items in table 4-2 designating required
subschema data types when CHECK IS PICTURE is used
in the schema. Refer to the discussion of data
size and class in section 2 for a description of
these schema classes.
The effect of the CHECK IS PICTURE clause is to
disallow conversion and type checking for the
item. Therefore, it might be helpful for the data
base administrator to have CHECK IS PICTURE
s p e c i fi e d i n t h e s c h e m a d e s c r i p t i o n f o r a l l d a t a
i t e m s u s e d i n c o n c a t e n a t e d k e y s . T h e s p e c i fi
cation, however, inhibits conversion for COBOL and
Query Update subschemas and might not be practical.

/pws\

r

60485200 E

4-3

jj
TJ

to
X
Cd Z

O OS

o o
[I4

TJ
01
JJ
JJ
• H

J j
t l
f |

E

•H

g
01

B

CD
CU

91
CU

4J

ta

o
Z

CO

01 5s
to u •
cd o
•« C H

•H

N

bc pd

o

a.

JJ

T t

Tt

fl )

cd bO N
O tO
fH B o

O

z

fa

ft

JJ

H
■CO

CO

U

jj
to
Cd
a>
r-l

JJ

Cu

d
cd jj 5s
CJ 0) rl •
fi t o a o
M-l d M
•H '-f-l 0)
a. d tj bo n

G 9)

JJ

jj

JJ

o
z

o

z

Du

•rt

g
 01

Z

CO

-i

?
_

•rt
Z
O

I—1
OT U">

H
CJ Z

si
Qj

3g
PQ
C3

s
to

z
< e2
IS pcs
o

fa

CU

cu
Cu

jj
o
Z

z

Ih rH JJ

JJ

CO 0) f) O
OT .-4 CO JJ

o

•a

T )
Ql
JJ
JJ

a)
JJ
JJ
• H

•H

a>
Cu

01

ta
O
Z

JJ

o

t-l

cu

H

cu 1
jj jj
U G
id cu

cd co c
£ rl 3
o
a

X

CU
JJ

JJ

CO u
cd o
cu S

H
■

JJ

o
d
>«-i jj cd
oi o
to «> Tt
id
u
. - Tt
91 ,H d
e cd bo
id U -rt
ot M at

I-i
91 |
JJ JJ
O
C
cd ai
U CO T)

bOTJ

Tl
U
CO O

JJ

jj
d
cu cd
to o

■Ho

»
o
h
cu
N

•

•-U-I u
J J fl c u
cd d n
O
fH

o
jj

bO
-rt O

fa co jj

•rt

01 T)
> 01

CO JJ

cd c
cu id

rH

CJ
ft
JJ t-l
CU -rt
OT C

d
•H
bo
cd
S

?*+t . ^

j j

•rt

ii

jj
d
jj to
cu u •
t o fi o

r l
CJ

IH
Ij
• •> iH fl)
Cu JJ C N
O Ih bO
t-i cd Tt o
Q C u t fl J J

C M
O fl
O 3
t r

•
O
Ih
01
N

Cu

O
C
0)

O 01
Z
r-

01
JJ
f-l

U-l
TJ
0)
fl
U-l
fl

 01

o OJ
a a>

91 91
ri 3
rH

■p

JJ t-l
>S tO O
rl CO 3
cd cu

j j

rl (0 TJ
cd cu d

cu u 3

cd bo tt •
3 G > JJ
fH ft cd
CB U bO O
> JJ C h t-i
•"•HO)
OJ rH C N
B !5 M

Ih

rH

CO bO to •
3 G > JJ

r H

d u
O -rt
O 3
t r
o a)

JJ

cd

r-l
fl
cd
cd rl bO O
> JJ d rH
W CO -H ll-l

fa

Z

bO

O

CO
fl

o
r

•rt
B

JJ

0)
CO

a. d
o td
u u

t-i

CU
Cu
CO

c

CU
O
Ih
O

fl

JJ
t-l
cd
CU

td

rH
CJ

as
•a


O

JJ
O

z

•a
ai
jj
jj

•H
CO

•H
01 Tl
> 01
d t-i
O
fl

6
rl

01

01
Cu

JJ

JJ

O

z

3
t r
O 91

o

Z

T l

T)

i-i
B
r.
0)

•rt
gcu

cu
j j
j j

g

O

z

Z

T )
01
JJ
JJ
fl

cu
jj
jj

IH

fa

O
T
M

cu

a.

r4
CJ

jj

jj

JJ

CJ

Cd
CJ

rJ

a>

j j
tn

▶Jeo<
H

8PQ 8O

fa

TJ

•rt

01

j j
O

JJ

Cu
o

z

co

Cd
H
rj
<

Z
3
o!

5S

cd bo bo

X G G T>
t ) fl - H C O
u jj cd jj
OJ JJ c
jj co oi u jj •
A co oi u 5s
3 ri 01 bO 01 u
r-i cu h cu >  cj cu d o ti
Id td h -rt o X

f01
CU

z

PS ID

r l

T )
0)
JJ
JJ
• H

ai

JJ
JJ

T t
C0+M
•
0) T>
> CD

C H
O -rt
O 3

0*
O CU

Z

U

G
O

ta

Tt
CO
U

O
•

•
CO
-H

01 tj iW JJ
>

CU

CM
O

U

rS
rt

fl

fl
In

0)

X>

«d

3 O X
cr m a
O 01 U rH

z u w «

ct) bp
J2 CT
CJ ft
t-i
a) jj
jj co
Cd

W)
d TJ
-H C O
jj cd jj
c
cu t-i jj •

CO

0)

>
W

O
fl )
Cd rl

d
fl

rl •
a) ti m •
> Q> Tt o
CM
ti

O
fl
o -o

u
•
a) t)

t-l

>
d
O

C
O

cj

3
cr
o a)
Z I-i

■tr
fl

ai

91
(X

ffh
S
O
Ilk
3
Z M td C

j j

JJ

ri
tu
JJ

rl
01

O
O

fl
3

H
rl
O 01

CO

a

Ct)

O

DOrl

•H

Cv. JJ
O r.
rl CO

o
3

or
fl)

O Cu

.

•C

CJ
CO

.

TJ
01
JJ
JJ

TS
01
JJ
JJ

l-l

a)

r l
0)
Cu

r l
01
CU

j j

JJ

JJ

JJ
JJ
fl

oi
j j

•H

.

1 - fl
O to

.

•rt

C

0)
fl
rH  cu

01
rJ
ti

#

T>

■H
Oj dj
co

>1

3 U 01 bO 01 u
ri oi h V > d
co jj cu -tJ c d

,

G
o

rl

•CrtO

T l
CO

•rt

CO

cd

•rt

tU-l

ta
91

•rt

3
cr

cu

to

eg
fa

91
JJ
JJ

•rt

g
cu

j j
j j

sf->

o.

JJ

z

O Cu 91 O
91 bO JJ
CU tn 01
JJ
JJ
JJ

• H

JJ

o

O d T) «
co oi o a
In CO CO fl
Cd OJ r&
J3 I-i U

T»
01

91
Cu

t
JJ

•
5s
H

« bO G
3 C Tt
rH
"H
Cd M bO
> JJ B

o
z

U
0)
>
C
O

Cd CO Tt O

|

rl

•
>>

U-l
•rt

CJ d T» ™
id ai d d
n co cd ft
id
cu
x
rd rl M
C J ( X fl )

O

oi bo jj

01 f-l 0)

jj
3
rH
cd
>
Cd

jj

jj

g-rl 91
-rt >
t-i bO C
jj d o
CO -rt O

fl
O

0)
JJ

JJ

Bo tj cu  TJ
CO
h
d
cd o cu bo

0)
jj
td •
u cu
C 3
3 rH
h cO
H >

01 TJ
> 01

tO

a
f |

CO
CO

cd

fH <-\
CJ OJ

cd :s
B «
0)

X
u
V5

• 4-4

\^

fH cd >-•

• H
JJ
5s OJ
cd xi
fH cd

G.X 91
co a s
•H fH 3
ct cd d

Q

o

r H

5s
u
cd 1 -rt

Cu J=
CO Cu
W

cd
01
j",

TJ
01

ts
cd
rH
a.
CO

•h

H
oi
DO
oi
JJ

d

5s
(0

fH T) JJ

o. 5 e

CO X iH
•rt -rt O

(=> -H

a u-i a

CO

-*

bo
C
TJ TJ JJ

01 91
T> X
O -rt
U U-l

G
fl
O
Ch

•a
S
Tl
O
cj
to

"-

n
-rt

jj jj ro
cd d B
O -rt M
rH O O
«j-i a c

fl

cu co
91 X U
tj
301
5 O rl
O Tl Q,

»
«

01

"S
o os
CJ o

0)
c u
Ss
JJ

cd
j j

o
r

+-

60485200 E

/-3^\

/fr^Slt\

TABLE 4-3. DATA TYPES FOR CONCATENATED KEYS

Schema Class (Type)

Subschema Type

counterparts in the schema, even though they are
defined as 2-dimensional arrays in the subschema.
The array TOP10 has fewer elements than its coun
terpart in the schema.

FORTRAN 5
Schema
Display Alphanumeric
(Type Character;
Picture X)

Character

Coded Fixed Point
(Type Fixed)

Integer

Coded Floating Point
Normalized (Type Float)

Real

Coded Double Precision
(Type Float)

Double
Precision

BAYNAME
QUANT
TOP10

PICTURE "A(10)"
PICTURE "999"
TYPE FIXED

OCCURS 16 TIMES.
OCCURS 2000 TIMES,
OCCURS 100 TIMES.

FORTRAN 5 Subschema
CHARACTERS 0 BAY NAME (2,8)
INTEGER QUANT(200,10), T0P10U0)
Figure 4-2. Schema/Subschema Differences |
in Array Size and Dimension

Array Declaration
J0^\

Arrays are declared in the subschema by type state
ments in the same format as those in a FORTRAN
program. The number of elements in an array is the
product of all its dimensions.
An array is defined in the schema as a vector, or a
repeating elementary item. Elementary data items
can be repeated either a fixed or varying number of
times. Arrays in the subschema correspond with
these repeating data items.
A vector in the schema can correspond to a sub| schema array with up to seven dimensions for a
FORTRAN 5 subschema. The number of elements in an
array must be less than or equal to the number of
o c c u r r e n c e s o f t h e s c h e m a v e c t o r. A r e p e a t i n g
e l e m e n t a r y i t e m i s c a l l e d a fi x e d o c c u r r e n c e
repeating item if the OCCURS clause which describes
i t i n t h e s c h e m a s p e c i fi e s t h e p r e c i s e n u m b e r o f
occurrences of the item.
| Figure 4-1 shows the schema and subschema declara
t i o n s f o r t w o a r r a y s . B o t h a r e fi x e d o c c u r r e n c e
elementary items in the schema.
Schema
RESULTS
TESTNUM

TYPE FLOAT
PICTURE "9(10)'

OCCURS 40 TIMES.
OCCURS 20 TIMES.

A repeating elementary item in the schema is called
a variable occurrence repeating item if a data name
is used in the OCCURS clause. in the schema, the
occurrences of a variable occurrence repeating item
(which correspond to the elements of the array in
the subschema) are indexed by the elementary item
referenced in the OCCURS clause. In a FORTRAN
subschema, this item must be declared whenever the
repeating item is declared. In the DML statements
in the applications program, the variable is used
to specify the number of occurrences of a repeating
item when a record is written. When a record is
read, CDCS sets the variable to the number of
occurrences actually in the record.
I f t h e s u b s c h e m a d e fi n e s a n i t e m t h a t i s u s e d i n
the schema to index the occurrences of a repeating
item, the subschema must also define the elementary
repeating item.
A subschema array that corresponds to a variable
o c c u r r e n c e r e p e a t i n g i t e m m u s t b e d e fi n e d i n t h e
subschema to have the maximum number of elements
p o s s i b l e ( t h e u p p e r l i m i t o f t h e C H E C K I S VA L U E
clause).
In figure 4-3, the number of occurrences of SYMBOL |
can vary from 1 to 12, depending upon the value of
ECOUNT. SYMBOL is a variable occurrence repeating
elementary item in the schema. SYMBOL is declared
as an array in the subschema with dimensions equal
t o t h e m a x i m u m v a l u e s p e c i fi e d i n t h e O C C U R S
clause. ECOUNT must also be declared in the sub
schema.

Subschema
REAL RESULTS(40)
INTEGER TESTNUM(20)

Schema
ECOUNT

I

r

Figure

4-1.

Fixed Occurrence
Elementary Items

The number of elements of the array declared in the
subschema can fall short of (but cannot exceed) the
number of occurrences of the item declared in the
schema. When the number falls short, the initial
elements of the array are matched to the initial
occurrences of the item.
| For example, in figure 4-2, the arrays BAYNAME and
QUANT have the same number of elements as their
60485200 E

SYMBOL

TYPE FIXED
CHECK VALUE 1 THRU 12.
PICTURE "A(10)
OCCURS ECOUNT TIMES.

FORTRAN 5 Subschema
INTEGER ECOUNT
CHARACTER*!0 SYMBOL(12)
F i g u r e 4 - 3 . Va r i a b l e A r r a y s i n
Schema and Subschema

4-5

Concatenated Key
A concatenated key is a primary or alternate record
key that is defined in the schema and is composed
of a series of contiguous elementary data items.
For a FORTRAN program to use this record key, all
the items in the concatenated key must be defined
in the subschema. For a primary concatenated key,
a l l t h e c o n s t i t u e n t i t e m s m u s t b e d e fi n e d i n t h e
subschema. If an alternate concatenated key is
used, all the constituent items must also be
defined in the subschema.
Figure 4-4 gives an example of how a concatenated
key is declared. By including the items in the
concatenated key in the subschema, the key is
automatically available for a program using the
subschema. Because FORTRAN does not .accept data
names which have more than seven characters or
which have hyphenation, the ALIAS statement is used
in the subschema to assign alternate names in place
of the names assigned in the schema. The
c o n c a t e n a t e d k e y n a m e I s n o t u s e d i n F O RT R A N
statements and does not need to conform to FORTRAN
syntax. In a FORTRAN program, the concatenated key
name can only be specified in the FORTRAN DML READ
and START statements.

Schema
SCHEMA NAME IS CONCATBASE

/*s^£\

AREA NAME IS CONCTKY.
RECORD NAME IS KEYLIST-REC WITHIN CONCTKY
01 ITEM-A PICTURE "X(10)M.
01 ITEM-B PICTURE "X(10)".
01 ITEM-C PICTURE "X(20)".
DATA CONTROL.

AREA NAME IS CONCTKY
KEY ID IS CONCAT 
Subschema Input
SUBSCHEMA FTCONCAT, SCHEMA=CONCATBASE
ALIAS (RECORD) KEYLREC=KEYLIST-REC
ALIAS (ITEM) ITEMA=ITEM-A
ALIAS (ITEM) ITEMB=ITEM-B
ALIAS (ITEM) ITEMC=ITEM-C
REALM CONCTKY

SUBSCHEMA PROGRAMMING
CONVENTIONS
The FORTRAN DDL subschema source program is com
posed of a series of statements that describe a
portion of a data base. The rules for coding DDLF
statements are similar to those for the version of
FORTRAN specified in the DDLF control statement.
The statements are described in the FORTRAN Sub
schema Syntax subsection that appears later in this
section. The following paragraphs describe the
I format of the statements.

LANGUAGE ELEMENTS
FORTRAN DDL statements consist of keywords, userd e fi n e d n a m e s , c o n s t a n t s , a n d o p e r a t o r s . T h e
operators are fully explained with the statements
in the FORTRAN Subschema Syntax subsection; the
remainder of the elements are described here.

Keywords
FORTRAN DDL keywords identify statements and
options within statements. Each statement begins
w i t h a s p e c i fi c k e y w o r d , a n d o t h e r k e y w o r d s a r e
used within statements. When a keyword is used, it
must be specified exactly as shown in the reference
f o r m a t s t a t e m e n t t h a t d e fi n e s t h e s y n t a x f o r t h e
particular DDLF statement. Keywords are shown in
uppercase in this manual. For a complete list of
keywords see appendix D.

User-Defined Names
User-defined names identify the schema, subschema,
realm, records, data items, and relations. They
are indicated in the formats by lowercase words.

4-6

RECORD, KEYLREC
CHARACTER *10 ITEMA
CHARACTER *10 ITEMB
CHARACTER *20 ITEMC
Subschema Output
PRIMARY KEY CONCAT (ITEMA,ITEMB,ITEMC) FOR
AREA CONCTKY
Figure 4-4. Declaring a Concatenated Key
All names are taken from the schema except for
schema entities that are renamed in the subschema
by the ALIAS statement. The rules for forming
names differ between data item names and all other
names as follows:
Data item names
Since these are used in the FORTRAN program
as variable and array names, they must
correspond to the FORTRAN rules. They must
be from one to seven characters long,
contain only letters and digits, and begin
w i t h a l e t t e r.
Other names
These are used only by DMS-170 and conse
quently follow the more lenient rules of
the schema. They must contain from 1 to 30
l e t t e r s , d i g i t s , o r h y p h e n s . T h e fi r s t
c h a r a c t e r m u s t b e a l e t t e r, a n d h y p h e n s
cannot be used at the beginning or end or
adjacent to each other.

60485200 E

,-rfSv

Since each data item appears in a type statement,
default types b a s e d o n t h e fi r s t l e t t e r of t h e i t e m
name are not applicable in the subschema. Non-data
base items (used in the RESTRICT statement) are not
given types by DDLF, and consequently must appear
in type statements in the FORTRAN program if other
than default types are desired for them.
A number of
program by
declaration of
can lead to

Integer constants consist of an optional sign
(+ or -) followed by 1 to 18 digits. For
example:
0
-12345
+2000
000000000000000004

variables are generated in the FORTRAN
t h e D M L p r e p r o c e s s o r ; d e fi n i t i o n o r
these variables in a FORTRAN program
invalid results. A complete list of

Real constants consist of an optional sign (+
or -) followed by a string of digits containing
exactly one decimal point* The maximum number
of digits is 15. The decimal point can be
anywhere within the string; that is, the number
can consist of a fractional part, a whole
number part, or both. For example:

| these variables can be found in table 4-4. The
variable names indicated in this table must be
s p e c i fi e d a s u s e r - d e fi n e d n a m e s i n a s u b s c h e m a
source program.

0.
-3.22
+4000.
-.5
.0
1.414

TABLE 4-4. NAMES OF VARIABLES AND COMMON BLOCKS
GENERATED BY THE DML PREPROCESSOR
Name

/0^\

Explanation

DBFnnnn

nnnn is 0001 through 9999

DBInnnn

nnnn is 0001 through 9999

DBNnnnn

nnnn is 0001 through 9999

Rules for nonnumeric constants depend on the
version of FORTRAN. In a subschema for a I
FORTRAN 5 program, the constant can be a
character constant (a string of from 1 to 255
characters delimited by apostrophes) or a
Hollerith constant (a string of from 1 to 10
characters delimited by quotation marks). If a
delimiting character is to be used in the
s t r i n g , t h e c h a r a c t e r m u s t b e s p e c i fi e d t w i c e
for each occurrence. For example, "A""B" would
yield the constant A"B; "C"D" would yield the
constant CD. For example:

DBREALM
DBRELST
DBRUID
DBRnnnn

nnnn is 0001 through 9999

FORTRAN 5 Hollerith constant
"MAX10CHARS"

DBSCNAM
FORTRAN 5 character constant
'CATS & DOGS'

DBSTAT
DBSnnnn

nnnn is 0001 through 9999

FORTRAN DDL STATEMENT FORMAT

DBTEMP
DBTnnnn

nnnn is 0001 through 9999

DBnnnn

nnnn is 0001 through 9999

FORTRAN DDL statements occupy from 1 to 100 char
a c t e r p o s i t i o n s ( c o l u m n s ) i n a s o u r c e l i n e . Ta b l e
4-5 shows the usage of the character positions |
within the source line.

Dnnnnxx

nnnn is 0001 through 9999
and xx is AA through ZZ

TABLE 4-5. COLUMN USAGE IN FORTRAN DDL
STATEMENTS
Column

Constants
With a few restrictions, constants appearing in
DDLF statements follow the rules for FORTRAN
constants. These rules are defined in the FORTRAN
reference manual corresponding to the version of
FORTRAN specified on the control statement used to
compile the subschema. The constants allowed are
restricted to integer or real constants without
exponents, and to strings delimited by quotation
marks or to strings delimited by apostrophes. The
following forms are not allowed: double precision,
complex, logical, octal, and hexadecimal constants;
Hollerith constants in H, L, or R format; and real
constants with exponents. The following items
indicate constants that can be used:

60485200 E

Usage

1

C or * indicates a comment line.

1-5

Optional statement label containing
o n e t h r o u g h fi v e d i g i t s .

6

Character other than blank or zero
indicates a continuation line; does
not apply to comment lines.

7-72

Text of FORTRAN DDL statements.

73-100

I d e n t i fi c a t i o n fi e l d , l i s t e d b u t n o t
otherwise processed by DDL.

4-7

No statement can begin on a line that includes any
part of the previous statement; the $ statement
separator is not used.
The following paragraphs describe other aspects of
coding FORTRAN DDL statements.

Character Set
The FORTRAN DDL character set is a subset of the
FORTRAN character set. It consists of the letters
A through Z, the digits 0 through 9, and the fol
lowing special characters:

Equal

Continuation
Statements can be continued for more than one
line. A character other than a blank or zero in
column 6 indicates that the line is a continuation
line. Columns 1 through 5 of a continuation line
must contain blanks. A line with a C or * in
column 1 and any character in column 6 is a comment
line, not a continuation line. The maximum number
of continuation lines in one statement is 19.
The END statement cannot be continued.

Blank
=

T h i s e x a m p l e c l a r i fi e s t h a t D O U B L E a n d
PRECISION are considered separate keywords,
even though they are used together.

sign

Statement Labels
t
(

Comma
Left

parenthesis

) Right parenthesis
.

Decimal

"

Quotation

'

Apos

+

point
mark

trophe

Plus

sign

Minus sign
In addition, any character (appendix A) can be used
in character constants and in comments.

Blanks
U n l i k e F O RT R A N s t a t e m e n t s , i n w h i c h b l a n k s a r e
ignored (except in character constants), DDLF
s t a t e m e n t s f o r b i d o r r e q u i r e b l a n k s i n s p e c i fi c
cases. The rules are as follows:
Blanks are significant in character constants.
Keywords, user-defined names, relational oper
ators, and constants cannot be interrupted by
blanks.
Permitted:
RESTRICT RECA(ITEM1.EQ.5.0)
Not permitted:
REST RICT REC A(ITEM 1. EQ.5 .0)
Keywords must be separated from adjacent names
by at least one blank. Blanks are not required
when a keyword is set off by other special
characters.
Permitted:
DOUBLE PRECISION DI, D2(10,20),D3
Not permitted:
DOUBLEPRECISIOND1,D2(10,20),D3

4-8

As in FORTRAN, any statement can contain a label in
c o l u m n s 1 t h r o u g h 5 . A l a b e l i s a o n e t o fi v e
d i g i t i n t e g e r. L a b e l s d o n o t a ff e c t D D L F p r o c e s s
ing, but can be included for documentary reasons.
No diagnostic is issued if the same label is used
more than once.
Labels on type statements become FORTRAN statement
labels when the type statements are copied into the
FORTRAN source program. In the FORTRAN program,
t y p e s t a t e m e n t s a r e s p e c i fi c a t i o n s t a t e m e n t s a n d
are not executable. If any label on the type
statements duplicates a label on another FORTRAN
statement, a diagnostic is issued by the FORTRAN
compiler.

Comment Lines
A line with a C or * in column 1 is a comment
line. Comment lines are copied to the DDLF output
listing but are not otherwise processed. Comments
can contain any character in the character set.
Comments do not interrupt statement continuation.

Blank Lines
Blank lines can be used freely between statements
to produce blank lines on the source listing. With |
FORTRAN 5, a blank line is considered a comment
line and does not break the continuation sequence.

FORTRAN SUBSCHEMA SYNTAX
The source program for a FORTRAN subschema contains
various statements. The following paragraphs
define the format specifications for each statement
that can be used in the FORTRAN subschema source
program. The keywords used in each statement are
indicated by capital letters. Keywords and punctu
ation must appear exactly as shown in the reference
format statements.
The general format of a FORTRAN subschema is shown
i n fi g u r e 4 - 5 .
For the rules governing the structure and coding of
FORTRAN subschemas, refer to the Subschema Struc
turing Requirements subsection and to the Subschema
Programming Conventions subsection. (Both sub
sections appear earlier in this section.)

60485200 E

ALIAS STATEMENT
SUBSCHEMA statement

0S&*\

The ALIAS statement is used to change the name of
an entity from the name used in the schema to the
name used in the subschema. The name to be changed
can be a realm, a record, or a data item. The for
mat of the ALIAS statement is shown in figure 4-7.

[ALIAS statement] ...
{REALM statement} ...
( RECORD statement \
\ { Ty p e s t a t e m e n t } . . . i ' "
[ R E L AT I O N s t a t e m e n t " I
LCRESTRICT statement] ...J"'
END statement

The ALIAS statement is optional; if used, it must
immediately follow the SUBSCHEMA statement.

SUBSCHEMA STATEMENT

Assigning an alias in the subschema does not change
the name in the schema; it is a substitute name
that is used only in the subschema and in the
FORTRAN programs referencing the subschema. The
old name must appear in the schema; once an alias
has been assigned, the new name, rather than the
old name, must be used exclusively in the subschema
and the FORTRAN program.

The SUBSCHEMA statement must be the first statement
in every FORTRAN DDL program. It names the schema
and the subschema. Only one SUBSCHEMA statement
can appear. The format of the SUBSCHEMA statement
is shown in figure 4-6.

The ALIAS statement must specify a name type
option; REALM, RECORD, and ITEM. The name type
specified (for example, ITEM) applies to all names
in that ALIAS statement.

SUBSCHEMA subschema-name, SCHEMA = schema-name

Any number of ALIAS statements can be used, but ao
old name or new name can appear more than once
within the set of ALIAS statements in a subschema.

Figure 4-5. General Format,
FORTRAN Subschema

Figure 4-6. SUBSCHEMA Statement Format
The subschema named in the SUBSCHEMA statement is
used whenever the subschema is referenced after it
has been compiled and stored in the subschema
library. The name must be unique among subschemas
associated with the designated schema.
The schema-name identifies the schema to which the
subschema belongs. The file containing the schema
directory must be available to the compiler when
the subschema is compiled.

The ALIAS statement must be used to change item
names longer than seven characters or containing
hyphens. Such names are valid in the schema but
are not legal symbolic names in FORTRAN. The
exception is a concatenated key name which can only
be referenced in a DML READ statement or START
statement. An ALIAS statement is not required to
change a concatenated key name that is longer than
seven characters or contains hyphens; in this case,
i t w i l l b e i g n o r e d i f s p e c i fi e d b e c a u s e t h e k e y
name is not a data item. Examples of assigning
aliases are shown in figure 4-8.

(REALM)
ALIAS { (RECORD) > new-name-1 = old-name-1 [, new-name-2 = old-name-2j
( (ITEM) )

y^Sf&BV

Formats for old-name (with ITEM option only):
old-item-name
old-item-name.old-record-name
Figure 4-7. ALIAS Statement Format

r

60485200 E

4-9 |

statements must immediately follow the last ALIAS
statement; otherwise, they must immediately follow
the SUBSCHEMA statement.

Example 1
Schema:
01 LAST-IN-FIRST-OUT PICTURE "X(10)".
Subschema:
ALIAS (ITEM) LIFO = LAST-IN-FIRST-OUT

Example 2

Any number of REALM statements can be included, but
no realm can be named more than once. All realms
named must appear in the schema. The ALL option
specifies that all the realms defined in the schema
a r e t o b e a v a i l a b l e t o t h e s u b s c h e m a . U n l e s s the
ALL option is used, only those realms named in a
REALM statement are available to the subschema and
to the FORTRAN programs referencing the subschema.

RECORD DEFINITION

Schema:
RECORD NAME IS TOTAL-REC.
01 ACCOUNT PICTURE "99999".

RECORD NAME IS PARTIAL-REC.
0 1 A C C O U N T P I C T U R E •99999".
Subschema:
ALIAS (ITEM) ACNTTOT = ACCOUNT.TOTAL-REC,
1 ACNTPAR = ACCOUNT.PARTIAL-REC
Figure 4-8. Assigning Aliases

The form old-item-name.old-record-name must be used
to provide unique names within the FORTRAN program
when the same name appears in two different records
in the schema. Example 2 in figure 4-8 illustrates
qualifying an old-item-name with an old-record-name.
REALM STATEMENT
The REALM statement identifies the specific schema
areas that are used in the subschema and in the
FORTRAN application programs referencing the sub
schema. Realm and area are subschema and schema
terms, respectively, for what is known to the oper
ating system and to FORTRAN as a file. The format
of the REALM statement is shown in figure 4-9.

\realm-name-1 C, realm-name-2]

•••}

Figure 4-9. REALM Statement Format
At least one REALM statement must appear in the
subschema. If ALIAS statements are used, the REALM

A record definition is composed of a RECORD state
ment followed by one or more type statements. The
r e c o r d d e fi n i t i o n s m u s t i m m e d i a t e l y f o l l o w t h e
REALM statements, and each subschema must contain
a t l e a s t o n e r e c o r d d e fi n i t i o n . E a c h r e c o r d d e fi
nition corresponds to a record type defined in the
schema.
The type statements following a RECORD statement
specify those data items occurring within the
record that are to be used in the subschema. These
data items can be used as variables or arrays in
t h e F O RT R A N p r o g r a m . T h e t y p e s t a t e m e n t s a l s o
define the FORTRAN data types of the items, as well
as the number of dimensions and size of arrays.
Data items not included in the subschema cannot be
accessed by the FORTRAN program. The items defined
for a record in the subschema can differ in order,
number, and (in some cases) type from the equiva
l e n t d e fi n i t i o n s i n t h e s c h e m a . F o r m o r e i n f o r m a
tion, refer to the Schema/Subschema Compatibility
subsection which appears earlier in this section.

RECORD Statement
The RECORD statement identifies a schema record
that is to be used in the subschema. Any number of
RECORD statements, each followed by a group of type
statements, can appear in the subschema, but no
record name can be used more than once. The format
of the RECORD statement is shown in figure 4-10.

RECORD record-name

Figure 4-10. RECORD Statement Format
Each record specified in a RECORD statement must
appear in the schema. The schema links record
types with areas; the area associated with a record
in the subschema must appear in a REALM statement.
Only one record type per realm in the subschema is
permitted.

z ^ f fi S y

4-10

60485200 E

Type Statements
/fjf^N

Ty p e s t a t e m e n t s i d e n t i f y a n d d e s c r i b e t h e d a t a
items that are to be made available to the sub
schema and the applications program. The DDLF
compiler recognizes the same type statements as the
version of the FORTRAN compiler specified in the
DDLF control statement. The rules governing type
statements and the amount of storage allocated to

each variable are described in the FORTRAN 5 |
reference manual. The formats of the type
statements are shown in figure 4-11.
FORTRAN 5 allows the following type statements: I
CHARACTER, BOOLEAN, REAL, INTEGER, LOGICAL,
COMPLEX, and DOUBLE PRECISION. FORTRAN 5 syntax |
requires ' that both the keywords DOUBLE and
PRECISION be specified.

FORTRAN 5 Format
CHARACTER [*default-length [,]] item-name-1 [*len-1] [,item-name-2 [*len-2]]
BOOLEAN
REAL
INTEGER
LOGICAL
COMPLEX
DOUBLE PRECISION

item-name-1 [,item-name-2]

In a CHARACTER type statement, default-length and len must be positive integer constants. If neither defaultlength nor len is specified, 1 is assumed.
In each type statement, the formats for item-name are:
item-name
item-name (d1 [,d2] . . .)
where d specifies the bounds of an array dimension. From one through seven bounds can be specified for an array.
The formats for d are:
upper-bound
lower-bound: upper-bound
where the bound specification must be an integer constant: positive, zero, or negative. The upper-bound must be
greater than or equal to the lower-bound. (When the lower-bound is not specified, 1 is assumed.)

Figure 4-11. Type Statement Formats

j00*\

60485200 E

4-11

Each data item referenced in the subschema must
a p p e a r i n a t y p e s t a t e m e n t . I f i t i s a n a r r a y, i t s
dimensions are given in the same type statement.
No item can appear in more than one type state
ment. If an item occurs in more than one record
type in the schema, it must be renamed by the ALIAS
statement in the subschema. Since each item
appears in a type statement, implicit typing
a c c o r d i n g t o t h e fi r s t l e t t e r o f t h e i t e m n a m e i s
not recognized by the DDLF compiler.
Each item appearing in a type statement must be
defined in the schema. (It could be defined under
a different name if it appears in the ALIAS state
ment in the subschema.) Each item defined as an
array must be defined in the schema with the OCCURS
clause. The number of elements in the subschema
array must not exceed the number of occurrences in
the schema vector.

RELATION Statement
T h e R E L AT I O N s t a t e m e n t s p e c i fi e s t h a t a r e l a t i o n
d e fi n e d i n t h e s c h e m a i s t o b e a v a i l a b l e t o t h e
FORTRAN program. Any number of RELATION statements
can appear, but no relation can be named more than
o n c e . T h e f o r m a t o f t h e R E L AT I O N s t a t e m e n t i s
shown in figure 4-13.
The relation-name must be the same name specified
in the RELATION NAME clause in the schema. The
s c h e m a s p e c i fi e s w h i c h r e a l m s a n d r e c o r d t y p e s
apply to a relation. When a relation is declared
in the subschema, the associated realms and record
types must also be declared in the subschema.

RELATION relation-name
Figure 4-13. RELATION Statement Format

At least one type statement must be associated with
each RECORD statement, even if no items are used by
the FORTRAN program (for example, a program that
c o u n t s t h e n u m b e r o f r e c o r d s i n a fi l e ) . T h e
variable that is the primary key for the realm must
be included in the subschema; alternate keys must
be included only if actually used in the program.
F i g u r e 4 - 1 2 s h o w s t w o r e c o r d d e fi n i t i o n s . T h e
variables A, B, and X and the array C are to be
made available from the record type REC1; the
variables D, E, and J and the array H are to be
I made available from the record type REC2.

RECORD REC1
INTEGER A, B, C(12)
REAL X
RECORD REC2
INTEGER D, E
COMPLEX H(2,3,4)
CHARACTER*20 J
Figure 4-12. Defining Records
For examples of correspondence between type state
ments in the subschema and item descriptions in the
schema, refer to the Schema/Subschema Correspon
dence subsection which appears earlier in this
section.

RELATION DEFINITION
A r e l a t i o n d e fi n i t i o n i s c o m p o s e d o f a R E L AT I O N
statement optionally followed by any number of
R E S T R I C T s t a t e m e n t s . R e l a t i o n d e fi n i t i o n s a r e
optional; if used, they must immediately follow the
last group of RECORD and type statements.
The RELATION statements specify the schema rela
tions to be made available to the FORTRAN program.
RESTRICT statements restrict records accessed by a
relation to those which satisfy a logical expres
sion. The RESTRICT statements immediately follow
ing a RELATION statement describe restrictions on
that relation.

4-12

RESTRICT Statement

The RESTRICT statement limits a relation by speci
fying criteria that must be satisfied by a record
occurrence on a read before it is made available to
the FORTRAN program. The format of the RESTRICT
statement is shown in figure 4-14.
RESTRICT statements are optional; any number can
appear with a RELATION statement. However, only
one RESTRICT statement can be included for a given
record. All records referenced must be defined in
the schema and must be in a realm that is joined by
the relation named in the preceding RELATION state
ment.
The entities to be compared in the logical expres
sion of a RESTRICT statement are data base items,
non-data-base items, and constants. A maximum of
1024 data base items, non-data-base items, con
stants, and operators can appear in the restrictions
on any one relation. The following rules apply to
the entities that can be compared in the logical
expression of a RESTRICT statement:
A data base item must be defined in the sub
schema as part of the record. It must not be
described in the schema through VIRTUAL RESULT
or DECODING data base procedures. It must be a
variable or an array element with a constant
subscript. When two data base items are
compared, they must be the same size and must
be compatible as determined from the schema
data class of each item. Items of schema data
classes 0 through 4 (items stored as display
code) are compatible. An item of any other
schema data class is compatible only with an
item of the same schema data class.
Non-data-base items are simple variables that
appear in the FORTRAN program but are not
defined in the subschema. Use of a non-data
base item in a RESTRICT statement allows
dynamic qualification of a relation. Non-data
base items must agree in size and type with the
subschema representation of the data base items
to which they are being compared. Results are
unpredictable if the size and type are not
identical.

60485200 E

RESTRICT record-name-1 (logical-expression-1) [, record-name-2 (logical-expression-2)].
Format of logical expression:

[.N°T] "ldb-item-1

[r]

db-item-2
constant-1
non-db-item-1

[(]db-item-3

[)]

db-item-4 J
constant-2 > [)]
non-db-item-2 1

Figure 4-14. RESTRICT Statement Format
C o n s t a n t s a r e r e a l , i n t e g e r, H o l l e r i t h , o r
character constants. (Character constants are
allowed only in FORTRAN 5.) The forms allowed
for constants are shown in the Constants sub
section which appears earlier in this section.
A constant must be compatible with the schema
representation of the data base item to which
it is being compared.
When a data base item is compared to another data
base item or to a non-data-base Item, both items
must have the same size and type. Complex and
l o g i c a l i t e m s a r e n o t a l l o w e d . R e a l , i n t e g e r, a n d
double precision items are compared by magnitude.
If a data base item is described as an integer in
the subschema and as a display item in the schema
(schema classes 0 through 4), it is assumed to
contain character data and can only be compared to
a data base item similarly described, to a com
patible non-data-base item, or to a Hollerith
constant. A real or integer constant can be com
pared to a data base item of any numeric type
( r e a l , i n t e g e r, o r d o u b l e p r e c i s i o n ) ; a p p r o p r i a t e
conversion is performed before the magnitudes are
compared.
Logical expressions are interpreted the same as in
FORTRAN. Valid and invalid logical expressions are
shown in figure 4-15.

Valid Expressions
ITEM1 .GT. ITEM2
X .GE. 4.23 .AND.I .LT. 4
(FIRST .EQ. LAST) .AND. (SECOND .GT. THIRD)
I .OR. .NOT. FOURTH .GT. 0
Invalid Expressions
.NOT. ((I .GT. 2) .OR. (J .GT. 3))
Two levels of nesting are not permitted.
LOGICAL L
A .GT. B .OR. L
Logical variables are not allowed.
COMPLEX C,D
C .GT. D
Complex variables are not allowed.
Figure 4-15. Examples of Logical
Expressions

END STATEMENT
The END statement must be the last statement in
every FORTRAN DDL subschema source program. The
END statement cannot be continued. No statements
or comment lines can appear after the END state
ment. The format of the END statement is shown in
figure 4-16.

SUBSCHEMA COMPILATION AND
SUBSCHEMA LIBRARY MAINTENANCE
The FORTRAN DDL subschema source program is com
piled by the FORTRAN DDL (DDLF) compiler. The DDLF
compiler generates a subschema directory or object
subschema from the subschema source program. A
subschema directory is often simply called the
subschema.

60485200 E

END
Figure 4-16. END Statement Format
T h e D D L F c o m p i l e r i s a m u l t i f u n c t i o n a l c o m p i l e r.
I n a d d i t i o n t o g e n e r a t i n g a s u b s c h e m a d i r e c t o r y,
the compiler stores the directory in a subschema
library and performs maintenance operations on the
subschema library. A subschema can be used with a |
FORTRAN 5 application program, depending on the
l a n g u a g e v e r s i o n s p e c i fi e d i n t h e D D L F c o n t r o l
statement. More than one subschema can be compiled
with one control statement call to the DDLF com
p i l e r. T h e p a r t i c u l a r o p e r a t i o n t o b e p e r f o r m e d b y
the DDLF compiler is selected by a parameter in the
DDLF control statement.

4-13

The field length requirements for subschema compi
lation are indicated in appendix G.

SUBSCHEMA LIBRARY
One or more compiled subschemas are stored in a
p e r m a n e n t fi l e c a l l e d t h e s u b s c h e m a l i b r a r y. T h e
l i b r a r y i s c r e a t e d w h e n t h e fi r s t s u b s c h e m a i s
stored in it. Subschemas for both language ver
s i o n s c a n r e s i d e i n t h e s a m e s u b s c h e m a l i b r a r y.
Subsequent subschemas can be added to the library
or can replace existing subschemas in the library.
A subschema can be deleted from the library with a
purge parameter on the DDLF control statement. A
subschema library that has had subschemas replaced
or purged can be transferred to a n«w, compacted
subschema library.
Data security can be maintained by creating more
than one subschema library in order to control the
availability of the subschemas to the FORTRAN
programs.
Subschemas providing access to data that is
r e s t r i c t e d t o s p e c i fi c a p p l i c a t i o n s c a n b e s t o r e d
in one subschema library while subschemas for
g e n e r a l u s e c a n b e s t o r e d i n a d i f f e r e n t l i b r a r y.
E a c h l i b r a r y i s i d e n t i fi e d b y a u n i q u e p e r m a n e n t
fi l e n a m e . W h e n t h e a p p l i c a t i o n p r o g r a m i s c o m
piled, a subschema library must be attached by
specifying the permanent file name of the library.
Subschemas stored in other libraries are not avail
able to the program.

DDLF CONTROL STATEMENT

F5
Specifies a subschema for use with a
FORTRAN 5 application program.
The SB parameter identifies the local file name of
t h e s u b s c h e m a l i b r a r y fi l e . T h i s p a r a m e t e r i s
interpreted as follows:
omitted

Local file SBLFN is assumed to contain the
subschema library.
SB=lfn
T h e l o c a l fi l e n a m e s p e c i fi e d I d e n t i fi e s
t h e fi l e t h a t c o n t a i n s t h e s u b s c h e m a
l i b r a r y.
The A, N, NL=lfn, P and R parameters along with a
default operation select subschema library mainte
nance operations. If none of these parameters is
selected, the following library maintenance opera
tion is assumed: adding the compiled subschema to
the subschema library. Only one of the operations
selected by these parameters can be performed in a
s i n g l e e x e c u t i o n o f t h e D D L F c o m p i l e r. I f m o r e
t h a n o n e o f t h e s e p a r a m e t e r s i s s p e c i fi e d , a
control statement error is issued. If a library
manipulation function is attempted on a nonempty
fi l e t h a t d o e s n o t c o n t a i n a l i b r a r y, a d i a g n o s t i c
is issued and the job is aborted. The parameters
are interpreted as follows:
omitted

The DDLF control statement calls the DDLF compiler
for execution. It provides the DDLF compiler with
information related to a specific subschema, speci
fi e s t h e l i s t i n g s t o b e g e n e r a t e d , a n d s p e c i fi e s
the subschema library maintenance operations to be
performed. The for m a t o f t h e D D L F c o n t r o l s t a t e
m e n t i s s h o w n i n fi g u r e 4 - 1 7 . O p t i o n a l l y , t h e
comma immediately following DDLF can be replaced by
a left parenthesis; the terminating period can be
replaced by a right parenthesis.
All the parameters o f t h e D D L F c o n t r o l s t a t e m e n t
are optional.
parameter
interpreted
I T
h e F 5 p ais
ram
e t e r s e l e c as
t s lfollows:
anguage version. This
omitted
I F5 is the default that is assumed.

Each subschema source program in the job
stream is compiled and added to the
s u b s c h e m a l i b r a r y i d e n t i fi e d b y t h e S B
parameter.

A u d i t p a r a m e t e r. A l i s t o f t h e s u b s c h e m a s
and their corresponding schemas, together
with their creation dates, is produced from
the subschema library identified by the SB
parameter.

Compile parameter. Each subschema source
program in the job stream is compiled but
not added to the subschema library identi
fied by the SB parameter.

/A
,N
DDLF [C,F53] C,SB=lfn]

,NL=lfn

C,SC=lfn]C,I=lfn]C,L=lfn3C,L0=op],

Figure 4-17. DDLF Control Statement Format for FORTRAN Subschemas

4-14

.^•SSv

60485200 E

NL=lfn

L=0

N e w l i b r a r y p a r a m e t e r. T h e s p e c i fi e d l o c a l
fi l e n a m e i d e n t i fi e s a n e w s u b s c h e m a
library to which the active subschemas in
the subschema library, identified by the SB
p a r a m e t e r, a r e t r a n s f e r e d . I f t h e N L
p a r a m e t e r i s s p e c i fi e d w i t h n o fi l e n a m e
i n d i c a t e d , l o c a l fi l e n a m e N E W L I B i s
assumed.

Purge parameter.
the job stream is
l i b r a r y i d e n t i fi e d
compilation takes

A subschema specified In
purged from the subschema
b y t h e S B p a r a m e t e r. N o
place.

Replace parameter. Each subschema source
program in the job stream is compiled and
replaces the existing subschema (identified
by the SUBSCHEMA statement) in the sub
schema library (identified by the SB param
eter) . Replacement takes place only if no
compilation errors other than informative
diagnostics are encountered.
T h e S C p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s t h e s c h e m a d i r e c t o r y. A s p e c i fi e d l f n
overrides the default file name determined from the
SUBSCHEMA statement. The parameter is interpreted
as follows:
omitted

0^\

T h e fi r s t s e v e n c h a r a c t e r s o f t h e s c h e m a
name specified in the SUBSCHEMA statement
of the subschema source program is assumed
t o i d e n t i f y t h e l o c a l fi l e t h a t c o n t a i n s
the schema directory.
SC=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
the file that contains the schema directory.
T h e I p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
contains source input for the DDLF compiler. This
parameter is interpreted as follows:
omitted
The local file INPUT is assumed to contain
the source input for the DDLF compiler.
1=1 fn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t c o n t a i n s s o u r c e i n p u t f o r t h e
DDLF compiler.
T h e L p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
receives listings and diagnostics generated by the
D D L F c o m p i l e r. T h i s p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted
The local file OUTPUT receives the listings
and diagnostics generated by the DDLF
compiler.
60485200 E

T h e l o c a l fi l e O U T P U T r e c e i v e s o n l y t h e
diagnostics generated by the DDLF compiler.
L=lfn
T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t r e c e i v e s t h e l i s t i n g s a n d
diagnostics generated by the DDLF compiler.
The LO parameter selects the listing produced by
the DDLF compiler. Two listing options (op) can be
s p e c i fi e d : a s o u r c e l i s t i n g ( S o p t i o n ) a n d a n
object listing (0 option). Source and object list
i n g s a r e w r i t t e n t o t h e fi l e s p e c i fi e d b y t h e L
p a r a m e t e r . I f L = 0 i s s p e c i fi e d , n o l i s t i n g i s
produced except for error messages regardless of LO
s p e c i fi c a t i o n . T h e p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted
Same as L0=S; a source listing is produced.
LO
Same as L0=S; a source listing only is
produced.
L0=op
L0=opit/op2
T h e s p e c i fi e d l i s t i n g o p t i o n s e l e c t s t h e
listing produced. The listing options are
as follows:
S Source listing
0 Object listing

SUBSCHEMA COMPILATION AND
LIBRARY MAINTENANCE OPERATIONS
The FORTRAN subschema must be coded according to
t h e s p e c i fi c a t i o n s i n t h i s m a n u a l . S u b s c h e m a
source code can be entered through a terminal,
processed by a text editor, and stored in a file.
The DDLF compiler can be executed from a terminal
and through a batch job in the following ways.
When executed from a terminal, the subschema pro
gram must reside on a file whose name is indicated
by the I parameter of the DDLF control statement.
In a batch job in which the input file for the DDLF
compiler is assumed to be local file INPUT, the job
stream must be structured so that the control
statements precede the subschema source program.
An end-of-record indicator must immediately precede
the first line of subschema source code to separate
the subschema program from the control statements.
Control statements in the job stream and the
resulting subschema source program are used by the
DDLF compiler either to compile the subschema and
to store it in the subschema library or to perform
a subschema library maintenance operation such as
replacing or deleting subschemas, generating a new,
compacted subschema library, or producing an audit
listing. The parameters in the DDLF control state
ment select the operation to be performed. Other
control statements provide information for the
operating system to make necessary information
available for the DDLF compiler.
4-15

The following paragraphs indicate the parameters
required in the DDLF control statement to accom
plish compilation of FORTRAN subschemas and to
perform subschema library maintenance operations.
Examples of batch jobs that accomplish the opera
tions are shown. The DDLF control statements used
| in the examples indicate FORTRAN 5 subschemas.
Control statements are shown for both the NOS and
NOS/BE operating systems.

Compiling a Subschema
The source program for a subschema can be compiled
without being stored in the subschema library. The
form of the DDLF control statement necessary to
compile a subschema is as follows:
DDLF,F5, SB»lfn,N, SC=-lfn.
The compile parameter (N) must be specified. The
| language version parameter (F5) is optional and has
a default value. The SB, SC, I, L, and LO
parameters are optional and have default values
(refer to the DDLF Control Statement subsection).
Figure 4-18 illustrates a job that accomplishes
subschema compilation only. The schema file must
be attached.

Creating a Subschema Library
T h e s u b s c h e m a l i b r a r y i s c r e a t e d w h e n t h e fi r s t
subschema is stored in it. The form of the DDLF
control statement necessary to create a subschema
library and store a subschema in it is as follows:
DDLF,F4,SB=lfn,SC=lfn.

The language version parameter (F5)
has a default value. The SB, SC,
parameters are optional and have
(refer to the DDLF Control Statement

is optional and |
I, L, and LO
default values
subsection).

Figure 4-19 illustrates a job that compiles a
subschema and creates a subschema library. In this
example, the schema file SCHPAY is attached. The
s u b s c h e m a l i b r a r y i s i d e n t i fi e d b y t h e l o c a l fi l e
name SUBSCH. The DEFINE and REQUEST/CATALOG
c o n t r o l s t a t e m e n t s s p e c i f y t h e l o c a l fi l e n a m e o f
the subschema library and assign it to a permanent
file device. A password specified in the DEFINE or
CATALOG statement controls subsequent access and
use of the subschema library.
If only one subschema is to be stored in the
l i b r a r y, t h e s u b s c h e m a n a m e c a n b e u s e d f o r the
subschema library file name.

Compiling Multiple Subschemas
A number of subschemas can be compiled with one
c o n t r o l s t a t e m e n t c a l l t o t h e D D L F c o m p i l e r. T h e
parameters specified in the control statement apply
to all the subschemas. The subschema library
maintenance operations of creating a subschema
l i b r a r y, o f a d d i n g ( d e f a u l t o p e r a t i o n ) s u b s c h e m a s
t o t h e s u b s c h e m a l i b r a r y, o f r e p l a c i n g ( R p a r a m
eter) subschemas in the library, or of just compil
ing (N parameter) subschemas can be used with this
f a c i l i t y.
For the compilation of several subschemas with one
c o n t r o l s t a t e m e n t c a l l t o t h e D D L F c o m p i l e r, t h e
subschema source statements must be contiguous,
with no intervening end-of-record indicator or

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
DDLF,F5,SB=SBTST,N,SC=SCHPAY.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
DDLF,F5,SB=SBTST,N,SC=SCHPAY.

End-of-record

DDL Subschema Source Input
End-of-information

Figure 4-18. Compiling a Subschema

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
DEFINE,SUBSCH/PW=DDL,CT=PU,M=W.
DDLF,F5,SB=SUBSCH,SC=SCHPAY.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
REQAJEST,SUBSCH,PF.
DDLF,F5,SB=SUBSCH,SC=SCHPAY.
CATALOG,SUBSCH,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.
End-of-record
DDL Subschema Source Input
End-of-i n fo rmat i on

Figure 4-19. Creating a Subschema Library

4-16

60485200 E

/SffiBiK

/£p^v

e n d - o f - i n f o r m a t i o n i n d i c a t o r. T h e p r o g r a m s o u r c e
for each subschema must begin with the SUBSCHEMA
statement. Each subsequent SUBSCHEMA statement
must immediately follow the END statement of the
preceding subschema. Each subschema Is compiled in
turn until end-of-information or end-of-record is
encountered.

Replacing a Subschema
A new subschema can replace
t h e s u b s c h e m a l i b r a r y. T h e
control statement necessary to
in the subschema library is as

one that is stored in
form of the DDLF
replace a subschema
follows:

D D L F, F 5 , S B = l f n , R , S C = l f n .

Compiling a Subschema and
Adding to a Subschema Library
Once the subschema library has been created and
made a permanent file (as described in the Creating
a Subschema Library subsection), new subschemas can
b e a d d e d t o t h e l i b r a r y. T h e f o r m o f t h e D D L F
control statement necessary to add a subschema to
an existing subschema library is as follows:
DDLF,F5,SB=lfn,SC=lfn.
The SB and SC parameters are optional and have
default values. The I, L, and LO parameters must
b e s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t a p p l i c a b l e
f o r i n p u t a n d o u t p u t fi l e s o r f o r t h e l i s t i n g
option (refer to the DDLF Control Statement sub
section).

|

T h e r e p l a c e m e n t p a r a m e t e r ( R ) m u s t b e s p e c i fi e d .
The language version parameter (F5) is optional and |
has a default value. The SB, SC, 1, L, and LO
parameters are optional and have default values
(refer to the DDLF Control Statement subsection).
Figure 4-21 illustrates a job that replaces a
s u b s c h e m a i n t h e s u b s c h e m a l i b r a r y. T h e s c h e m a
d i r e c t o r y i s a t t a c h e d . T h e s u b s c h e m a l i b r a r y fi l e
is also attached with the applicable password, and
( f o r N O S o n l y ) a c c e s s m o d e M = W i s s p e c i fi e d . I f
the subschema to be replaced cannot be found in the
s u b s c h e m a l i b r a r y, a n i n f o r m a t i v e d i a g n o s t i c i s
issued and the new subschema is added to the
l i b r a r y.

Deleting a Subschema

Figure 4-20 illustrates a job that adds a subschema
to the subschema library created by the example in
fi g u r e 4 - 1 9 . T h e s c h e m a d i r e c t o r y i s a t t a c h e d .
The subschema library is also attached with the
applicable password and (for NOS only) access mode
M=W specified.

A subschema stored in the subschema library can be
d e l e t e d f r o m t h e l i b r a r y. T h e f o r m o f t h e D D L F
control statement necessary to purge a subschema
from the subschema library is as follows:

Each subschema stored in the library must have a
unique name. If the subschema being added to the
library has the same name as a subschema already
s t o r e d i n t h e l i b r a r y, a d i a g n o s t i c i s i s s u e d a n d
the job is aborted.

T h e p u r g e p a r a m e t e r ( P ) m u s t b e s p e c i fi e d . T h e
language version parameter (F5) is optional and has I
a default value. The SB, 1, and L parameters are
optional and have default values (refer to the DDLF
Control Statement subsection).

DDLF,F5,SB=lfn,P.

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
ATTACH,SUBSCH/PU=DDL,M=W.
DDLF,F5,SB=SUBSCH.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
ATTACH,SUBSCH,ID=DDL,PU=DDL.
DDLF,F5,SB=SUBSCH.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 4-20. Compiling a Subschema and Adding to a Subschema Library

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SCHPAY.
ATTACH,SUBSCH/PW=DDL,M=W.
DDLF,F5,SB=SU8SCH,R.
End-of-record
DDL Subschema Source Input
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SCHPAY,ID=DDL.
ATTACH,SUBSCH,ID=DDL,PU=DDL.
DDLF,F5,SB=SUBSCH,R.
End-of-record
DDL Subschema Source Input
End-of-information

Figure 4-21. Replacing a Subschema Library
60485200 E

4-17

Figure 4-22 illustrates a job that purges a sub
schema from the subschema library. The subschema
l i b r a r y fi l e i s a t t a c h e d w i t h t h e a p p l i c a b l e p a s s
word and (for NOS only) access mode M=W is speci
fi e d . T h e e n d - o f - r e c o r d i n d i c a t o r d e s i g n a t e s t h e
end of the control statements.
The control statements are followed by statements
that specify the subschemas to be deleted. The
subschema name is entered anywhere from column 7
through column 72. If more than one subschema name
is entered, a space or a comma must follow each
subschema name.
No compilation occurs when a subschema is deleted
from the subschema library.

Auditing a Subschema Library

Compacting a Subschema Library
Subschema library compaction is an optional facil
ity that generates a new subschema library by
copying only the active subschemas from the speci
fi e d s u b s c h e m a l i b r a r y . W h e n t h i s f a c i l i t y i s
executed, the DDLF compiler generates a listing
that includes the name of each transferred sub
schema and the schema it references, together with
their creation dates. The form of the DDLF control
s t a t e m e n t n e c e s s a r y t o c r e a t e a n e w, c o m p a c t e d
subschema library is as follows:
D D L F, F 5 , S B = l f n , N L = l f n .

I

The new library parameter (NL) must be specified.
The language version parameter (F5) is optional and |
has a default value. The SB and L parameters are
optional and have default values (refer to the DDLF
Control Statement subsection).

b e s p e c i fi e d . T h e
is optional and has
L parameters are
(refer to the DDLF

F i g u r e 4 - 2 5 i l l u s t r a t e s a j o b t h a t c r e a t e s a n e w,
compacted subschema library. The subschema library
is attached with the appropriate password. The
DEFINE and REQUEST/CATALOG control statements
s p e c i f y t h e l o c a l fi l e n a m e o f t h e n e w s u b s chema
l i b r a r y a n d a s s i g n i t t o a p e r m a n e n t fi l e d e v i c e .
A p a s s w o r d s p e c i fi e d i n t h e D E F I N E o r C ATA L O G
statement controls subsequent access and use of the
s u b s c h e m a l i b r a r y. T h e D D L F c o n t r o l s t a t e m e n t
specifies the SB parameter with the local file name
of the current subschema library to be compacted,
and the NL parameter with the local file name of
t h e n e w s u b s c h e m a l i b r a r y. T h e P U R G E c o n t r o l
s t a t e m e n t d e s t r o y s t h e o l d l i b r a r y fi l e .

Figure 4-23 illustrates a job that produces an
a u d i t l i s t i n g o f t h e s u b s c h e m a l i b r a r y. T h e
subschema library is attached with the appropriate
p a s s w o r d s p e c i fi e d . T h e l i s t i n g p r o d u c e d b y t h e
DDLF compiler when the audit is performed is shown
in figure 4-24.

This facility is intended to be used on a subschema
library that has had a number of subschemas purged
or replaced and, therefore, contains wasted space.
The DDLF compiler eliminates the wasted space in
the new subschema library. After the new subschema
l i b r a r y i s s t o r e d a s a p e r m a n e n t fi l e , t h e u s e r
s h o u l d p u r g e t h e o l d s u b s c h e m a l i b r a r y. T h i s f a
cility does not allow for compilation of subschemas.

After a subschema library is created, it can be
searched and a list generated that includes the
name of each subschema and the name of the schema
it references, together with their creation dates.
The form of the DDLF control statement necessary to
have the audit listing generated is as follows:
DDLF,F5,SB=lfn,A.
The audit parameter (A) must
I language version parameter (F5)
a default value. The SB and
optional and have default values
Control Statement subsection).

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL,M=W.
DDLF,F5,SB=SUBSCH,P.
End-of-record
PAYROLL
NEWHIRES
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDLF,F5,SB=SUBSCH,P.
End-of-record
PAYROLL
NEWHIRES
End-of-information

Figure 4-22. Deleting Subschemas From the Library

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL.
DDLF,F5,SB=SUBSCH,A.
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
DDLF,F5,SB=SUBSCH,A.
End-of-i nformati on

Figure 4-23. Auditing a Subschema Library

4-18

60485200 E

* SOURCE LISTING * (82061) DDLF 1.3+564.

82/04/05. 09.56.13.

BEGIN SUB-SCHEMA FILE MAINTENANCE
LIST OF SUB-SCHEMAS IN FILE
SUB-SCHEMA

CREATION
DATE
TIME

SCHEMA

CREATION
DATE
TIME

F5SS-PRODUCT-MANAGEMENT
F5SS-TESTS
F5SS-PR0DUCTS

82089
82089
82089
82089
82089
82089

MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB
MANUFACTURING-DB

82087
82087
82087
82087
82087
82087

F5SS-PROJECTS

F5SS-PRODUCT-EVALUATION
F5SS-TESTING
DDLF COMPLETE.
46600B CM USED.

09.09
09.09
09.09
09.09
14.41
14.41

14.14
14.14
14.14
14.14
14.14
14.14

END OF FILE MAINTENANCE
0 DIAGNOSTICS.
0.024 CP SECS.
Figure 4-24. Audit Listing of the Subschema Library

NOS Operating System

NOS/BE Operating System

Job statement
USER control statement
CHARGE control statement
ATTACH,SUBSCH/PW=DDL,M=W.
DEFINE,NEWSUB/PW=DDL,CT=PU,M=W.
DDLF,F5,SB=SUBSCH,NL=NEWSUB.
PURGE,SUBSCH.
End-of-information

Job statement
ACCOUNT control statement
ATTACH,SUBSCH,ID=DDL,PW=DDL.
REQUEST,NEWSUB,PF.
DDLF,F5,SB=SUBSCH,NL=NEWSUB.
CATALOG,NEWSUB,ID=DDL,MD=DDL,EX=DDL,CN=DDLX.
PURGE,SUBSCH,RB=1.
End-of-information

Figure 4-25. Compacting a Subschema Library

COMPILATION OUTPUT
A listing of the FORTRAN DDL source program is
provided whenever a subschema is compiled. Each
line of the listing corresponds to one source line
in the source program. The format and order of
each line on the listing are identical to the
format and order of the statements in the source
program. Figure 4-26 is a sample compilation
output listing for a subschema compilation.
The DDLF compiler assigns a line number to each
input statement beginning with 00001. The line
numbers are printed on the source listing starting
in column 16. Diagnostic messages begin in column
3 of the listing. After the last input statement
i s l i s te d , a c o m p i l a t i o n s u m m a r y I s p r i n t e d . W h e n
relation statistics are applicable, relation names
and their traversed areas are included.
The source listing can be suppressed by specifying
L=0 on the DDLF control statement. Diagnostic
messages and the compilation summary are the only
listing printed.
A cross-reference list and a data map are not
printed when the subschema is compiled. When the
FORTRAN applications program containing DML
statements is compiled, the variables and arrays
defined in the subschema or generated by the DML

preprocessor are not listed unless the DS parameter
is specified on the DML control statement.

RECOMPILATION GUIDELINES
The DDLF compiler generates a checksum (an identi
fying 1-word attribute) for each area and relation
in the schema. These checksums are the means for
determining the need to recompile a subschema. If
a checksum in a recompiled schema is different from
the corresponding checksum in the previous schema,
any subschema referencing the changed element must
be recompiled. A subschema not referencing a
changed element does not need to be recompiled.
The DDLF compiler generates a single checksum for a
subschema. This checksum is used for determining
the need to recompile a FORTRAN-DML program. If a
checksum of a recompiled subschema differs from the
previous checksum, all application programs refer
encing that subschema must be processed again by
the DML preprocessor and recompiled. When the
FORTRAN-DML program is compiled, the checksum of
the subschema it references is copied into the
program binary output. When the program is exe
cuted, that checksum must be the same as a checksum
o f a s u b s c h e m a i n t h e m a s t e r d i r e c t o r y. I f t h e
program references an invalid checksum, CDCS aborts
the program and issues a diagnostic.

i # * \

60485200 E

4-19

* SOURCE LISTING * (82061) DDLF 1.3+564.

F5SS-PR0DU
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
** WITHIN PRODUCT
00015
** ORDINAL 1
00016
** ORDINAL 2
00017
** ORDINAL 3
00018
** ORDINAL 4
00019
** ORDINAL 5
00020
** ORDINAL 7
00021
00022
** ORDINAL 8
00023
** WITHIN TESTS
00024
** ORDINAL 1
00025
** ORDINAL 2
00026
** ORDINAL 3
00027
** ORDINAL 5
00028
00029
** ORDINAL 6
00030
PRIMARY KEY 00015
ALTERNATE KEY 00018
ALTERNATE KEY 00017
PRIMARY KEY 00024
ALTERNATE KEY 00025
*****
*****
00031
00032
00033
*****
*****
RELATION 001

SUBSCHEMA F5SS-PR0DUCT-EVALUATI0N, SCHEMA=MANUFACTURING-DB

REALM PRODUCT-FILE, TESTS
RECORD PRODREC
CHARACTER *10 PRODUCT
CHARACTER *2 CLASS
CHARACTER *20 EVALID(10)
CHARACTER *4 PROJECT
/s<^%y

CHARACTER *1 STATUS
INTEGER PRICE, NTESTED
REAL AVG
RECORD TESTREC
INTEGER TESTNO
CHARACTER *20 TNAME
CHARACTER *10 PRDCTNO
INTEGER N, TOTALCT
REAL PASPROBdOO)
RELATION TEST-REL
■ FOR AREA PRODUCT-FILE
PR0DUC1' FOR AREA PRODUCT-FILE
PR0JEC1
EVALID FOR AREA PRODUCT-FILE
TESTNO FOR AREA TESTS
TNAME FOR AREA TESTS
RECORD MAPPING IS NEEDED FOR REALM - PRODUCT-FILE
RECORD MAPPING IS NEEDED FOR REALM - TESTS
RESTRICT PRODREC (STATUS .EQ. »A' .OR. STATUS .EQ. 'R')

/*5h^V

END
END OF SUB-SCHEMA SOURCE INPUT
R E L AT I O N S TAT I S T I C S * * * * *
TEST-REL JOINS AREA - TESTS
AREA - PRODUCT-FILE
BEGIN SUB-SCHEMA FILE MAINTENANCE

SUBSCHEMA
F5SS-PR0DUCT--EVALUATION
DDLF COMPLETE.
51000B CM USED.

CHECKSUM
41264663066177205611

ENDOF FILE MAINTENANCE
0 DIAGNOSTICS.
0.322 CP SECS.

Figure 4-26. Sample FORTRAN Subschema Compilation Output Listing

| 4-20

y"^$5v

ALIAS (REALM) PRODUCT-FILE = DEVELOPMENT-PRODUCTS
ALIAS (RECORD) PRODREC = DEVREC
ALIAS (ITEM) PRODUCT = PRODUCT-ID
ALIAS (ITEM)EVALID = EVAL-ID
ALIAS (ITEM) PROJECT = PROJECT-ID
ALIAS (ITEM) NTESTED = NUM-TESTED
ALIAS (ITEM) AVG = CUM-TEST-AVERAGE
ALIAS (ITEM) STATUS = STATUS-CODE

60485200 E

SCHEMA AND SUBSCHEMA MAPPING

A schema describes the data in a data base. The
subschema describes only data that is accessible by
a particular application program. The data
described by the schema can be changed to meet the
requirements of an application program by the
i n c l u s i o n , o m i s s i o n , r e o r d e r i n g , r e d e fi n i t i o n , a n d
renaming of data in the subschema.
T h e p r o c e s s o f r e s o l v i n g t h e d i ff e r e n c e s b e t w e e n
the data types and structures in the schema and
those in the subschema is called mapping. By using
mapping, CYBER Data Base Control System (CDCS) can
generate a record image conforming to the subschema
format from a record in schema format, or can
perform the conversion of data from subschema
format to schema format.

STRUCTURING RESTRICTIONS
Some characteristics of the data in a data base are
fixed by the schema and cannot be changed by the
s u b s c h e m a ; o t h e r c h a r a c t e r i s t i c s s p e c i fi e d I n t h e
schema can be different in the subschema. The
following variations are allowed in the COBOL,
Query Update, and FORTRAN subschemas with the
exception of those pertaining to group items, which
are not allowed in a FORTRAN subschema:
R e d e fi n i t i o n o f t h e c h a r a c t e r i s t i c s o f d a t a
items to data types for which conversion is
supported
Omission
o r i n c l u s i o n o f s p e c i fi c a r e a s ,
records, group items, elementary items, and
relations
Reordering of elementary items and group items
Renaming of elementary items, group items,
record names, area names, and others

Th e e n ti r e r e c o r d i m a g e i s tr a n s fe r r e d as a whole
unless item-level operations are required for
record restructuring, data validation, data item
conversion, or item-level data base procedures. In
this case, CDCS uses mapping to transfer and
convert (if necessary) the source record, item by
item, to the target record as described in the
schema and subschema data descriptions. Data
validation and calls to item-level data base proce
d u r e s , i f s p e c i fi e d , a r e p e r f o r m e d d u r i n g t h e
mapping of each data item.
If an error occurs during an item-level operation
for a function such as record mapping, data valida
tion, or item-level data base procedure processing,
a value indicating the subschema item ordinal for
the error, as well as the name of the file on which
the error occurred, can be obtained by the applica
tion program through the data base status block.
The status block, which is described in the CDCS 2
Application Programming reference manual, must have
been activated at a previous point in the program
in order to return the information. Query Update
automatically returns error information and the
subschema item ordinal in a diagnostic. A sub
schema ordinal is assigned to each item in a
subschema when the subschema is compiled. The
application programmer can use the subschema output
listing to associate the subschema item ordinal
returned in the data base status block with the
item on which the error actually occurred.
D a t a v a l i d a t i o n i s a c t i v a t e d b y t h e C H E C K VA L U E
clause in the schema. Item-level data base proce
dures include those specified for ACTUAL RESULT and
VIRTUAL RESULT clauses, the ENCODING/DECODING
clause, the CHECK data base procedure clause, and
the CALL clause for an input/output request involv
ing an elementary item or a vector.

DATA CLASS

DATA CONVERSION

The characteristics of a data item are described in
the PICTURE or TYPE clause in the schema, in the
PICTURE and USAGE clauses in the COBOL and Query
Update subschemas, and in the type statements Ln
the FORTRAN subschema. The description of a data
item determines its data class. CDCS supports
eight Data Description Language (DDL) data classes
at both the schema and subschema levels. The data
classes, their respective codes, and the equivalent
usage specification are given in table 5-1.

By using mapping, CDCS can perform the transfer and
conversion of individual data items from one data
r e p r e s e n t a t i o n t o a n o t h e r. T h e m a p p i n g p r o c e s s
operates in a source-target mode. For example, for
a read request, the source record obtained from the
data base is in schema format and the target record
produced by the mapping operation is in subschema
format. The converse is true for a write opera
tion: the source record is in subschema format and
the target record produced is in schema format.
Mapping occurs after a record is retrieved from a
data base, but prior to writing a record.

T h e d a t a c l a s s t h a t c a n b e s p e c i fi e d i n t h e s u b
schema depends upon the class of the data item in
the schema. Table 5-2 shows the valid data conver
sions performed by CDCS. The conversion routines
operate in a source-target mode. The data conver
sion rules that apply to the valid conversions
marked in the matrix are given in appendix H.
Appendix H also contains notes on conversions that
do not produce conversion errors, but can cause
a l te r a ti o n o f d a ta o n a r e a d a n d r e w r i te sequence
of operations involving schema to subschema to
schema data conversions.

The limitations placed on the variations between
the schema and the subschema are precise and must
be carefully considered when the subschema is
described. Rules are given in sections 3 and 4.

60485200 A

5-1

TABLE 5-1. DATA CLASSES
COBOL
USAGE
Clause

Data Class

Code

Query Update
USAGE Clause

FORTRAN 5
Type Statement

0

D i sp l a y
alphanumeric

DISPLAY

DISPLAY

CHARACTER

1

Display alphabetic

DISPLAY

DISPLAY

CHARACTER

3

Display integer

DISPLAY COMP

DISPLAY

None*

4

D i s p l a y fi x e d p o i n t

DISPLAY COMP

DISPLAY COMP

Nonet

10

Coded binary
integer

COMP-1 INDEX

COMP-1
INDEX
LOGICAL

INTEGER
LOGICAL
BOOLEAN

13

Coded floating
point normalized

COMP-2

COMP-2

REAL BOOLEAN

14

Coded double
precision

Nonet

DOUBLE

DOUBLE PRECISION

15

Coded complex

None!

COMPLEX

COMPLEX

TNo corre sponding COBOL or FORTRAN typ e. Valid conversion is shown in table 5-2.

TABLE 5-2. VALID DATA CONVERSIONS
Source
Data
Class

Target Data Class

0

1

3

0

X

X

X

1

X

X

3

X

4

4

10

13

14

X

X

X

X

X

X

X

X

X

X

15

10
13

Conversion to class 13, which employs normalized
fl o a t i n g p o i n t b i n a r y r e p r e s e n t a t i o n , m i g h t i n c u r
loss of precision. The binary value cannot be
guaranteed to be precise beyond the limits of the
PICTURE clause or the dimensions of the item
description. Class 13 is treated as a signed value
in all cases.
The data class of an item described in the schema
is determined by either a PICTURE clause or a TYPE
c l a u s e . Ta b l e 5 - 3 l i s t s e a c h d a t a c l a s s a n d i t s
representation in the schema.
The PICTURE and USAGE clauses in the COBOL and
Query Update subschema description of a data item
and the type statements in the FORTRAN subschema
description determine the subschema data classes.
Ta b l e 5 - 4 l i s t s e a c h d a t a c l a s s a n d i t s C O B O L ,
Query Update, and FORTRAN subschema representations.

14
15

A data item specified as BOOLEAN in a FORTRAN 5
subschema is mapped as either a class 10 or class
13 item, depending on the class of the correspond
ing item in the schema.

5-2

OMISSION OF DATA ITEMS
If data items described in the schema are omitted
from the subschema description, the data items
omitted are replaced on a write operation by null
values before a call is issued to CYBER Record
Manager Advanced Access Methods (AAM) to write the
record. The actual null value placed in the omit
t e d d a t a i t e m fi e l d d e p e n d s o n t h e d a t a c l a s s o f
the data item, as shown in table 5-5.

60485200 E

TABLE 5-3. DATA CLASS REPRESENTATION IN THE SCHEMA
Data
Class

Schema
PICTURE Clause

Schema TYPE Clause

Internal Representation

None

CHARACTER

Character-string
(A, X, 9; not all As or 9s)

None

Character-string (all As)

None

Display code, alphabetic

Numeric-picture integer
(9,T)

None

Display code numeric can have sign
overpunch in last character position

N u m e r i c - p i c t u r e fi x e d p o i n t
( 9 , V, T, P, . )

None

Display code numeric plus implicit
or explicit decimal or scaling
position

10

None

FIXED integer-1, integer-2
(where the integer value
is 1 thru 18)

Binary integer

13

None

FLOAT integer-1 (where the
integer value is 1 thru 14)

Signed, normalized floating point
(60-bit)

14

None

FLOAT integer-1 (where the
integer value is 15 thru 29)

Signed, normalized floating point
(2 words)

15

None

COMPLEX

Floating point with real part and
imaginary part (2 words)

Display code, alphanumeric

TABLE 5-4. DATA CLASS REPRESENTATION IN THE SUBSCHEMA

Query Update Subschema
in CDCS Data Base
Access Mode

COBOL Subschema
Schema
Data
Class

PICTURE
Clause

USAGE
Clause

FORTRAN 5
Subschema
Type Statement

Internal
Representation

PICTURE
Clause

USAGE
Clause

0

Alphanumeric (A
X 9; not all As
or 9s; mixed
s p e c i fi c a t i o n
used as all Xs)

DISPLAY
(or none)

Alphanumeric (A
X 9; not all As
or 9s; mixed
s p e c i fi c a t i o n
used as all Xs)

DISPLAY
(or none)

CHARACTER

Display code,
alphanumeric

1

Alphabetic (A)

DISPLAY
(or none)

Alphabetic (A)

DISPLAY
(or none)

CHARACTER

Display code,
alphabetic

3

Numeric (9 S)

DISPLAY
COMP
(or none)

Numeric (9 S
and insertion
and replacement
characters)

DISPLAY
COMP
(or none)

Nonet

Display code
numeric, jC 18
characters;
trailing sign
overpunch if S
i s s p e c i fi e d

/lpt,\
60485200 E

5-3

TABLE 5-4. DATA CLASS REPRESENTATION IN THE SUBSCHEMA (Contd)
Query Update Subschema
in CDCS Data Base
Access Mode

COBOL Subschema
Schema
Data
Class

USAGE
Clause

PICTURE
Clause

PICTURE
Clause

USAGE
Clause

FORTRAN 5
Subschema
Type Statement

Internal
Representation

Numeric
(9 S V P)

DISPLAY
COMP
(or none)

Numeric (9 S
V P and in
sertion and
replacement
c har ac t e r s )

DISPLAY
COMP
(or none)

Nonet

Display code
numeric, _< 18
characters;
trailing sign
overpunch if S
i s s p e c i fi e d ;
implicit deci
mal or scaling
position

10

Numeric
(9 S V P)

COMP-1
INDEXtt

Numeric (9 S
V P and in
sertion and
replacement
characters)

COMP-1
INDEXtt
LOGICAL

INTEGER
LOGICAL
BOOLEAN

Size < 15;
binary integer

13

Numeric
(9 S V P)

COMP-2

Numeric (9 S
V P and in
sertion and
replacement
characters)

COMP-2

REAL
BOOLEAN

Normalized
fl o a t i n g p o i n t

14

Nonet

Nonet

Numeric (9 S
V P and in
sertion and
replacement
characters)

DOUBLE

DOUBLE
PRECISION

Normalized
fl o a t i n g p o i n t
(2 words)

15

Nonet

Nonet

Numeric (9 S
V P and in
sertion and
replacement
characters)

COMPLEX

COMPLEX

Normalized
fl o a t i n g p o i n t
(2 consecutive
words)

tNo valid COBOL or FORTRAN type (whichever is applicable). Valid conversion is shown in table 5-2.
ttNo picture.clause allowed.

TABLE 5-5. NULL VALUES FOR DATA CLASSES
Null Value Stored

Data Class

• 5-4

Display alphanumeric

Display code blanks

Display alphabetic

Display code blanks

Display integer

Display code zeros

D i s p l a y fi x e d p o i n t

Display code zeros and optional decimal point

Coded binary integer

Binary zeros

Coded floating point normalized

Floating point zeros

Coded double precision

Floating point zeros

Coded complex

Floating point zeros

60485200 E

/f*^8(k

DATA STRUCTURES

The facilities of CYBER Database Control System
(CDCS) that provide for data structure and control
of associated d a ta a r e d a ta b a s e fi l e s , d a ta b a s e
versions, relations, and constraints. The data
accessed through CDCS resides in data base files.
The data base version facility allows a schema to
be associated with more than one group of data base
fi l e s . T h e r e l a t i o n f a c i l i t y p r o v i d e s f o r r e t r i e v a l
o f d a t a f r o m t w o o r m o r e fi l e s j o i n e d t o g e t h e r
logically in a relation. The constraint facility
allows controls to be established and maintained
during update operations on associated files or on
associated items within a single file.
This section provides information about data base
fi l e s , d a t a b a s e v e r s i o n s , r e l a t i o n s , a n d c o n
straints.

CDCS AND CRM COMMUNICATION
A p p l i c a t i o n p r o g r a m s a c c e s s d a t a fi l e s b y i s s u i n g
calls to CDCS, which in turn issues calls to CRM to
handle the processing. Conventional input/output
statements in COBOL are used to access data files
and relations. These statements reference the
files and records described in the COBOL subschema.
In a FORTRAN program, FORTRAN Data Manipulation
Language (DML) statements are used to access data
fi l e s a n d r e l a t i o n s . T h e s e s t a t e m e n t s , w h i c h a r e
similar in syntax to FORTRAN statements, reference
t h e fi l e s a n d r e c o r d s d e s c r i b e d i n a F O R T R A N
subschema. In a Query Update program, Query Update
directives can access data base files when a Query
Update subschema for CDCS data base access is being
used.

DATA BASE FILES
CYBER Record Manager (CRM) is the subsystem that
provides the input/output interface between CDCS
and the operating system routines that read and
w r i t e fi l e s o n h a r d w a r e d e v i c e s . T h e p r i m a r y t a s k
of CRM is to reconcile logical records specified by
the user with their physical representation on a
particular hardware device. CRM is a generic term
relating to the common products Basic Access
Methods (BAM) and Advanced Access Methods (AAM).
BAM is a file manager that processes sequential and
w o r d a d d r e s s a b l e fi l e o r g a n i z a t i o n s . A A M i s t h e
DMS-170 file manager that processes indexed sequen
t i a l , d i r e c t a c c e s s , a n d a c t u a l k e y fi l e o r g a n i z a
tions and supports the Multiple-Index Processor.
C R M s u p p o r t s fi v e fi l e o r g a n i z a t i o n s ( t h r e e o f
which allow alternate key processing), four block
i n g t y p e s f o r s e q u e n t i a l fi l e s , a n d e i g h t r e c o r d
t y p e s . E v e r y fi l e o p e n e d i s a s s o c i a t e d w i t h a fi l e
information table (FIT) through which information
a b o u t t h e fi l e i s c o m m u n i c a t e d . T h e F I T h o l d s
d e t a i l s o n fi l e s t r u c t u r e a n d p r o c e s s i n g a n d , i n
p a r t i c u l a r, c o n t a i n s d e s c r i p t i o n s o f r e c o r d a n d k e y
size, record type, and blocking structure.
CDCS and the data base utilities use the services
of CRM to process the following types of files:
Conventional data files comprising a data base

DATA BASE FILE DEFINITION
CDCS supports the three extended AAM file organi
zations: extended indexed sequential, extended
direct access, and extended actual key. CDCS also
s u p p o r t s m u l t i p l e - i n d e x fi l e s f o r t h e s e o r g a n i z a
t i o n s . D a t a b a s e fi l e s m u s t b e p e r m a n e n t fi l e s o n
mass storage devices.
NOTE
Refer to appendix F for recommendations on
the use of Advanced Access Methods.
D a t a b a s e fi l e s m u s t b e d e fi n e d i n a w a y t h a t
allows them to be attached from the CDCS system
control point. Under NOS, either the files must be
defined with category PUBLIC (CT=PU in the DEFINE
control statement) or file access must be permitted
to the user number of the CDCS system control point
job or the CDCS Batch Test Facility job. To permit
fi l e a c c e s s t o a n o t h e r u s e r u n d e r N O S , t h e fi l e
owner can enter the PERMIT control statement and
specify the user number of the other user and type
of access to be allowed. For example by specifying
DBCNTLX=W in a PERMIT control statement, the owner
permits user DBCNTLX access to a file in write (W)
mode.

L o g fi l e s
Schema and subschema directories
Master directory
The discussion in these paragraphs is limited to
d a t a fi l e s t h a t c o m p r i s e a d a t a b a s e . T h e p a r a
graphs provide information on the data file organi
zation and record types supported by CDCS and on
the rules that govern data base files. For detailed
information on CRM, refer to the CRM Advanced
Access Methods reference manual.

60485200 A

CRM Record Types
CDCS supports seven CRM record types. Each schema
area has a record type associated with it during
schema compilation. CDCS associates the record
t y p e f o r t h e a r e a w i t h t h e fi l e a n d u s e s t h a t
record type when interfacing with CRM.
NOTE
Refer to appendix F for recommendations on
the use of CRM record types.

6-1

The following record types are supported:
F fi x e d l e n g t h
Z zero byte
W control word
S system

W h e n a n a p p l i c a t i o n p r o g r a m s p e c i fi e s p r o c e s s i n g
v i a a n a l t e r n a t e k e y, t h e C O B O L c o m p i l e r , t h e
FORTRAN DML preprocessor, or Query Update set up
appropriate calls to CDCS. During program execu
tion, CDCS receives the calls from the program and,
in turn, issues calls to CRM to perform the input/
output operations. An alternate key retrieval
returns a data record. When a record that has
a l t e r n a t e k e y s i s m o d i fi e d , t h e a l t e r n a t e k e y
indexes are updated automatically by CRM.

T trailer count
D decimal character count

Multiple Record Descriptions

R record mark

An area can have more than one record description
(DDL record type) in the schema and in a COBOL or
Query Update subschema; only one record description
per area is permitted in the FORTRAN subschema.
All records in a given area must have the same CRM
record type. The RECORD CODE clause in the schema
data control entry defines the mechanism for deter
mining the DDL record type; that is, which record
description is to be used for a given data record.
The record in the data base area must be matched
with the appropriate record descriptions in the
schema and in a COBOL or Query Update subschema so
that record mapping, data validation, and other
s i m i l a r o p e r a t i o n s c a n b e p e r f o r m e d c o r r e c t l y. A
c o n t r o l fi e l d o r a d a t a b a s e p r o c e d u r e s p e c i fi e s
the mechanism in this clause. If an area has
multiple record descriptions, it cannot be joined
in a relation.

C R M r e c o r d t y p e s T, D , a n d R a r e l e s s e f fi c i e n t
than the others. For F, Z, and W type records, the
r e c o r d l e n g t h ( R L fi e l d o f t h e F I T ) i s t h e l e n g t h
contained in the schema record description; RL
d e fi n e s a fi x e d l e n g t h f o r e a c h C R M r e c o r d t y p e .
For T type records, the trailer item must have the
same size and position in all schema record
descriptions for one area. The data item that
controls the number of occurrences of the trailer
item must have the same size, position, and type in
all schema record descriptions for an area.

File Control
The data items defined in the schema are organized
into logical units called areas. The data control
e n t r y i n t h e s c h e m a p a r t l y s p e c i fi e s c e r t a i n fi l e
attributes for each area named in the schema. This
e n t r y d e fi n e s t h e d a t a i t e m s t h a t r e p r e s e n t t h e
primary and alternate keys for extended AAM files,
the collating sequence for the data in a named
area, and the mechanism for distinguishing among
multiple record types within an area.
The FILE control statement is used at schema
compilation time to supplement the information in
the data control entry of the schema. File
organization, record type, and other pertinent
information that is needed to describe fully the
a t t r i b u t e s o f a n a r e a a r e s p e c i fi e d i n t h e F I L E
control statement.
An area is associated with an addressable storage
u n i t ( a p e r m a n e n t fi l e ) t h r o u g h i n f o r m a t i o n i n t h e
m a s t e r d i r e c t o r y . A l l t h e fi l e a t t r i b u t e s s p e c i
fied for an area are used by CDCS for processing
t h e a s s o c i a t e d fi l e .
Refer to section 2 for information on the data
control entry and on the FILE control statement.
Refer to the CYBER Record Manager Advanced Access
Methods reference manual for detailed information
on the FILE control statement.

Multiple-Index Files
One or more multiple-index files can exist as part
of a data base. Alternate key processing for
e x t e n d e d A A M fi l e s i s s u p p o r t e d . A l t e r n a t e k e y s
d e fi n e d i n t h e d a t a c o n t r o l e n t r y n a m e t h e d a t a
items to be used for alternate key access. The
characteristics of these data items are described
in the schema and subschema record descriptions.

NOTE
Refer to appendix F for recommendations on
the use of multiple record descriptions.
The following rules apply to multiple record
descriptions:
Key fields must have the same type, size, and
position in all schema record descriptions for
a given area.
A given COBOL or Query Update subschema area
can contain all or some of the record types
d e fi n e d i n t h e s c h e m a a r e a ; h o w e v e r , i f a n
application program references a record type
not specified in the subschema in use, COBOL or
Query Update issues a diagnostic.
If a
type,
type,
tions

c o n t r o l fi e l d d e t e r m i n e s t h e D D L r e c o r d
it must be an elementary item of the same
size, and position in all record descrip
for a given area.

Key Definitions
P r i m a r y a n d a l t e r n a t e k e y s a r e s p e c i fi e d i n t h e
data control entry in the schema. The schema item
declared as the primary key must have a correspond
ing subschema item. Duplicate primary keys are not
allowed. Primary keys for extended indexed sequen
t i a l a n d e x t e n d e d d i r e c t a c c e s s fi l e s a c c e s s e d
through CDCS cannot exceed 240 characters in
l e n g t h ; p r i m a r y k e y s f o r e x t e n d e d a c t u a l k e y fi l e s
cannot exceed 8 characters in length. Alternate
keys for all extended AAM files cannot exceed 240
characters.
/ffflaSjv

6-2

60485200 A

The schema and subschema compilation listings
produced by the DDL compiler show the data items
defined as keys. The COBOL compiler, the FORTRAN
D M L p r e p r o c e s s o r, a n d Q u e r y U p d a t e v e r i f y t h e
correctness of any key item specified in an input/
output statement.
Embedded Key Items
Embedded keys are key items that are contained in
t h e r e c o r d . K e y s f o r a l l fi l e s a c c e s s e d t h r o u g h
CDCS must be embedded. All embedded keys must be
in the same position in all schema record descrip
tions for a given area. The following rules apply
to embedded key items declared in the schema:
An embedded key item cannot be the item refer
enced in an ACTUAL RESULT or a VIRTUAL RESULT
clause.
An embedded key item cannot be nested within
more than one level of a repeating group; that
is, only one subscript can apply to the item.
Data items used as key items in COBOL READ and
START statements and in Query Update directives
c a n n o t b e d e fi n e d w i t h i n a n e s t e d h i e r a r c h y o f
repeating items (only one subscript can apply).
The subschema item used as a key in an input/output
statement must be in one of the following two
categories:
The data item must correspond to (1) a schema
item or group of items that is declared as a
key item or (2) a schema item or group of items
t h a t s a t i s fi e s t h e r e q u i r e m e n t s f o r a d e c l a r e d
key item and has the same position in the
record as a declared key item.
The data item must be within the span of a
REDEFINES clause where the originally redefined
item has the same position in the subschema
record as the data item, corresponds to the
data item described in (1), and is represented
identically in the schema and subschema.
Major Key Processing
The leading portion of a primary or alternate key
can be used for retrieval in COBOL, Query Update,
and FORTRAN application programs. Using the
leading portion of a key is called major key
p r o c e s s i n g . To u s e m a j o r k e y p r o c e s s i n g i n
application pro g ra ms, a co n ca te n a te d ke y mu st b e
defined in the schema.
The subschema referenced by the COBOL or Query
Update application program must define the concat
enated key as a group item that includes only the
data items included in the schema description of
the concatenated key. The application program must
use, as the major key, the data item or items that
a r e t h e l e a d i n g p o r t i o n o f t h e c o n c a t e n a t e d k e y.
If more than one item is desired for the major key,
these items must be in a group immediately sub
ordinate to the key group. The major key is then
referenced by the group name. For example if
ITEMA, ITEMB, and ITEMC are items of a concatenated
k e y, d e fi n e d a t t h e 0 1 l e v e l i n t h e s c h e m a , t h e
subschema groups might appear as follows:

60485200 D

03 CONCAT-KEY.
05 MAJOR-KEY.
07 ITEMA
07 ITEMB
05 ITEMC

PICTURE X(5),
PICTURE X(3).
PICTURE X(2).

where CONCAT-KEY is the group name that identifies
t h e c o n c a t e n a t e d k e y a s d e fi n e d i n t h e s c h e m a .
MAJOR-KEY is the group name identifying the major
key as defined in the subschema.
To perform major key processing, the COBOL program
mer issues a START with the KEY EQUALS phrase and
then follows with a READ NEXT AT END statement.
Query Update automatically performs major key
processing when the data item that is the leading
portion of the concatenated key is specified as the
subject of an IF directive or as the subject of a
conditional statement.
The subschema referenced by the FORTRAN application
p r o g r a m m u s t d e fi n e t h e c o n c a t e n a t e d k e y b y
d e fi n i n g a l l o f t h e c o n s t i t u e n t d a t a i t e m s o f t h e
key (or the subschema defined aliases of the these
data items) in the same order as they are defined
in the subschema. The concatenated key, the name
of which appears in the subschema output (Figure
6-1), is then available for use.
To p e r f o r m m a j o r k e y p r o c e s s i n g i n a F O R T R A N
a p p l i c a t i o n p r o g r a m , t h e F O R T R A N D M L S TA R T
statement is used. The major key item name
(leading item of the concatenated key) or the list
of names (leading contiguous items of the
c o n c a t e n a t e d k e y ) i s s p e c i fi e d i n t h e s t a t e m e n t ' s
KEY clause.
In a FORTRAN program, the following rules and
restrictions apply. The concatenated key name can
o n l y b e s p e c i fi e d i n t h e R E A D a n d S T A R T
statements. The major key can only be specified in
the START statement. A major key composed of only
one item must be the leading item of the
c o n c a t e n a t e d k e y. A m a j o r k e y c o m p o s e d o f m o r e
than one item must be contigous items beginning
with the leading item of the concatenated key. The
list can include as many of the items that make up
the concatenated key as desired.
F i g u r e 6 - 1 i l l u s t r a t e s t h e d e fi n i t i o n o f a c o n c a t e
n a t e d k e y, c a l l e d C AT- K E Y, a n d i t s i n c l u s i o n i n a
subschema. This is an example of a situation in
which an employee works on several projects and
i n f o r m a t i o n i s r e t r i e v e d b y e m p l o y e e i d e n t i fi c a
t i o n . T h e e m p l o y e e i d e n t i fi c a t i o n c a n n o t b e t h e
primary key because CRM requires that each record
have a unique primary key. By defining the primary
key as the concatenation of employee and project
i d e n t i fi c a t i o n ( d a t a i t e m s E M P L O Y E E - I D a n d
PROJECT-ID), the requirement of CRM is satisfied.
Information can be retrieved by using EMPLOYEE-ID
as the major key.
Use of a primary key for major key processing is
available only for extended indexed sequential
fi l e s . T h e u s e o f a n a l t e r n a t e k e y f o r m a j o r k e y
p r o c e s s i n g i s a v a i l a b l e f o r a l l t h r e e A A M fi l e
organizations supported by CDCS.

6-3

Schema
SCHEMA NAME IS FACTORY.

AREA NAME IS WORK.
RECORD NAME IS WORK-REC WITHIN WORK.
01 EMPLOYEE-ID PICTURE "X(6)n.
01 PROJECT-ID PICTURE MX(8)".
01 HOURS PICTURE "999V99T".
DATA CONTROL.

AREA NAME IS WORK
KEY ID IS CAT-KEY < EMPLOYEE-ID OF WORK-REC
PROJECT-ID OF WORK-REC >
KEY IS ALTERNATE PROJECT-ID OF WORK-REC
DUPLICATES ARE ALLOWED.

record description must be included in the sub
schema; only those items in this subschema record
description that correspond to the declared key
items can be used as key items in input/output
statements. All items to be used as keys must have
invariant position across all subschema record
descriptions.
Subschema areas, records, and items are said to
correspond to schema areas, records, and items if
they have the same names (or have been assigned
aliases for corresponding schema names in the Alias
Division of the COBOL or Query Update subschema).
Figure 6-2 Illustrates a schema with two record
descriptions, PRODUCT-REC and PART-REC, for an area
called PRODUCTS. The primary and alternate key
d e fi n i t i o n s a r e s h o w n i n t h e d a t a c o n t r o l e n t r y.
The primary key is STOCK-NUM in PRODUCT-REC; the
alternate key is PROD-NAME in PRODUCT-REC. PART-NUM
or PRODUCT in PART-REC can be used as a key item in
an input/output statement because each of these
items corresponds exactly to a defined key.

Query Update/COBOL Subschema
TITLE DIVISION.
SS ASUB WITHIN FACTORY.
REALM DIVISION.
RD WORK ...
RECORD DIVISION.
01 WORK-REC.
03 CAT-KEY.
05 EMPLOYEE-ID PICTURE X(6).
05 PROJECT-ID PICTURE X(8).
03 HOURS PICTURE S999V99.

FORTRAN Subschema
SUBSCHEMA FTCONCT, SCHEMA=FACTORY
ALIAS (ITEM) EMPID=EMPLOYEE-ID
ALIAS (ITEM) PROJID=PROJECT-ID
REALM WORK
RECORD, WORK-REC
CHARACTER EMPID *6
CHARACTER PROJID *8
REAL HOURS
FORTRAN Subschema Output

SCHEMA NAME IS PR0DBASE.

AREA NAME IS PRODUCTS.
RECORD NAME IS PRODUCT-REC WITHIN PRODUCTS.
01 S TO C K - N U M P I C T U R E " X ( 6 ) " .
01 P R 0 D - N A N E P I C T U R E " X ( 1 0 ) " .
01 D E S C - A P I C T U R E " X ( 2 0 ) " .
01 PR0DUCT-L0C PICTURE " X ( 4 ) " .
01 R C 1
P I C T U R E iiQir
RECORD NAME IS PART-REC WITHIN PRODUCTS.
01 P A R T - N U M P I C T U R E n X ( 6 ) " .
01 P R O D U C T P I C T U R E MX(10)".
01 PA R T- D E S C P I C T U R E "X(20)M.
01 P A R T - L O C P I C T U R E "X(4)M.
■Q
II
01 R C 2
PICTURE
DATA CONTROL.

AREA NAME IS PRODUCTS
KEY IS STOCK-NUM
KEY IS ALTERNATE PROD-NAME
RECORD CODE IS BY RC1
VALUE FOR PRODUCT-REC IS 1 ,
VALUE FOR PART-REC IS 2.

Figure 6-2. Key Definitions for Areas With
Multiple Record Types

PRIMARY KEY CAT-KEY(EKPID,PROJID) FOR AREA WORK

DATA BASE VERSIONS
Figure 6-1. Concatenated Key Definition
Key Processing with Multiple Record Types
If record mapping is required for a particular
record type, the subschema key items and the schema
key items might not occupy corresponding positions
because of reordering of items in the subschema.
The key must be in the same position in each
subschema record type. All keys must be declared
i n t h e fi r s t s c h e m a r e c o r d d e s c r i p t i o n . A r e c o r d
d e s c r i p t i o n c o r r e s p o n d i n g t o t h e fi r s t s c h e m a

6-4

The data base versions feature of CDCS allows the
same schema and associated subschemas to be used
w i t h m o r e t h a n o n e g r o u p o f fi l e s . E a c h g r o u p o f
fi l e s i s c a l l e d a d a t a b a s e v e r s i o n . D u r i n g
execution processing, CDCS can control concurrent
processing on files in all data base versions.
D a t a b a s e v e r s i o n s , i f d e fi n e d , i n t e r a c t w i t h o t h e r
f a c i l i t i e s o f C D C S . T h e y a ff e c t l o g g i n g , r e c o v e r y,
the operator interface, relations, and constraints.
Refer to the descriptions of these facilities for
information about the impact versions could have.

60485200 D

,•**%

DEFINING DATA BASE VERSIONS
Data base versions are defined in the master direc
t o r y. I f d a t a b a s e v e r s i o n s a r e n o t s p e c i fi e d i n
the master directory, one version (called MASTER)
is assumed. If alternate data base versions are
defined, a version called MASTER must be defined
along with the other versions.
I n t h e m a s t e r d i r e c t o r y , t h e fi r s t d a t a b a s e
v e r s i o n d e fi n e d m u s t b e v e r s i o n M A S T E R . W i t h i n
version MASTER, each area is associated with a
permanent file.
After version MASTER is defined, subsequent ver
s i o n s a r e d e fi n e d . W i t h i n t h e d e fi n i t i o n o f e a c h
subsequent version, each area is associated with a
permanent file. The permanent file associated with
an area can be either the same file associated with
the area in version MASTER or can be a different
p e r m a n e n t fi l e . I f t h e p e r m a n e n t fi l e i s t h e s a m e
fi l e a s i n v e r s i o n M A S T E R , t h a t fi l e c a n a l s o b e
associated with the same area in any version. If
t h e p e r m a n e n t fi l e i s a d i ff e r e n t fi l e , t h a t p e r m a
nent file cannot be used in any other version. The
DBMSTRD utility ensures that only permanent files
specified in version MASTER are shared among other
versions.

ACCESS CONTROL LOCKS
A c c e s s c o n t r o l l o c k s a r e s p e c i fi e d f o r a n a r e a .
W h e n d a t a b a s e v e r s i o n s a r e d e fi n e d , t h e a c c e s s

c o n t r o l l o c k s s p e c i fi e d f o r a n a r e a a p p l y t o t h a t
area in all data base versions. An application
program, therefore, must specify the same access
control keys to obtain access to a particular area
in any version.

EXAMPLES OF ENVIRONMENTS
FOR DATA BASE VERSIONS
In an operational environment, there are several
situations where associating a schema with several
g r o u p s o f fi l e s i s u s e f u l : f o r e x a m p l e , a t e s t i n g
situation and a situation in which a business has a
number of branches.

Testing Situation
When new application programs are being tested, it
is helpful to use the same schemas, subschemas and
application programs that are to be used when the
application is put into production. For obvious
r e a s o n s , t h e d a t a fi l e s a c t u a l l y u s e d f o r p r o d u c
t i o n c a n n o t b e u s e d . A g r o u p o f fi l e s u s e d f o r
t e s t i n g i s n e e d e d . H o w e v e r, a t e s t v e r s i o n o f t h e
data base version might not need to have its own
copy of every permanent file; read-only files might
be shared by the production version and test
version.

J0^K.

ygS»fe\

60485200 D

6-4.1/6-4.2

0*%

An example of a master directory which defines a
master version and a test version of a university
d a t a b a s e i s s h o w n i n fi g u r e 6 - 3 . A l l a r e a s
defined in the schema (PROFESSOR, COURSE, STUDENT
CURRICULUM, and COSTS) are associated with perma
n e n t fi l e s i n v e r s i o n M A S T E R . I n t h e t e s t v e r s i o n
(called TESTDB), the areas PROFESSOR and COURSE are
associated with the same files as used in version
MASTER but different files are associated with the
remaining areas.

SCHEMA NAME IS UNIVERSITY

VERSION NAME IS MASTER
AREA NAME IS PROFESSOR
PFN IS "PROFESS" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "PNDX" UN IS "CDCS23".
AREA NAME IS COURSE
PFN IS "COURSE" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "CRSNDX" UN IS "CDCS23".
AREA NAME IS STUDENT
PFN IS "STUDENT" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "SNDX" UN IS "CDCS23".
AREA NAME IS CURRICULUM
PFN IS "CURRICU" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "CRNDX" UN IS "CDCS23".
AREA NAME IS COSTS
rrn j.o LUOia UN lb

toc5«;j".

VERSION NAME IS TESTDB
AREA NAME IS PROFESSOR
SAME AS MASTER.
AREA NAME IS COURSE
SAME AS MASTER.
AREA NAME IS STUDENT
PFN IS "T1STD" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN IS "T1STDX" UN IS "CDCS23".
AREA NAME IS CURRICULUM
PFN IS "T1CRC" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN IS "T1CRCX" UN IS "CDCS23".
AREA NAME IS COSTS
PFN IS "T1CST" UN IS "CDCS23".

Figure 6-3. Example of Version
D e fin i ti o n s i n M a s t e r D i r e c t o r y I n p u t
U s i n g t h e v e r s i o n f a c i l i t y t o d e fi n e t h e p r o d u c t i o n
and test version of the data base has the following
advantages for processing:
/f^N.

A single executing copy of CDCS is in the
computer.
60485200 A

Different logging options can be selected for
the production and testing versions.
Some files can be shared between the production
and testing versions.

Branch Situation
In a branch situation, using the data base version
facility can be heLpful. Assume that a business
consists of a number of branches or regional
divisions with each branch operating relatively
independently but in the same way as the other
branches. Each branch can use the same schema,
subschemas, and possibly a set of applications
because the same kind of data and data manipula
tions are required to do business. Each branch,
however, needs its own group of permanent files.
If a data base version is defined for each branch,
concurrent processing could occur with each branch
u s i n g i t s o w n p e r m a n e n t fi l e s . A s i n t h e t e s t i n g
s i t u a t i o n , s o m e o f t h e fi l e s m i g h t b e s h a r e d b y
several branches.

RELATIONS
The relation facility of CYBER Database Control
System (CDCS) ailows users to retrieve data from
t w o o r m o r e fi l e s j o i n e d t o g e t h e r l o g i c a l l y. T h e
logical structure created by the joining of several
fi l e s i s t e r m e d a r e l a t i o n .
A r e l a t i o n i s d e fi n e d t h r o u g h t h e f a c i l i t i e s o f t h e
Data Description Language (DDL). A relation is
described in the schema. Common data item fields
that exist in areas are used to join the areas in a
relation. The common items joining the areas are
c a l l e d j o i n t e r m s o r i d e n t i fi e r s a n d a r e s p e c i fi e d
in the schema. During processing, CDCS associates
the areas and join terms with data base files and
d a t a i t e m s , r e s p e c t i v e l y.
R e c o r d o c c u r r e n c e s f r o m fi l e s j o i n e d i n a r e l a t i o n
can be selectively retrieved. The subschema
d e fi n e s t h e q u a l i fi c a t i o n c r i t e r i a f o r e x t r a c t i n g
selected records from the data base files joined in
a relation.
C D C S c o n t r o l s t h e m a n i p u l a t i o n o f t h e files joined
in a relation and controls the selection of record
occurrences through the use of information from the
schema and subschema directories. The COBOL or
FORTRAN application programmer codes a single READ
statement specifying the relation that is to be
read. CDCS processes the statement and returns a
record occurrence from each file in the relation to
t h e u s e r ' s w o r k a r e a f o r e a c h fi l e . T h e Q u e r y
Update programmer transmits a single query in which
t h e d a t a i t e m s s p e c i fi e d a r e i n v o l v e d i n a r e l a
tion; Query Update automatically determines the
relation and requests that CDCS perform relation
processing.
T h e f o l l o w i n g p a r a g r a p h s d e s c r i b e h o w fi L e s a r e
joined and traversed, the restriction of records
t h r o u g h r e c o r d q u a l i fi c a t i o n , a n d t h e r e t r i e v a l o f
records performed by CDCS during relation process
ing. This information is of interest to the data
a d m i n i s t r a t o r b e c a u s e t h e o r d e r i n w h i c h fi l e s a r e
j o i n e d i n a r e l a t i o n a n d q u a l i fi c a t i o n c r i t e r i a
affect access time used by application programs in
retrieving records.

6-5

t h a t p r o j e c t n u m b e r. T h i s r e l a t i o n s h i p b e t w e e n
project number in one record and project number in
a n o t h e r r e c o r d r e s u l t s i n t h e i d e n t i fi c a t i o n o f a
number of employees. The diagram of this rela
t i o n s h i p i n fi g u r e 6 - 4 s h o w s i t a s a o n e - t o - m a n y
relationship.

When designing relations, the data administrator
should consider that data base relations should be
designed with the least number of connections
b e t w e e n t h e r e l a t i o n s . W h e n o n e fi l e i s l i n k e d t o
a fi l e i n o n e r e l a t i o n a n d i s a l s o j o i n e d t o
another file in another relation, the update opera
tions on the common file must be monitored in order
to preserve the meaning of each of the relations.

Without the CDCS relational data base facility, the
application programmer would have to write the
procedures to read the PRODUCT record initially and
t h e n , u s i n g t h e a l t e r n a t e k e y v a l u e o b t a i n ed from
the PRODUCT record occurrence, read the EMPLOYEE
records.

JOINING FILES
In the CDCS environment, one file can be accessed
at a time, or (if two or more files can be related
in some manner and defined as a relation) more than
o n e fi l e c a n b e a c c e s s e d a t a t i m e . I n p u t / o u t p u t
operations for single or multiple access are
performed by CYBER Record Manager (CRM) through
calls from CDCS. CRM can access records in a file
by using a record key that has been defined as the
k e y i n t o t h a t fi l e . A u n i q u e p r i m a r y k e y v a l u e i s
a s s o c i a t e d w i t h e a c h r e c o r d i n t h e fi l e . T h e
multiple-index capability of CRM provides for the
s p e c i fi c a t i o n o f a l t e r n a t e r e c o r d k e y s i n a d d i t i o n
t o t h e p r i m a r y k e y. W i t h a l t e r n a t e k e y s d e fi n e d
f o r a fi l e , a c c e s s t o t h e r e c o r d s i n t h a t fi l e i s
possible through the primary key or through any of
the alternate keys.

The programming becomes more difficult when three
records are participating in a relationship such as
the one just described. For example, if a CONTRACT
record were introduced into the above relationship
and many records were retrieved for each alternate
key value, the programming to handle this rela
tionship would be more complicated than for the
r e l a t i o n s h i p j o i n i n g o n l y t w o fi l e s .
T h e r e l a t i o n s h i p j o i n i n g t h r e e fi l e s i s i l l u s t r a t e d
i n fi g u r e 6 - 5 . T h e d e fi n e d s t r u c t u r e o f t h e
r e l a t i o n s h i p b e g i n s w i t h a c o n t r a c t n u m b e r. T h e
CONTRACTS file is accessed first. CONTRACT-NO from
the CONTRACT record occurrence is used to access
the PRODUCTS file via its alternate key CONTRACT-NO.
A number of products exist for a given contract;
that is, there are duplicate values in the contract
number field.

When a data base is designed and created, it
u s u a l l y c o n t a i n s s e v e r a l fi l e s w i t h c o m m o n d a t a
i t e m d e s c r i p t i o n s . T h e i n f o r m a t i o n i n o n e fi l e i s
r e l a t e d t o t h e i n f o r m a t i o n i n a n o t h e r fi l e . W h e n
an application program processes information in one
fi l e , i t m i g h t u s e a d a t a i t e m o b t a i n e d f r o m t h a t
fi l e t o a c c e s s a s e c o n d fi l e . I n f o r m a t i o n i n t h e
second file, in turn, might be used to access still
a t h i r d fi l e . A l o g i c a l r e l a t i o n s h i p c a n t h e n b e
i d e n t i fi e d f o r t h e s e t h r e e fi l e s t h a t a r e i n t e r r e
l a t e d . F o r e x a m p l e , t h e E M P L O Y E E S fi l e a n d t h e
PRODUCTS file of an application are related by a
common data item, PROJECT-NO. A PRODUCT record
type and an EMPLOYEE record type are linked by
PROJECT-NO, an alternate key in the EMPLOYEES file.

Each PRODUCT record occurrence retrieved for a
given contract supplies the project number value
t h a t c a n i n t u r n b e u s e d t o r e t r i e v e a n umber of
EMPLOYEE record occurrences. PROJECT-NO is an
alternate key in the EMPLOYEE record and, again,
duplicate values exist.
Hierarchical Tree Structure

The dependency of the record occurrences within the
files joined by a directed relationship can be
schematically represented as a hierarchical tree
structure like the one shown in figure 6-6. The
root of the tree contains the record occurrences of
the CONTRACTS file. The CONTRACT record occurrence
branches to record occurrences in the PRODUCTS
file. Likewise, the PRODUCT record occurrences

The PRODUCT record is read using the primary key
PRODUCT-NO, and the EMPLOYEE record is accessed by
alternate key using the value of PROJECT-NO ob
tained from the P R O D U C T r e c o r d . T h e a p p l i c a t i o n
programmer can then use PROJECT-NO as a key to
retrieve all the employee record occurrences for

PRODUCT-NO
(Primary Key)

PROJECT-NO

TO TA L - B

/

7 EMPLOYEE-NO
(Primary Key)

PROJECT-NO
(Alternate Key)

/

COST

PRODUCTS File
PRODUCT Record

^L

-r~

Z_
SALARY

OVERTIME

EMPLOYEES File
EMPLOYEE Record

Figure 6-4. Two-File Relationship Example

6-6

60485200 A

/#*>

CONTRACT-NO
(Primary Key)

DUE-DATE

PRODUCT-NO
(Primary Key)

CONTRACT-NO
(Alternate Key)

EMPLOYEE-NO
(Primary Key)

PROJECT-NO
(Alternate Key)

CONTRACTS File
CONTRACT Record

DESCRIPTION

PROJECT-NO TO TA L - B

SALARY

COST

OVERTIME

PRODUCTS File
PRODUCT Record

EMPLOYEES File
EMPLOYEE Record

Figure 6-5. Three-File Relationship Example

/g|B*V

CONTRACT Record Occurrence
CONTRACTS File
(Root File Rank 1)

PRODUCT Record Occurrences
PRODUCTS File
(Rank 2)

EMPLOYEE Record Occurrences
EMPLOYEES File
(Rank 3)
Figure 6-6. Tree Structure of CONTRACTS-PRODUCTS-EMPLOYEES Relationship

jfjJ^N

branch to record occurrences in the EMPLOYEE file.
Extraction of record occurrences from each of the
t h r e e fi l e s i n t h e r e l a t i o n s h i p i s p e r f o r m e d
automatically for the application program through
CDCS if a relation joining the CONTRACTS, PRODUCTS,
and EMPLOYEES files has been defined in the schema
and included in the subschema used by the applica
tion program.

Ranks of a Relation
A relation entry in the schema contains the
relation name and a JOIN clause specifying the
i d e n t i fi e r s t h a t a r e u s e d t o l i n k t h e fi l e s i n t h e
r e l a t i o n . T h e fi l e s l i n k e d t o g e t h e r i n a r e l a t i o n
are assigned a rank in the relation.
T h e i d e n t i fi e r s i n t h e J O I N c l a u s e s p e c i f y a d a t a
item and an area to be involved in the relation.
F o r d e t a i l e d i n f o r m a t i o n o n t h e r e l a t i o n e n t r y,

60485200 A

refer to section 2. For
entry that assigns the name
EMPLOYEES to the relation
d e fi n e s t h e r e l a t i o n i s a s

example, the relation
CONTRACTS-PRODUCTSshown in figure 6-5 and
follows:

RELATION NAME IS CONTRACTS-PRODUCTS-EMPLOYEES
JOIN WHERE
CONTRACT-NO OF CONTRACT EQ CONTRACT-NO OF
PRODUCT
PROJECT-NO OF PRODUCT EQ PROJECT-NO OF EMPLOYEE
The order in which an area is included in a rela
tion determines the rank in the relation of the
a s s o c i a t e d fi l e . T h e fi l e a s s o c i a t e d w i t h t h e
fi r s t a r e a i n c l u d e d i n t h e r e l a t i o n i s a s s i g n e d
rank 1; the second rank 2, and so on, with newly
assigned rank being an increment of 1 of the last
r a n k a s s i g n e d . I n t h e e x a m p l e , t h e fi l e s a r e
assigned ranks in the relation as follows:
CONTRACTS, rank 1; PRODUCTS, rank 2; and EMPLOYEES,
rank 3.

6-7

The lower rank a file has in a relation, the higher
p o s i t i o n t h e fi l e h a s i n t h e h i e r a r c h i c a l t r e e
s t r u c t u r e . F o r e x a m p l e , t h e fi l e o f l o w e s t r a n k
( t h e r o o t fi l e , w h i c h i s a s s i g n e d r a n k 1 ) i s
pictured at the top of the tree structure.

f o r r e c o r d s i n a n y fi l e i n t h e r e l a t i o n s h i p . U s e
o f q u a l i fi c a t i o n c a n g r e a t l y l i m i t t h e n u m b e r o f
record occurrences returned to the user's work
area. For a better understanding of this state
ment, the CONTRACTS-PRODUCTS-EMPLOYEES relationship
is reexamined.

Parent/Child Relationship

A tree structure of record occurrences in the
CONTRACTS-PRODUCTS-EMPLOYEES relation is illustrated
i n fi g u r e 6 - 7 . A c o n t r a c t C l i s c o m p o s e d o f f o u r
products: PI, P2, P3, and P4. Each product is
developed by a number of employees and each em
ployee works on only one product. For example,
employees El and E2 develop product PI; employees
E3, E4, E5, and E6 develop product P2. Proceeding
from left to right following each path up the tree
structure, twelve record occurrences of the rela
tionship can be identified, namely C1P1E1, C1P1E2,
C1P2E3, C1P2E4, and so on.

T h e j o i n i n g o f fi l e s i n a d i r e c t e d r e l a t i o n s h i p
results in a dependency condition between record
o c c u r r e n c e s l i n k e d i n t h e fi l e s . A r e c o r d o c c u r
rence in the root file is termed the parent record
occurrence for all related record occurrences (each
t e r m e d a c h i l d r e c o r d o c c u r r e n c e ) i n t h e fi l e
linked to it. A child record occurrence can also
be a parent record occurrence when a subsequent
fi l e i s j o i n e d i n t h e r e l a t i o n a n d r e l a t e d r e c o r d
occurrences exist in that subsequent file.
In the CONTRACTS-PRODUCTS-EMPLOYEES relation, a
record occurrence in CONTRACTS file is the parent
record occurrence for related record occurrences in
the PRODUCTS file. Likewise, a record occurrence
in the PRODUCTS file is a parent of several record
o c c u r r e n c e s i n t h e E M P L O Y E E S fi l e . T h e r e c o r d
occurrences in the PRODUCTS files are the children
o f a r e c o r d o c c u r r e n c e i n t h e C O N T R A C T S fi l e .
Likewise, the record occurrences in the EMPLOYEES
fi l e a r e c h i l d r e n o f a r e c o r d o c c u r r e n c e i n t h e
PRODUCTS file.
A parent record occurrence is one that has another
record occurrence at the next numerically higher
rank in the relation. A child record occurrence is
one that has another record occurrence at a numer
ically lower rank in the relation.

RECORD QUALIFICATION
Record qualification is the method used to restrict
w h i c h r e c o r d s a r e t o b e r e t u r n e d t o t h e u s e r.
R e c o r d q u a l i fi c a t i o n i s i m p l e m e n t e d b y s p e c i f y i n g
c r i te r i a th a t m u s t b e s a t i s fi e d b y a r e c o r d o c c u r
r e n c e . Q u a l i fi c a t i o n i s s p e c i fi e d I n t h e s u b s c h e m a

Qualification criteria are specified in the RESTRICT
clause in the COBOL and Query Update subschemas and
in the RESTRICT statement in the FORTRAN subschema;
the criteria are used by CDCS to determine whether
a record occurrence qualifies to be returned to the
user's work area as part of the relation occur
rence. For example, to retrieve the records of
those employees working on product P4, qualifica
tion can be specified for the PRODUCT record type
t o i n d i c a t e t h a t t h e r e c o r d o c c u r r e n c e s s hould be
restricted to those in which the value of the
product number field is P4. CDCS reads and dis
cards record occurrences PI, P2, and P3 before
retrieving record occurrence P4 and its child
record occurrences. Since PI, P2, and P3 do not
q u a l i f y, n o i n p u t / o u t p u t o p e r a t i o n s a r e p e r f o r m e d
to retrieve their child record occurrences.
Without the facility to qualify records, each of
the record occurrences to the left of the required
ones (including PI, P2, and P3 and all their child
record occurrences) would have to be extracted and
returned to the user's work area (in many cases,
after CDCS record mapping is performed). The user
would then have to determine if the record occur
rence was the one required or not.

CONTRACT Record Occurrence
CONTRACTS File

PRODUCT Record Occurrences
PRODUCTS File

EMPLOYEE Record Occurrences
EMPLOYEES File
E1

E2

E3

E4

E5

E6

E7

E8

E9

E10

E 11

E12

Figure 6-7. Complex Tree Structure for CONTRACTS-PRODUCTS-EMPLOYEES Relationship

y*3ftv

6-8

60485200 A

Record qualification in the COBOL and Query Update
s u b s c h e m a s i s d e fi n e d i n t h e R e l a t i o n D i v i s i o n .
This division contains the relation name and the
RESTRICT clause, which specifies record qualifica
tion. Refer to section 3 for further details on
the Relation Division.
Record qualification in the FORTRAN subschema is
d e fi n e d i n a r e l a t i o n d e fi n i t i o n . A r e l a t i o n
definition contains the RELATION statement (which
specifies the name of the relation) and the RESTRICT
s t a t e m e n t ( w h i c h s p e c i fi e s r e c o r d q u a l i fi c a t i o n ) .
Refer to section 4 for further details on the
r e l a t i o n d e fi n i t i o n .

CDCS RELATION PROCESSING
A r e l a t i o n d e fi n e s a d i r e c t e d p a t h j o i n i n g s e v e r a l
fi l e s . J o i n t e r m s , c a l l e d i d e n t i fi e r s , a r e d a t a
i t e m s t h a t l i n k t h e fi l e s . T h e i d e n t i fi e r s m u s t b e
inspected by CDCS to traverse the relation and
r e t u r n a r e c o r d o c c u r r e n c e f r o m e a c h fi l e i n t h e
relation to the user's work area. The JOIN clause
i n t h e s c h e m a i s u s e d t o s p e c i f y t h e i d e n t i fi e r s .
Input/output statements in COBOL and in the FORTRAN
Data Manipulation Language (DML) can be used to
position and read a relation. Query Update per
forms relation processing if it is required to
s a t i s f y a q u e r y a n d a r e l a t i o n s p e c i fi e d i n t h e
subschema.
The following paragraphs describe positioning and
reading a relation. The statements described are
those used in COBOL and FORTRAN application
programs. For detailed information on relation
processing using the application programming
languages, see the CDCS 2 Application Programming
reference manual.

Source and Target Identifiers
W h e n C D C S t r a v e r s e s fi l e s i n a r e l a t i o n , C D C S
inspects the join terms that have been specified by
the JOIN clause in the schema. The join term in
one file (which contains parent record occurrences)
is used to obtain a record occurrence from the file
which is joined to it (which contains child record
o c c u r r e n c e s ) . T h e j o i n t e r m i n t h e fi r s t fi l e i s
t e r m e d t h e s o u r c e i d e n t i fi e r . T h e v a l u e o f t h e
s o u r c e i d e n ti fi e r m u s t b e i d e n t i c a l t o t h e v a l u e o f
t h e t a r g e t i d e n t i fi e r i n t h e s e c o n d fi l e s o t h a t
the record occurrences can be joined. The target
i d e n t i fi e r d e t e r m i n e s t h e r e t r i e v a l m e t h o d t h a t
CDCS must employ to read a record occurrence from
t h e t a r g e t fi l e .
I f t h e t a r g e t i d e n t i fi e r i s a d a t a i t e m t h a t w a s
d e fi n e d a s a p r i m a r y o r a n a l t e r n a t e k e y i n t h e
s c h e m a d a t a c o n t r o l e n t r y, r e t r i e v a l i s m o s t
e f fi c i e n t s i n c e t h e t a r g e t fi l e c a n b e a c c e s s e d
r a n d o m l y. I f t h e t a r g e t i d e n t i fi e r i s a n i t e m t h a t
i s d e fi n e d a s t h e l e f t m o s t p o r t i o n o f a p r i m a r y o r
alternate key, the target file can also be accessed
randomly.
I f t h e t a r g e t i d e n t i fi e r I s a d a t a i t e m t h a t i s n o t
a k e y, r e t r i e v a l i s i n e f fi c i e n t . C D C S r e w i n d s t h e
fi l e a n d s e a r c h e s i t s e q u e n t i a l l y u n t i l a m a t c h
o c c u r s f o r t h e i d e n t i fi e r s . T h e fi l e m u s t b e
searched until a match occurs on the contents of
t h e j o i n fi e l d s , o r u n t i l t h e e n d - o f - i n f o r m a t i o n o n
the file is reached.

60485200 A

Relation Positioning
A relation can be positioned for subsequent sequen
tial read processing through the COBOL and FORTRAN
D M L r e l a t i o n S TA RT s t a t e m e n t s . I n a n a p p l i c a t i o n
program, a START statement that specifies a rela
t i o n n a m e c a u s e s t h e r o o t fi l e o f t h e r e l a t i o n t o
be positioned at the record whose key satisfies the
condition specified in the KEY phrase of the START
s t a t e m e n t . T h e k e y s p e c i fi e d i n t h e S TA RT s t a t e
ment is established as the key of reference. The
k e y o f r e f e r e n c e i s a l w a y s a k e y i n t h e r o o t fi l e .
After the root file has been positioned and the key
of reference has been established, a sequential
read of the relation returns to the user the record
o c c u r r e n c e f r o m t h e r o o t fi l e t h a t s a t i s fi e s t h e
c o n d i t i o n i n t h e S TA RT s t a t e m e n t . I t a l s o r e t u r n s
a record occurrence from each file at a higher rank
in the relation. A sequential read loop following
a r e l a t i o n s t a r t o p e r a t i o n r e f e r e n c e s t h e r o o t fi l e
according to the key established by the operation.

Relation Read
The user specifies a relation read by using one of
t h e R E A D s t a t e m e n t f o r m a t s . I f t h e u s e r s p e c i fi e s
a ke y i n th e R EAD sta te me n t, th e root file in the
relation is accessed randomly according to the
p r i m a r y o r a l t e r n a t e k e y i n t h a t fi l e . I f n o k e y
i s s p e c i fi e d , h o w e v e r , t h e r o o t fi l e i s r e a d
sequentially by the current key of reference.
O t h e r fi l e s i n t h e r e l a t i o n a r e a c c e s s e d b y C D C S
d e p e n d i n g o n t h e i d e n t i fi e r s s p e c i fi e d f o r t h e
fi l e s . I f t h e t a r g e t i d e n t i fi e r i s a n a l t e r n a t e
k e y f o r a fi l e c o n t a i n i n g c h i l d r e c o r d o c c u r r e n c e s ,
t h a t fi l e i s r e a d r a n d o m l y b y a l t e r n a t e k e y. T h e
d i a g r a m i n fi g u r e 6 - 8 i l l u s tr a te s a g r oup of record
occurrences for a relation having three files.
I f t h e r e l a t i o n i s r e a d s e q u e n t i a l l y, t h e o r d e r i n
w h i c h r e c o r d o c c u r r e n c e s a r e r e t u r n e d to the user
i s A , B , a n d C fi r s t , p r o v i d i n g t h i s s e t o f r e c o r d
o c c u r r e n c e s m e e t s q u a l i fi c a t i o n c r i t e r i a . S u c c e s
sive sequential reads of this relation by CDCS
would return the remaining record occurrences that
are child record occurrences of B (namely record
occurrences D and E). FILEA and FILEB are not read
again since CDCS expects the user's work areas to
s t i l l c o n t a i n r e c o r d o c c u r r e n c e s A a n d B . To
retrieve the next record occurrence, CDCS returns
to FILEB in the relation and retrieves record
o c c u r r e n c e F, i f F m e e t s q u a l i fi c a t i o n c r i t e r i a ,
and in turn retrieves the children of record
occurrence F (record occurrences G and H).
T h e d i a g r a m i n fi g u r e 6 - 9 i d e n t i fi e s t h e r e c o r d
occurrences that are contained in the user's work
areas after each read of the relation, assuming the
r e c o r d o c c u r r e n c e s s h o w n m e e t q u a l i fi c a t i o n
criteria. The user's work areas contain record
occurrences with record descriptions that are
d e fi n e d i n t h e s u b s c h e m a u s e d b y t h e a p p l i c a t i o n
program.
The relation is first read randomly if the user has
specified a key in the READ statement. Successive
s e q u e n t i a l r e a d s o f t h e r e l a t i o n a r e s p e c i fi e d b y
the user with the READ NEXT AT END statement in
COBOL or the READ statement without the KEY option
i n F O RT R A N ; t h e s e a r e t r a n s l a t e d t o r e tr i e v a l s o n
t h e a p p r o p r i a t e fi l e s i n t h e r e l a t i o n . W i t h i n t h e
sequential read loop, the user should not try to
r e p o s i t i o n t h e fi l e s i n v o l v e d .

6-9

FILEA Record Occurrence

FILEB Record Occurrences

FILEC Record Occurrences

Figure 6-8. Record Occurrences for Three Related Files
yrfCS^SV

User's Work Areas
A

B

C

A

B

D

A

B

E

A

F

G

A

F

H

> First read

I Successive
/ sequential reads

Figure 6-9. Record Occurrences in User's Work Areas After Reading

Order of Record Retrieval
T h e o r d e r i n w h i c h r e c o r d o c c u r r e n c e s f o r a fi l e
are returned to the user work area as part of a
relation occurrence depends on the target identi
fi e r f o r t h a t fi l e . W h e n a r e l a t i o n i s r e a d
s e q u e n t i a l l y, a g r o u p o f c h i l d r e c o r d o c c u r r e n c e s
for one parent record occurrence is ordered as
follows:
I f t h e t a r g e t i d e n t i fi e r i s a n a l t e r n a t e k e y
with duplicate values, record occurrences are
ordered according to the order in which alter
n a t e k e y s a r e s t o r e d i n t h e i n d e x fi l e . T h e
order depends on what has been specified in the
D U P L I C AT E S o p t i o n o f t h e K E Y c l a u s e i n t h e
schema data control entry.
I f t h e t a r g e t i d e n t i fi e r i s n o t a k e y, r e c o r d
occurrences are ordered in the sequence In
w h i c h r e c o r d s c o n t a i n i n g a s p e c i fi c v a l u e f o r
t h e t a r g e t i d e n t i fi e r a r e s t o r e d i n t h e fi l e .
If the target
of a primary
occurrences
portion of the
i d e n t i fi e r .

6-10

i d e n t i fi e r i s t h e m a j o r p o r t i o n
o r a l t e r n a t e k e y, t h e r e c o r d
are ordered according to the
k e y fi e l d t h a t i s n o t t h e t a r g e t

I f t h e t a r g e t i d e n t i fi e r i s o m i t t e d f r o m t h e
subschema record description, it is not returned to
the user's work area and the ordering of child
record occurrences may depend on a value that is
inaccessible by the user.

Informative Conditions
CDCS detects
conditions:

the occurrence of the following

Null record occurrence on a file
Control break on a file
A FORTRAN or COBOL application program can check
for these conditions and determine the lowest
r a n k e d fi l e o n w h i c h t h e c o n d i t i o n o c c u r s i f
a p p r o p r i a t e r e c e i v i n g fi e l d s a r e d e fi n e d a n d u s e d
in the application program. Refer to the CDCS 2
Application Programming reference manual for
detailed information on status checking.

60485200 A

^^\

Null Record Occurrence

Control Break

If a parent re c o r d o c c u r r e n c e d o e s n o t q u a l i fy fo r
retrieval, any child record occurrences automati
c a l l y d o n o t q u a l i f y. I n t h e e x a m p l e s h o w n i n
fi g u r e 6 - 9 , i f B d o e s n o t q u a l i f y, r e c o r d o c c u r
rences C, D, and E automatically do not qualify;
none of these record occurrences would be returned
to the user'8 work areas for FILEB and FILEC. If,
however, B does qualify, but C, D, and E do not,
one null record occurrence is returned to the
user's work area for FILEC to indicate that no
c h i l d r e c o r d o c c u r r e n c e s o f B q u a l i f y. T h e n u l l
record occurrence consists of a display code right
bracket (]) in e a c h c h a r a c te r p o s i ti o n ; th e n u m b e r
o f c h a r a c t e r p o s i t i o n s fi l l e d d e p e n d s o n t h e s u b
schema description of the record type.

T h e c o n t r o l b r e a k c o n d i t i o n o n a fi l e s i g n i fi e s
that a new record occurrence was read for the
p a r e n t fi l e i n t h e r e l a t i o n . C o n t r o l b r e a k s t a t u s ,
h o w e v e r, i s r e t u r n e d f o r t h e r e a l m o f t h e c h i l d .
I f a fi l e i n a r e l a t i o n h a s c o n t r o l b r e a k s t a t u s
after a sequential READ statement has been issued
for the relation, the record occurrence read for
t h i s fi l e i s a c h i l d r e c o r d o c c u r r e n c e f o r a n e w
parent record occurrence.

In general, a null child record occurrence status
is returned to the user if all the children of a
p a r e n t r e c o r d o c c u r r e n c e t h a t q u a l i fi e d d o n o t
q u a l i f y, o r i f n o c h i l d r e c o r d o c c u r r e n c e s e x i s t .
Some examples of null record occurrences returned
t o t h e u s e r ' s w o r k a r e a a r e i l l u s t r a t e d i n fi g u r e
6-10.
When null record occurrences are returned for all
files in a relation, another READ statement must be
executed to obtain the next set of record occur
rences for the relation.

C o n t r o l b r e a k s t a t u s i s n o t s e t f o r a fi l e i f a
null record occurrence status must be set.

Example of Null Record and Control Break Conditions
Record occurrences and control break conditions are
shown in figure 6-11. The example shows the record
occurrences A through M in files FILE1, FILE2, and
FILE3 and the control break and null occurrence
conditions that result from retrieval of each
r e l a t i o n o c c u r r e n c e . N o q u a l i fi c a t i o n c r i t e r i a
have been specified on any of the records for the
fi l e s .

Record Occurrences in the Relation
A

C

D

E

A qualifies, B and F do not qualify.
User's Work Areas

] 1 ...1

] 1 ...1

F

] 1 ...1

A and F qualify.
User's Work Areas

A

A and B qualify, C, D, and E do not qualify.
User's Work Areas

] 1 ...1

Figure 6-10. Null Record Occurrence Examples

60485200 A

6-11

•

(R a n k 1 ) F I L E 1

t,

A

H

•

K

T

M

1
/

dB

(R a n k 2 ) F I L E 2

/
t/c

(R a n k 3 ) F I L E 3

Relation Occurrences
A

B

C

A
A

B
E

D
F

A

G

H

I

K
M

/
\
V

Ve

\

\

\g

\
\
D

x
\

?

,

X

i

I

|l

•

1
I

x
Vj

1

J

■

i
i
1

1]

i

J

Data Base Status Block
Null Occurrence Rank Control Break Rank Condition - File
(Control break - FILE2
0
2
UontroL break - FILE3
0
0
0
3
Control break - FILE3

null

3

0

J

0

2

L

null

3

2

null

null

2

0

Null occurrence - FILE3
(Control break (Control break (Null occurrence
(Control break Null occurrence

FILE3
FILE2
- FILE3
FILE2
- FILE2

Figure 6-11. Example of Null Occurrence and Control Break Conditions

Effect of Versions on Relation Retrieval
A r e l a t i o n c a n j o i n d i ff e r e n t g r o u p s o f p e r m a n e n t
fi l e s w b e n d a t a b a s e v e r s i o n s e x i s t . T h e fi l e s
joined in a relation depend on the files associated
w i t h t h e v e r s i o n b e i n g u s e d . S o m e fi l e s a r e u s e d
b y s e v e r a l v e r s i o n s w h i l e o t h e r fi l e s a r e u s e d b y
only one version. This means that relational reads
can yield different results depending on the
version used.
For example, figure 6-12 illustrates the CONTRACTSPRODUCTS-EMPLOYEES relation being used with two
data base versions, MASTER and UNIT1. Contrasted
with previous examples of this three-level rela
tion, the names CONTRACTS, PRODUCTS, and EMPLOYEES
now refer only to the areas defined in the schema
a n d n o t t o t h e p e r m a n e n t fi l e s ; t h e a r e a s a r e
a s s o c i a t e d w i t h p e r m a n e n t fi l e s w i t h d i f f e r e n t
names.
In the example, versions MASTER and UNIT1 share two
files: CMSTR (associated with the area CONTRACTS)
and EMSTR (associated with the area EMPLOYEES).
E a c h v e r s i o n u s e s a s e p a r a t e fi l e a s s o c i a t e d w i t h
the area PRODUCTS.
A relational read using version MASTER could result
in the following record occurrences being returned:
Record 1 of permanent file CMSTR
Record 1 of permanent file PMSTR
Record 1 of permanent file EMSTR
The same relational read using version UNIT1 could
result in the following record occurrences being
returned:

Area
Name

CONTRACTS

PRODUCTS

EMPLOYEES

Rank in
Relation

Version
MASTER

File
CMSTR

IVersion
UNIT1

File
PMSTR

-J

Default
File
(CMSTR)

File
EMSTR

h
File
PU1

«1
Default
File
(EMSTR)

Figure 6-12. Example of Files Joined by a
Relation and Grouped by Version
Record 1 of permanent file CMSTR
Record 1 of permanent file PU1
Record 3 of permanent file EMSTR
There are no restrictions on the use of relations
w i t h d a t a b a s e v e r s i o n s ; h o w e v e r, t h e p o s s i b i l i t y
of retrieving different records in relational reads
that use different data base versions should be
recognized.
,
permanent
file information
subentry
[RESTART
IDENTIFIER
FILE
Figure 8-2. General Format, Creation Run
T h e c r e a t i o n e n t r y d e fi n e s t h e f o l l o w i n g i n f o r m a
t i o n f o r a d a t a b a s e : a l l l o g a n d r e c o v e r y fi l e s ,
versions, areas, and subschemas associated with a
particular schema. A series of subentries is
required in t h e c r e a t i o n e n t r y. T h e g e n e r a l f o r m a t
of a creation entry is shown in figure 8-3.

[JOURNAL
permanent
LOG FILEfile information subentry.
TQUICK RECOVERY FILE
| _ p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y.
JOB CONTROL INFORMATION

schema subentry

TYPE IS

master version subentry
[alternate version subentry] ...
{subschema subentry} ...
Figure 8-3. General Format, Creation Entry
The subentries within the creation entry must
a p p e a r i n t h e o r d e r i n d i c a t e d i n fi g u r e 8 - 3 . T h e
alternate version subentry and the subschema subentry can be repeated. A maximum of 4095 data base
versions can be specified for a schema. Any number
of subschemas can be associated with a particular
schema in the master directory.

SCHEMA SUBENTRY
The schema subentry specifies the schema name, the
l o g a n d r e c o v e r y fi l e s , a n d t h e p r o c e d u r e l i b r a r y
fi l e u s e d f o r t h e s c h e m a . A l s o , j o b c o n t r o l i n f o r
mation for the CDCS-initiated job to dump the
j o u r n a l l o g fi l e c a n b e s p e c i fi e d . T h e f o r m a t o f
t h e s c h e m a s u b e n t r y i s s h o w n i n fi g u r e 8 - 4 . A
period must terminate the schema subentry.
Two clauses are required in the schema subentry:
SCHEMA NAME and FILE NAME. The SCHEMA NAME clause
must appear first in the subentry and must be fol
lowed by the FILE NAME clause. The other clauses
are optional; they include the following:
PROCEDURE LIBRARY clause

TAPE
DENSITY IS-Cj^

CUN IS literal-ID
CPW IS literal-23
CFAMILY NAME IS family-name]
I"/ACCOUNT) I S l i t e r a l
[1 CHARGE f

-']

CCLPROC NAME IS literal-4

access is {inject}]

Figure 8-4. Schema Subentry Format
QUICK RECOVERY FILE clause
JOB CONTROL INFORMATION clause
The optional clauses can appear in any order within
the schema subentry.

TRANSACTION RECOVERY FILE clause

SCHEMA NAME Clause

RESTART IDENTIFIER FILE clause

The SCHEMA NAME clause (figure 8-4) specifies the
name of a schema for a data base. This clause is
required.

JOURNAL LOG FILE clause
60485200 E

8-3

The schema name must be unique among all schema
names in the master directory. The name specified
h e r e i s t h e s a m e s c h e m a n a m e s p e c i fi e d i n t h e
schema directory and listed on the schema compila
tion listing. A schema name can be from 1 through
30 characters in length.

FILE NAME Clause (Schema Subentry)
T h e F I L E N A M E c l a u s e ( fi g u r e 8 - 4 ) i d e n t i fi e s t h e
n a m e o f t h e l o c a l fi l e t h a t c o n t a i n s t h e s c h e m a
d i r e c t o r y. T h i s c l a u s e i s r e q u i r e d .
The local file name (lfn) must be unique among all
l o c a l fi l e n a m e s s p e c i fi e d i n t h e m a s t e r d i r e c
t o r y. T h e l f n m u s t b e f r o m o n e t h r o u g h s e v e n
characters in length, must contain onl> letters and
d i g i t s , a n d m u s t b e g i n w i t h a l e t t e r . T h e fi l e
containing the schema directory must be attached in
the job stream with this lfn before execution of
the DBMSTRD control statement.

PROCEDURE LIBRARY Clause
The PROCEDURE LIBRARY clause (figure 8-4) specifies
t h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e fi l e t h a t
c o n t a i n s t h e d a t a b a s e p r o c e d u r e l i b r a r y. T h i s
clause must be used if data base procedures have
been defined in the schema; it must be omitted if
data base procedures have not been defined in the
schema.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e p r o c e d u r e
l i b r a r y fi l e m u s t b e s p e c i fi e d a s d e s c r i b e d i n t h e
Permanent File Subentry subsection. The combina
t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r p e r m a n e n t
fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k m u s t b e
u n i q u e i n t h e m a s t e r d i r e c t o r y. A d d i t i o n a l p e r m a
n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e
CDCS to attach the permanent file with the correct
permission.
All data base procedures for a schema must reside
i n t h e s p e c i fi e d fi l e . T h e y m u s t b e i n a f o r m
appropriate for loading by the fast dynamic loader
(FDL). The permanent file must exist before CDCS
accesses it during execution. For information
about creating a data base procedure library, refer
to section 7.

TRANSACTION RECOVERY FILE Clause
The TRANSACTION RECOVERY FILE clause (figure 8-4)
s e l e c t s t r a n s a c t i o n l o g g i n g a n d i d e n t i fi e s t h e fi l e
to which log records are written. This clause is
o p t i o n a l , b u t i t m u s t b e s p e c i fi e d i n o r d e r f o r
l o g g i n g t o a t r a n s a c t i o n r e c o v e r y fi l e t o b e p e r
formed for the schema.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e t r a n s a c t i o n
recovery file must be specified as described in the
Permanent File Subentry subsection. The literal
that specifies the permanent file name must follow
t h e r u l e s f o r p e r m a n e n t fi l e n a m e s e x c e p t t h a t i t
must be six characters in length. The permanent
fi l e n a m e t h a t C D C S a s s u m e s f o r t h e t r a n s a c t i o n
recovery file begins with these six characters; the
number 1 is the seventh character. The combination
o f p e r m a n e n t fi l e i n f o r m a t i o n f o r p e r m a n e n t fi l e
name (six characters and the character 1), UN/ID,
and family/set/pack m u s t b e u n i q u e i n t h e m a s t e r

| 8-4

d i r e c t o r y. T h e a d d i t i o n a l p e r m a n e n t fi l e i n f o r m a
t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o a t t a c h
the permanent file with the correct permission.
Refer to section 9 for information about the use of
t h e t r a n s a c t i o n r e c o v e r y fi l e .
UNIT LIMIT Clause
The UNIT LIMIT clause specifies the maximum number
of outstanding transactions that are allowed for a
schema. An outstanding transaction is one that was
begun but not committed. This clause is optional.
T h e i n t e g e r - 1 s p e c i fi e s t h e l i m i t ; i t m u s t b e a
positive decimal integer with a maximum value of 63.
I f t h i s c l a u s e i s n o t s p e c i fi e d , t h e v a l u e 1 5 i s
assumed.
UPDATE LIMIT Clause
T h e U P D AT E L I M I T c l a u s e s p e c i fi e s t h e m a x i m u m
number of updates that can be made within a par
ticular transaction. An update is one of the
following operations: delete, rewrite, or write.
This clause is optional.
T h e i n t e g e r - 2 s p e c i fi e s t h e m a x i m u m n u m b e r o f
updates; it must be a positive decimal integer with
a maximum value of 63.
I f t h i s c l a u s e i s n o t s p e c i fi e d , t h e v a l u e 1 5 i s
assumed.

RESTART IDENTIFIER FILE Clause
The RESTART IDENTIFIER FILE clause (figure 8-4)
s e l e c t s r e s t a r t i d e n t i fi e r l o g g i n g a n d i d e n t i fi e s
t h e fi l e t o w h i c h t h e r e s t a r t i d e n t i fi e r s a n d
associated committed transactions are written.
T h i s c l a u s e i s o p t i o n a l , b u t i t m u s t b e s p e c i fi e d
I n o r d e r f o r l o g g i n g t o a r e s t a r t i d e n t i fi e r fi l e
to be performed for the schema. If this clause is
specified, the TRANSACTION RECOVERY FILE clause
must also be specified.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e r e s t a r t
i d e n t i fi e r fi l e m u s t b e s p e c i fi e d a s d e s c r i b e d i n
the Permanent File Subentry subsection. The
c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r p e r
manent file name, UN/ID, and family/set/pack must
b e u n i q u e i n t h e m a s t e r d i r e c t o r y. T h e a d d i t i o n a l
p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi c i e n t t o
enable CDCS to attach the permanent file with the
correct permission.
Refer to section 9 for information about the use of
t h e r e s t a r t i d e n t i fi e r fi l e .

JOURNAL LOG FILE Clause
The JOURNAL LOG FILE clause (figure 8-4) specifies
l o g g i n g t o a j o u r n a l l o g fi l e a n d i d e n t i fi e s t w o
j o u r n a l l o g fi l e s . T h i s c l a u s e i s o p t i o n a l , b u t i t
must be specified in order for logging to a journal
log file to be performed for the schema. The LOG
clause indicating the logging of either BEFORE
RECORDS or AFTER RECORDS must be specified in the
area subentry so that logging to the journal log

60485200 E

<^*^5\

file can be performed for a given area of a given
version.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e j o u r n a l l o g
file must be specified as described in the Perma
nent File Subentry subsection. The literal that
specifies the permanent file name must follow the
rules for permanent file names except that it must
c o n t a i n e x a c t l y s i x c h a r a c t e r s . T h e p e r m a n e n t fi l e
names that CDCS assumes for the journal log files
b e g i n w i t h t h e s e s i x c h a r a c t e r s . F o r o n e fi l e , t h e
number 1 is the seventh character; for the other
fi l e , t h e n u m b e r 2 i s t h e s e v e n t h c h a r a c t e r. T h e
c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must be unique in the master directory. Additional
p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi c i e n t t o
enable CDCS to attach the permanent file with the
correct permission.

clauses being a minimum specification. For NOS/BE,
only the TAPE/CCLPROC and CHARGE/ACCOUNT clauses |
a p p l y. T h e u s e r m u s t k n o w t h e o p e r a t i n g s y s t e m
r e s t r i c t i o n s t h a t a p p l y t o i n f o r m a t i o n s p e c i fi e d i n
these clauses. Refer to the NOS or NOS/BE
reference manuals for further information.
TAPE Clause

The TAPE clause identifies the characteristics of
the tape to which the journal log file is dumped.
The TYPE options are MT (7-track tape) and NT
(9-track tape). The DENSITY options that can be
specified with each TYPE option are as follows:
MT (7-track tape)
LO (200 bits per inch [bpij)
HI (556 bpi)
HY (800 bpi)

This clause provides CDCS with two permanent file
names for two separate journal log files: one name
for the active file and one name for the alternate
fi l e . R e f e r t o s e c t i o n 9 f o r i n f o r m a t i o n a b o u t t h e
u s e o f t h e j o u r n a l l o g fi l e .

QUICK RECOVERY FILE Clause
The QUICK RECOVERY FILE clause (figure 8-4) selects
b l o c k l o g g i n g a n d i d e n t i fi e s t h e fi l e t o w h i c h t h e
before-image blocks are written. This clause is
o p t i o n a l , b u t i t m u s t b e s p e c i fi e d i n o r d e r f o r
l o g g i n g t o a q u i c k r e c o v e r y fi l e t o b e p e r f o r m e d
f o r t h e s c h e m a . A d d i t i o n a l l y, t h e L O G c l a u s e a n d
the BEFORE IMAGE BLOCKS logging option must be
s p e c i fi e d i n a n a r e a s u b e n t r y f o r l o g g i n g t o t h e
q u i c k r e c o v e r y fi l e t o b e p e r f o r m e d f o r a g i v e n
area of a given version.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e q u i c k r e
c o v e r y fi l e m u s t b e s p e c i fi e d a s d e s c r i b e d i n t h e
Permanent File Subentry subsection. The combina
t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r p e r m a n e n t
fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k m u s t b e
u n i q u e i n t h e m a s t e r d i r e c t o r y. T h e a d d i t i o n a l
p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi c i e n t t o
enable CDCS to attach the permanent file with the
correct permission.
Refer to section 9 for information about the use of
the quick recovery file.

JOB CONTROL INFORMATION Clause
The JOB CONTROL INFORMATION clause (figure 8-4)
designates the job control information to be used
by CDCS when constructing the online job that dumps
t h e c o n t e n t s o f t h e j o u r n a l l o g fi l e s . T h i s c l a u s e
i s o p t i o n a l , b u t i t m u s t b e s p e c i fi e d f o r t h e
o n l i n e d u m p o f t h e j o u r n a l l o g fi l e t o b e p e r
formed. The optional clauses that follow the
keywords JOB CONTROL INFORMATION provide CDCS with
the necessary information to construct the job that
performs the dump.
The appropriate optional clauses to specify in the
source input to the DBMSTRD utility depend on the
operating system used for executing CDCS. For NOS,
all optional clauses can apply with the UN and PW

60485200 E

NT (9-track tape)
HD (800 characters per inch [cpi])
PE (1600 cpi)
GE (6250 cpi)
If TYPE MT or NT is specified without a DENSITY
o p t i o n b e i n g s p e c i fi e d , t h e i n s t a l l a t i o n d e f a u l t
d e n s i t y f o r t h e t y p e s p e c i fi e d i s a s s u m e d . I f a
DENSITY option is specified without a TYPE option
b e i n g s p e c i fi e d , t h e t y p e i s d e t e r m i n e d a s i n d i
cated in the preceding list of allowed DENSITY
o p t i o n s f o r e a c h t y p e . I f t h e e n t i r e TA P E c l a u s e
is omitted, TYPE NT is assumed with the default
density of the installation.
CCLPROC Clause
The CCLPROC clause is an alternative to the TAPE
c l a u s e . I f n e i t h e r i s s p e c i fi e d t h e TA P E o p t i o n i s
a s s u m e d . T h e C C L P R O C c l a u s e i d e n t i fi e s a u s e r
defined CCL procedure that is called by the online
job that dumps the contents of the journal log file.
Use of this option permits the installation to
control whether the journal log file is dumped to a
t a p e o r t o a p e r m a n e n t fi l e . I t i s a l s o p o s s i b l e
to specify that the contents of the journal log
fi l e i s a p p e n d e d t o t h e d u m p fi l e i n s t e a d o f
over-writing it.
The following basic steps must be contained within
the CCL procedure defined by Literal-4:
1. Specify an ATTACH, REQUEST or LABEL statement
t o o b t a i n t h e fi l e t o w h i c h t h e j o u r n a l l o g
fi l e i s t o b e d u m p e d . T h i s fi l e m u s t b e g i v e n
the local file name of LOGDUMP.
2 . T h e fi l e , L O G D U M P, m u s t b e p o s i t i o n e d a t t h e
beginning or at the end of information, as
selected by the installation.
3. The CDCS master directory must be attached with
the local file name MSTRDIR.

4.

The utility progam, DBREC, must be called to
d u m p t h e j o u r n a l l o g fi l e .

8-4.1/8-4.2

// ...

Figure 8-5. Master Version Subentry Format
The VERSION NAME clause in the master version
subentry is optional. If this clause is not speci
fied, the version name MASTER is assumed. If this
c l a u s e i s s p e c i fi e d , i t m u s t i m m e d i a t e l y f o l l o w t h e
schema subentry in the master directory source
input.
A separate area subentry is required for each area
defined in the schema. Only one area subentry per
a r e a c a n b e s p e c i fi e d w i t h i n t h e m a s t e r v e r s i o n
s u b e n t r y. R e f e r t o t h e f o l l o w i n g s u b s e c t i o n f o r
the description of area subentry.
If the VERSION NAME clause is specified, the first
area subentry must follow that clause. Otherwise,
an area subentry must Immediately follow the schema
s u b e n t r y.

AREA SUBENTRY (MASTER VERSION
SUBENTRY)
The area subentry specifies an area defined in the
schema and designates the name of the permanent
fi l e f o r t h e d a t a fi l e a s s o c i a t e d w i t h t h e a r e a .
I f a n i n d e x fi l e i s r e q u i r e d f o r t h e a r e a , t h i s
subentry designates the name of the permanent file

AREA NAME Clause (Area Subentry)
T h e A R E A N A M E c l a u s e ( fi g u r e 8 - 6 ) i n t h e a r e a
s u b e n t r y s p e c i fi e s t h e n a m e o f t h e a r e a i n t h e
schema. This clause is required.
The area name specified must be the same as an area
n a m e s p e c i fi e d i n t h e s c h e m a d i r e c t o r y a n d l i s t e d
on the schema compilation listing. An area name
must be from 1 through 30 characters in length. A
p a r t i c u l a r a r e a c a n b e s p e c i fi e d o n l y o n c e i n t h e
source input for DBMSTRD for the particular version
of the schema.

Permanent File Information Subentry
(Area Subentry)
The PFN literal-1 clause and subsequent clauses
through SET and VSN (figure 8-6) actually make up a
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y. T h e s e c l a u s e s
are shown in figure 8-6 for the convenience of the
u s e r. T h e p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y f o r
the area file is required and must be specified as
described in the Permanent File Information Subentry subsection. The combination of permanent
fi l e i n f o r m a t i o n f o r p e r m a n e n t fi l e n a m e , U N / I D ,
and family/set/pack must be unique in the master
d i r e c t o r y. T h e a d d i t i o n a l p e r m a n e n t fi l e i n f o r m a
t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o a t t a c h
the permanent file with the correct permission.

AREA NAME IS area-name
PFN IS literal-1
l^ilS literal-2 CPW IS literal-3 Cliteral-4]...:
" FA M I LY N A M E I S f a m i l y - n a m e - 1 ~ |
PACK NAME IS pack-natne-1

CDEVICE TYPE IS dt-13

SET NAME IS set-narae-1 VSN IS literal-5
BEFORE IMAGE RECORDS \jfif\
LOG

AFTER IMAGE RECORDS \jfif\
BEFORE IMAGE BLOCKS [■—1

_
"index FILE ASSIGNED PFN IS literal-6

{\ ! £ l

IS literal-7 CPW IS literal-8 Cliteral-9J...3

"FAMILY NAME IS family-name-2
PACK NAME IS pack-name-2

-

CDEVICE TYPE IS dt-2D

SET NAME IS set-name-2 VSN IS literal-10_

Figure 8-6. Area Subentry Format

8-6

60485200 D

'*ia^\

LOG Clause (Area Subentry)

ALTERNATE VERSION SUBENTRY

T h e L O G c l a u s e ( fi g u r e 8 - 6 ) i n t h e a r e a s u b e n t r y
specifies the types of logging to be performed for
the area. T h i s c l a u s e i s o p t i o n a l .

An alternate version subentry designates the name
of an alternate data base version. It also associ
ates each area of the schema with logging options
and a permanent file (or two permanent files if an
i n d e x fi l e i s r e q u i r e d f o r t h e a r e a ) . T h i s s u b entry is optional. The format of the alternate
version subentry is shown in figure 8-7.

Three logging options can be specified. The BEFORE
IMAGE RECORDS option selects logging of beforei m a g e r e c o r d s t o a j o u r n a l l o g fi l e . ( A b e f o r e image record is a copy of a record before it is
updated.) The AFTER IMAGE RECORDS option specifies
logging of after-image records to a journal log
file. (An after-image record is a copy of a record
after it is updated). The BEFORE IMAGE BLOCKS
option selects logging of CRM blocks to a quick
r e c o v e r y fi l e .
The options that can be specified depend on the log
fi l e s s e l e c t e d f o r t h e s c h e m a . I f a j o u r n a l l o g
file is selected for the schema, the BEFORE IMAGE
RECORDS option and the AFTER IMAGE RECORDS option
c a n b e s p e c i fi e d . I f a q u i c k r e c o v e r y l o g fi l e i s
selected for the schema, the BEFORE IMAGE BLOCKS
o p t i o n c a n b e s p e c i fi e d . A l l o r n o n e o f t h e
o p t i o n s c a n b e s p e c i fi e d i f t h e l o g fi l e r e q u i r e
ments are met.
The keyword ON is assumed if a particular logging
option is specified; ON can be specified for docu
m e n t a t i o n p u r p o s e s . S p e c i fi c a t i o n o f t h e k e y w o r d
OFF causes no logging of the option indicated to be
p e r f o r m e d . I f n o l o g g i n g o p t i o n s a r e s p e c i fi e d ,
the OFF option is assumed.
Refer to section 9 for details on the journal log
fi l e , t h e q u i c k r e c o v e r y fi l e , a n d t h e l o g g i n g
options that must be selected for different re
covery capabilities.

An alternate version subentry must be included in
the master directory source input for each version
defined in addition to version MASTER. A total of
4 0 9 5 v e r s i o n s c a n b e d e fi n e d f o r a p a r t i c u l a r
schema in a master directory.
The permanent files associated with an area of an
a l t e r n a t e v e r s i o n c a n b e e i t h e r t h e s a m e fi l e s
associated with the same area in version MASTER or
u n i q u e fi l e s .
For any two areas that are associated by a con
s t r a i n t , t h e p e r m a n e n t fi l e s a s s o c i a t e d w i t h t h e
areas in each non-MASTER version must conform to
these rules:
Files for both areas of the constraint must be
the same as for version MASTER.
Files for both areas of the constraint must be
permanent files unique to the version.

VERSION NAME Clause (Alternate
Version Subentry)

INDEX FILE Clause (Area Subentry)

The VERSION NAME clause (figure 8-7) designates the
name of an alternate data base version. This
clause is required within an alternate version
subentry.

T h e I N D E X F I L E c l a u s e ( fi g u r e 8 - 6 ) i n t h e a r e a
s u b e n t r y s p e c i fi e s p e r m a n e n t fi l e i n f o r m a t i o n f o r
t h e i n d e x fi l e f o r t h e a r e a o f t h e p a r t i c u l a r
version. This clause is required if alternate key
processing has been defined for the area and is not
allowed if no alternate keys are defined.

T h e v e r s i o n n a m e s p e c i fi e s t h e a l t e r n a t e v e r s i o n
name. The version name must be from one through
seven characters in length, must contain letters or
d i g i t s , m u s t b e g i n w i t h a l e t t e r, a n d m u s t d u p l i
cate no other version name associated with the same
schema.

The PFN literal-6 clause and subsequent clauses
through SET and VSN actually make up a permanent
file information subentry. These clauses are shown
in figure 8-6 for the convenience of the user. The
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y f o r t h e i n d e x
fi l e m u s t b e b e s p e c i fi e d a s d e s c r i b e d i n t h e
Permanent File Information Subentry subsection.
T h e c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must be unique in the master directory. The addi
t i o n a l p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi
cient to enable CDCS to attach the permanent file
with the correct permission.

AREA NAME SAME AS MASTER Clause
(Alternate Version Subentry)
The AREA NAME SAME AS MASTER clause (figure 8-7)
a s s o c i a t e s t h e s p e c i fi e d a r e a o f t h e a l t e r n a t e
v e r s i o n w i t h t h e s a m e p e r m a n e n t fi l e s a n d l o g g i n g
o p t i o n s a s s p e c i fi e d f o r t h e s a m e a r e a i n v e r s i o n
MASTER. This clause is optional. If this clause
i s n o t s p e c i fi e d a n d n o a r e a s u b e n t r y i s s p e c i fi e d
for a particular area within the alternate version
subentry, SAME AS MASTER is assumed.

VERSION NAME IS version-name

{.>

II AREA NAME IS area-name SAME AS MASTER.
||area subentry

Figure 8-7. Alternate Version Subentry Format

60485200 A

8-7

The area name specified in the clause must be an
area defined in the schema. The area name cannot
duplicate an area name specified in either another
AREA NAME SAME AS MASTER clause or in an area
subentry within the alternate version subentry.

The subschema name must be unique among all sub
s c h e m a n a m e s d e fi n e d f o r t h e s c h e m a . T h e n a m e
specified here is the same subschema name specified
in the DDL subschema definition. A subschema name
must be from 1 through 30 characters in length.

A period must terminate this clause.

FILE NAME Clause (Subschema Subentry)
Area Subentry (Alternate
Version Subentry)
The area subentry specifies an area defined in the
schema and designates the name of the permanent
fi l e f o r t h e d a t a fi l e a s s o c i a t e d w i t h t h e a r e a .
If an index file is required for the area, the area
subentry designates the name of the permanent file
for the index file for the area. The &rea subentry
also designates the logging options selected for
t h e a r e a . R e f e r t o fi g u r e 8 - 6 f o r t h e f o r m a t o f
the area subentry.
An area subentry is optional, but it is required to
associate an area w i t h p e r m a n e n t fi l e s o t h e r th a n
those specified for the area in the master version
subentry.
The area name specified in the area subentry cannot
duplicate an area name specified either in another
area subentry or in an AREA NAME SAME AS MASTER
clause within the alternate version subentry.
An area subentry must be consistent with the area
s u b e n t r y s p e c i fi e d f o r t h e s a m e a r e a i n v e r s i o n
MASTER. If the same area in version MASTER is
a s s i g n e d a n i n d e x fi l e , t h e a r e a i n t h e a l t e r n a t e
v e r s i o n m u s t a l s o b e a s s i g n e d a n i n d e x fi l e . T h e
logging options selected can be different for the
same area in version MASTER and in the alternate
version.
T h e p e r m a n e n t fi l e i n f o r m a t i o n s p e c i fi e d i n t h e
area subentry must identify unique permanent
fi l e s . R e f e r t o t h e A r e a S u b e n t r y i n t h e M a s t e r
Ve r s i o n S u b e n t r y s u b s e c t i o n f o r t h e d e s c r i p t i o n o f
the clauses of the area subentry.

SUBSCHEMA SUBENTRY
A subschema subentry is included for each subschema
that can be referenced by application programs
using CDCS. At least one subschema subentry must
be included for each schema. This subentry speci
fies the subschema name and the local file name of
t h e fi l e c o n t a i n i n g t h e s u b s c h e m a d i r e c t o r y. T h e
format of the subschema subentry is shown in figure
8-8.

SUBSCHEMA NAME IS subsc:hema-•name
FILE NAME IS I f n .
Figure 8-8. Subschema Subentry Format

SUBSCHEMA NAME Clause
(Subschema Subentry)
The SUBSCHEMA NAME clause specifies the name of a
subschema for a data base. This clause is required.

8-8

The FILE NAME clause of the subschema subentry
s p e c i fi e s t h e l o c a l fi l e n a m e ( l f n ) o f t h e s u b
s c h e m a d i r e c t o r y o r t h e s u b s c h e m a l i b r a r y. T h i s
clause is required.
The lfn must be from one through seven characters
in length, must contain only letters and digits,
a n d m u s t b e g i n w i t h a l e t t e r . T h e fi l e t h a t
contains the subschema directory or subschema
library must be attached in the job stream with
this lfn before the execution of the DBMSTRD con
trol statement.

SYNTAX FOR MODIFICATION RUN
I n a m o d i fi c a t i o n r u n , c h a n g e s s p e c i fi e d i n t h e
source input to the DBMSTRD utility are applied to
an existing master directory, designated to DBMSTRD
as the old master directory. The result of the
modification run is a new master directory; the old
master directory is not affected by the run. The
m o d i fi c a t i o n r u n c o n s i s t s o f t h r e e t y p e s o f e n
tries: add schema entry, delete schema entry, and
m o d i f y s c h e m a e n t r y. T h e g e n e r a l f o r m a t o f t h e
modification run is shown in figure 8-9.

add schema entry
delete schema entry

...

modify schema entry
Figure 8-9. General Format,
Modification Run
The entries of a modification run are optional and
can appear in any order and as many times as
desired, subject to a few restrictions:
A schema can be named in a delete schema entry
or in a modify schema entry only if information
f o r i t e x i s t s i n t h e o l d m a s t e r d i r e c t o r y.
A schema that is named in a modify schema entry
cannot be named in a subsequent delete schema
entry in the same run.
A schema for which information is added by an
add schema entry cannot be named in either a
subsequent delete schema entry or modify schema
entry in the same run.
A schema for which information already exists
in the old master directory can be deleted, and
new information for a schema with the same name
can be added.
The following subsections describe the entries for
t h e m o d i fi c a t i o n r u n . T h e f o r m a t s o f t h e e n t r i e s
are summarized in appendix E.

60485200 A

/**^\

ADD SCHEMA ENTRY
The add schema entry is used to add information for
one or more schemas to the master directory. The
add schema entry is composed of one or more crea
tion entries with each creation entry composed of a
schema subentry, master version subentry, alternate
version subentries (optional), and subschema subentries. The format of the add schema entry is
shown in figure 8-10.

MODIFY SCHEMA NAME IS schema-name
CFILE NAME IS lfn].
change procedure library subentry
change transaction recovery file subentry
c h a n g e r e s t a r t i d e n t i fi e r s u b e n t r y
change journal log file subentry
ADD SCHEMAS.
change quick recovery file subentry
{creation entry> ...
change job control information subentry
Figure 8-10. Add Schema Entry Format
A creation entry must not be used for a schema with
information already In the old master directory
unless that schema is being deleted in a preceding
d e l e t e s c h e m a e n t r y. T h e s e r i e s o f e n t r i e s o f t h e
creation entry must conform to the rules previously
s t a t e d . R e f e r t o t h e S c h e m a S u b e n t r y, M a s t e r
Ve r s i o n S u b e n t r y, A l t e r n a t e Ve r s i o n S u b e n t r y, a n d
Subschema Subentry subsections for the descriptions.

{change area subentry> ...
{delete version subentry} ...
{add version subentry} ...
{delete subschema subentry} ...
{add subschema subentry} ...
1
END i MODIFICATIONS
MODS
(*

DELETE SCHEMA ENTRY
The delete schema entry is used to delete infor
mation for one or more schemas from the master
d i r e c t o r y. T h e f o r m a t o f t h e d e l e t e s c h e m a e n t r y
is shown in figure 8-11.

DELETE SCHEMAS.
{SCHEMA NAME IS schema-■name . >

...

Figure 8-11. Delete Schema Entry Format

Figure 8-12. Modify Schema Entry Format
The modify schema subentry must begin with the
MODIFY SCHEMA NAME clause. The FILE NAME clause,
i f s p e c i fi e d , m u s t f o l l o w i n t h e s o u r c e i n p u t . T h e
modify schema subentry must be terminated with the
END MODIFICATIONS clause. The modification options
can appear in any order in the source input with
some restrictions for the add and delete subschema
subentries. Those subentries that can be repeated
(indicated by ellipsis in the format) can be
repeated any number of times.

The SCHEMA NAME clause identifies the schema being
deleted. This clause is required.
The schema name must be a schema name that already
e x i s t s i n t h e o l d m a s t e r d i r e c t o r y. T h e s c h e m a
name must not duplicate a schema name specified in
the modify schema entry, or in an add schema entry
that precedes this clause in the source input to
DBMSTRD. The same schema name can be specified in
an add schema entry that follows the delete schema
e n t r y.

MODIFY SCHEMA ENTRY
T h e m o d i f y s c h e m a e n t r y i d e n t i fi e s t h e m o d i fi c a
tions to be made to information for a schema that
a l r e a d y e x i s t s i n t h e o l d m a s t e r d i r e c t o r y. O n l y
p e r m a n e n t fi l e i n f o r m a t i o n f o r fi l e s t h a t a r e
a l r e a d y s p e c i fi e d i n t h e o l d m a s t e r d i r e c t o r y f o r
the particular schema and associated areas can be
changed. For example, a permanent file for a quick
r e c o v e r y fi l e c a n n o t b e s p e c i fi e d u n l e s s a q u i c k
r e c o v e r y fi l e i s s p e c i fi e d i n t h e o l d m a s t e r d i r e c
t o r y. L o g g i n g o p t i o n s s e l e c t e d f o r a r e a s c a n b e
changed by u s e o f t h e m o d i f y s c h e m a e n t r y. Ve r
sions can be added and deleted; subschemas can be
added and deleted. The format of the modify schema
entry is shown in figure 8-12.

0$&\.

60485200 A

MODIFY SCHEMA NAME Clause
The MODIFY SCHEMA clause (figure 8-12) identifies
the schema for which information is being modi
fi e d . T h i s c l a u s e i s r e q u i r e d .
The schema name must specify a schema name that
a l r e a d y e x i s t s i n t h e o l d m a s t e r d i r e c t o r y. T h e
name specified here is the same schema name speci
fi e d i n t h e s c h e m a c o m p i l a t i o n . T h e s c h e m a n a m e
must be from 1 through 30 characters in length.
If the FILE NAME clause is omitted, a period must
terminate the SCHEMA NAME clause.

FILE NAME Clause
(Modify Schema Subentry)
T h e F I L E N A M E c l a u s e ( fi g u r e 8 - 1 2 ) s p e c i fi e s t h e
name of the local file containing the schema direc
tory. This clause is required if an ADD SUBSCHEMA
N A M E c l a u s e i s s p e c i fi e d w i t h i n a m o d i f y s c h e m a
entry; otherwise, this clause is optional. When
t h i s c l a u s e i s s p e c i fi e d , i t m u s t i m m e d i a t e l y
follow the MODIFY SCHEMA clause.

8-9

The lfn must be from one through seven characters
in length, must contain only letters and digits,
a n d m u s t b e g i n w i t h a l e t t e r. T h e l f n m u s t b e
unique in the modify run (that is, in the source
i n p u t t o t h e D B M S T R D u t i l i t y ) . T h e fi l e t h a t
contains the schema directory must be attached in
the job stream with this lfn before execution of
the DBMSTRD control statement.
A period must terminate the FILE NAME clause, if it
is spec ifed; otherwise the period must terminate
the MODIFY SCHEMA clause.

END Clause
The END clause is required to terminate the modifi
c a t i o n e n t r y. T h e f o r m a t o f t h e e n d s u b e n t r y i s
s h o w n i n t h e m o d i f y s c h e m a e n t r y f o r m a t ( fi g u r e
8 - 1 2 ) . E i t h e r t h e k e y w o r d M O D I F I C AT I O N S o r t h e
keyword MODS can be specified.
Changes
new CST
built for
directory

to the new master directory, including any
(Condensed Schema/Subschema Table) that is
CDCS, are not placed in the new master
until the END clause is detected.

T h e i n f o r m a t i o n s p e c i fi e d i n t h i s s u b e n t r y r e p l a ce s
t h e i n f o r m a t i o n f o r t h e p r o c e d u r e l i b r a r y fi l e i n
t h e o l d m a s t e r d i r e c t o r y. O n l y t h e p e r m a n e n t fi l e
information that is explicitly included in the
change procedure library subentry is included in
the new master directory after the DBMSTRD run.
The omission of information contained in the old
master directory about any optional clauses
(namely, PW, FAMILY, PACK, DEVICE, SET, or VSN) in
e ff e c t d e l e t e s t h a t i n f o r m a t i o n i n t h e n e w m a s t e r
d i r e c t o r y.
The DBMSTRD utility does not require that the
s c h e m a o r p r o c e d u r e l i b r a r y fi l e b e a v a i l a b l e
during a modification run to change the procedure
l i b r a r y p e r m a n e n t fi l e i n f o r m a t i o n .

Change Transaction Recovery
File Subentry
T h e c h a n g e t r a n s a c t i o n r e c o v e r y fi l e s u b e n t r y
c h a n g e s p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e t r a n s
a c t i o n r e c o v e r y fi l e . T h i s s u b e n t r y i s o p t i o n a l
a n d c a n b e s p e c i fi e d o n l y o n c e w i t h i n a m o d i f y
schema entry. The format of the change transaction
recovery file subentry is shown in figure 8-14.

CHANGE TRANSACTION RECOVERY FILE

Change Procedure Library
Subentry
The change procedure library subentry changes
p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e p r o c e d u r e
l i b r a r y fi l e . T h i s s u b e n t r y i s o p t i o n a l a n d c a n b e
specified only once within a modify schema entry.
The format of the change procedure library subentry
is shown in figure 8-13.

CHANGE PROCEDURE LIBRARY
permanent file information subentry.
Figure 8-13. Change Procedure Library
Subentry Format
The change procedure library subentry can be
s p e c i fi e d o n l y i f i n f o r m a t i o n a b o u t t h e p r o c e d u r e
l i b r a r y fi l e e x i s t s i n t h e o l d m a s t e r d i r e c t o r y .
If this subentry is specified for a schema with no
p r o c e d u r e l i b r a r y i n f o r m a t i o n o r i s s p e c i fi e d m o r e
t h a n o n c e i n t h e m o d i f y s c h e m a e n t r y, a f a t a l
syntax error occurs in the DBMSTRD run.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e p r o c e d u r e
l i b r a r y fi l e m u s t b e s p e c i fi e d a s d e s c r i b e d i n t h e
Permanent File Information Subentry subsection.
T h e c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must not be duplicated in the old master directory
or in the source input to the DBMSTRD utility with
the exception of information being deleted in the
m o d i fi c a t i o n r u n . T h e a d d i t i o n a l p e r m a n e n t fi l e
i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o
a t t a c h t h e p e r m a n e n t fi l e w i t h t h e c o r r e c t p e r
mission.

8-10

Cpermanent file information subentryD
CUNIT LIMIT IS integer-U
CUPDATE LIMIT IS integer-2]
Figure 8-14. Change Transaction
Recovery File Subentry Format
T h e c h a n g e t r a n s a c t i o n r e c o v e r y fi l e s u b e n t r y c a n
b e s p e c i fi e d o n l y i f i n f o r m a t i o n a b o u t t h e t r a n s
a c t i o n r e c o v e r y fi l e f o r t h e s p e c i fi e d s c h e m a
e x i s t s i n t h e o l d m a s t e r d i r e c t o r y. I f t h i s s u b entry is specified for a schema with no transaction
r e c o v e r y fi l e s e l e c t e d o r i s s p e c i fi e d m o r e t h a n
o n c e i n t h e m o d i f y s c h e m a e n t r y, a f a t a l s y n t a x
error occurs in the DBMSTRD run.
Three kinds of information can be changed by use of
this subentry. The information changed depends on
t h e o p t i o n a l c l a u s e s s p e c i fi e d . T h e o p t i o n s
i n c l u d e p e r m a n e n t fi l e i n f o r m a t i o n ( p e r m a n e n t fi l e
information subentry), unit limit (UNIT LIMIT
c l a u s e ) , a n d u p d a t e l i m i t ( U P D AT E L I M I T c l a u s e ) .
E a c h o p t i o n a l c l a u s e c a n b e s p e c i fi e d o n l y o n c e ;
the clauses can be specified in any order. Any one
c l a u s e o r a l l o f t h e c l a u s e s c a n b e s p e c i fi e d i n
t h e s u b e n t r y. T h e s p e c i fi c a t i o n o f a n y o n e o f t h e
clauses does not affect the existing information in
the old master directory associated with any other
optional clause of this subentry; the information
for other clauses is transferred to the new master
d i r e c t o r y.
CHANGE TRANSACTION RECOVERY FILE Clause
The CHANGE TRANSACTION RECOVERY FILE clause is
r e q u i r e d w i t h i n t h e s u b e n t r y. T h i s c l a u s e i d e n t i
fi e s t h e s u b e n t r y.

60485200 A

Permanent File Information Subentry
The permanent file information subentry is required
t o c h a n g e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e
t r a n s a c t i o n r e c o v e r y fi l e . T h e p e r m a n e n t fi l e
i n f o r m a t i o n f o r t h e t r a n s a c t i o n r e c o v e r y fi l e m u s t
b e s p e c i fi e d a s d e s c r i b e d i n t h e P e r m a n e n t F i l e
Information Subentry subsection. The literal that
s p e c i fi e s t h e p e r m a n e n t fi l e n a m e m u s t f o l l o w t h e
rules for permanent file names except that it must
c o n t a i n e x a c t l y s i x c h a r a c t e r s . T h e p e r m a n e n t fi l e
name that CDCS assumes for the transaction recovery
file begins with these six characters; the number I
i s t h e s e v e n t h c h a r a c t e r. T h e c o m b i n a t i o n o f
permanent file information for permanent file name,
UN/ID, and family/set/pack must not be duplicated
in the old master directory or in the source input
to the DBMSTRD utility with the exception of infor
m a t i o n b e i n g d e l e t e d i n t h e m o d i fi c a t i o n r u n . T h e
a d d i t i o n a l p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e
sufficient to enable CDCS to attach the permanent
file with the correct permission.
T h e p e r m a n e n t fi l e i n f o r m a t i o n s p e c i fi e d i n t h e
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y r e p l a c e s t h e
I n f o r m a t i o n f o r t h e t r a n s a c t i o n r e c o v e r y fi l e i n
t h e o l d m a s t e r d i r e c t o r y. O n l y t h e p e r m a n e n t fi l e
information that is explicitly included in the
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y i s i n c l u d e d i n
the new master directory after the DBMSTRD run.
The omission of information for any optional clause
(namely, PW, FAMILY, PACK, DEVICE, SET, or VSN)
t h a t i s i n t h e o l d m a s t e r d i r e c t o r y, i n e f f e c t ,
deletes that information in the new master
d i r e c t o r y.
The DBMSTRD utility does not require that the
s c h e m a o r t r a n s a c t i o n r e c o v e r y fi l e b e a v a i l a b l e
during a modification run to change the permanent
fi l e i n f o r m a t i o n .

UNIT LIMIT Clause
The UNIT LIMIT clause is required to change the
maximum number of outstanding transactions that are
allowed for a schema. The information specified in
this clause replaces the information designating
u n i t l i m i t i n t h e o l d m a s t e r d i r e c t o r y. T h e
i n t e g e r - 1 s p e c i fi e s t h e l i m i t ; i t m u s t b e a p o s i
tive integer with a maximum value of 63. If this
c l a u s e i s n o t s p e c i fi e d i n t h e c h a n g e t r a n s a c t i o n
r e c o v e r y fi l e s u b e n t r y, t h e i n f o r m a t i o n i n t h e o l d
master directory is transferred to the new master
d i r e c t o r y.

UPDATE LIMIT Clause
The UPDATE LIMIT clause is required to change the
maximum number of updates that can be made within a
p a r t i c u l a r t r a n s a c t i o n . T h e i n f o r m a t i o n s p e c i fi e d
in this clause replaces the information designating
u p d a t e l i m i t i n t h e o l d m a s t e r d i r e c t o r y. T h e
integer-2 specifies the maximum number of updates;

it must be a positive integer with a maximum value
o f 6 3 . I f t h i s c l a u s e i s n o t s p e c i fi e d i n t h e
c h a n g e t r a n s a c t i o n r e c o v e r y fi l e s u b e n t r y , t h e
information in the old master directory is trans
ferred to the new master directory.

Change Restart Identifier
File Subentry
T h e c h a n g e r e s t a r t i d e n t i fi e r fi l e s u b e n t r y c h a n g e s
p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e r e s t a r t i d e n t i
fi e r fi l e . T h i s s u b e n t r y i s o p t i o n a l a n d c a n b e
specified only once within a modify schema entry.
T h e f o r m a t o f t h e c h a n g e r e s t a r t i d e n t i fi e r fi l e
subentry is shown in figure 8-15.

CHANGE RESTART IDENTIFIER FILE
permanent file information subentry.
F i g u r e 8 - 1 5 . C h a n g e R e s t a r t I d e n t i fi e r F i l e
Subentry Format
T h e c h a n g e r e s t a r t i d e n t i fi e r fi l e s u b e n t r y c a n b e
s p e c i fi e d o n l y i f i n f o r m a t i o n a b o u t t h e r e s t a r t
i d e n t i fi e r fi l e f o r t h e s p e c i fi e d s c h e m a e x i s t s i n
t h e o l d m a s t e r d i r e c t o r y. I f t h i s s u b e n t r y i s
s p e c i fi e d f o r a s c h e m a w i t h n o r e s t a r t i d e n t i fi e r
file selected or is specified more than once in the
modify schema entry, a fatal syntax error occurs in
the DBMSTRD run.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e r e s t a r t
i d e n t i fi e r fi l e m u s t b e s p e c i fi e d a s d e s c r i b e d i n
the Permanent File Information Subentry subsection.
T h e c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must not be duplicated in the old master directory
or in the source input to the DBMSTRD utility with
the exception of information being deleted in the
m o d i fi c a t i o n r u n . T h e a d d i t i o n a l p e r m a n e n t fi l e
i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o
a t t a c h t h e p e r m a n e n t fi l e w i t h t h e c o r r e c t p e r
mission.
T h e i n f o r m a t i o n s p e c i fi e d i n t h e p e r m a n e n t fi l e
information subentry replaces the information for
t h e r e s t a r t i d e n t i fi e r fi l e i n t h e o l d m a s t e r
d i r e c t o r y . O n l y t h e p e r m a n e n t fi l e i n f o r m a t i o n
that is explicitly included in this subentry is
included in the new master directory after the
DBMSTRD run. The omission of information for any
optional clause (namely, PW, FAMILY, PACK, DEVICE,
S E T, o r V S N ) t h a t i s i n t h e o l d m a s t e r d i r e c t o r y,
in effect, deletes that information in the new
m a s t e r d i r e c t o r y.
The DBMSTRD utility does not require that the
s c h e m a o r r e s t a r t i d e n t i fi e r fi l e b e a v a i l a b l e
during a modification run to change the permanent
fi l e i n f o r m a t i o n .

/$SKv

60485200 A

8-11

Change Journal Log File
Subentry

Change Quick Recovery File
Subentry

The change journal log file subentry changes perma
n e n t fi l e i n f o r m a t i o n f o r t h e j o u r n a l l o g fi l e .
This subentry is optional and can be specified only
once within a modify schema entry. The format of
t h e c h a n g e j o u r n a l l o g fi l e s u b e n t r y i s s h o w n i n
figure 8-16.

T h e c h a n g e q u i c k r e c o v e r y fi l e s u b e n t r y c h a n g e s
p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e q u i c k r e c o v e r y
fi l e . T h i s s u b e n t r y i s o p t i o n a l a n d c a n b e s p e c i
fi e d o n l y o n c e w i t h i n a m o d i f y s c h e m a e n t r y. T h e
f o r m a t o f t h e c h a n g e q u i c k r e c o v e r y fi l e s u b e n t r y
is shown in figure 8-17.

CHANGE JOURNAL LOG FILE
permanent file information subentry.
Figure 8-16. Change Journal Log File
Subentry Format
The change journal log file subentry can be speci
fi e d o n l y i f i n f o r m a t i o n a b o u t t h e j o u r n a l l o g fi l e
f o r t h e s p e c i fi e d s c h e m a e x i s t s i n t h e o l d m a s t e r
d i r e c t o r y . I f t h i s s u b e n t r y i s s p e c i fi e d f o r a
s c h e m a w i t h n o j o u r n a l l o g fi l e s e l e c t e d o r i s
s p e c i fi e d m o r e t h a n o n c e i n t h e m o d i f y s c h e m a
entry, a fatal syntax error occurs in the DBMSTRD
run.
T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e j o u r n a l l o g
file must be specified as described in the Perma
nent File Information Subentry subsection. The
literal that specifies the permanent file name must
f o l l o w t h e r u l e s f o r p e r m a n e n t fi l e n a m e s e x c e p t
that it must contain exactly six characters. The
p e r m a n e n t fi l e n a m e t h a t C D C S a s s u m e s f o r t h e
j o u r n a l l o g fi l e s b e g i n s w i t h t h e s e s i x c h a r
acters. For one file, the number 1 is the seventh
c h a r a c t e r ; f o r t h e o t h e r fi l e , t h e n u m b e r 2 i s t h e
s e v e n t h c h a r a c t e r. T h e c o m b i n a t i o n o f p e r m a n e n t
fi l e i n f o r m a t i o n f o r p e r m a n e n t fi l e n a m e , U N / I D ,
and family/set/pack must not be duplicated in the
old master directory or in the source input to the
DBMSTRD utility with the exception of information
b e i n g d e l e t e d i n t h e m o d i fi c a t i o n r u n . T h e a d d i
t i o n a l p e r m a n e n t fi l e i n f o r m a t i o n m u s t b e s u f fi
cient to enable CDCS to attach the permanent file
with the correct permission.
The information specified in this subentry replaces
t h e i n f o r m a t i o n f o r t h e j o u r n a l l o g fi l e i n t h e o l d
m a s t e r d i r e c t o r y. O n l y t h e p e r m a n e n t fi l e i n f o r m a
tion that is explicitly included in this subentry
is included in the new master directory after the
DBMSTRD run. The omission of information for any
optional clause (namely, PW, FAMILY, PACK, DEVICE,
S E T, o r V S N ) t h a t i s i n t h e o l d m a s t e r d i r e c t o r y,
in effect, deletes that information in the new
m a s t e r d i r e c t o r y.
The DBMSTRD utility does not require that the
s c h e m a o r j o u r n a l l o g fi l e b e a v a i l a b l e d u r i n g a
m o d i fi c a t i o n r u n t o c h a n g e t h e p e r m a n e n t fi l e
information.

8-12

CHANGE QUICK RECOVERY FILE
permanent file information subentry.
Figure 8-17. Change Quick Recovery File
Subentry Format
T h e c h a n g e q u i c k r e c o v e r y fi l e s u b e n t r y c a n b e
s p e c i fi e d o n l y i f i n f o r m a t i o n a b o u t t h e q u i c k
r e c o v e r y fi l e f o r t h e s p e c i fi e d s c h e m a e x i s t s i n
t h e o l d m a s t e r d i r e c t o r y. I f t h i s s u b e n t r y i s
specified for a schema with no quick recovery file
s e l e c t e d o r i s s p e c i fi e d m o r e t h a n o n c e i n t h e
modify schema entry, a fatal syntax error occurs in
the DBMSTRD run.

/C^^K

T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e q u i c k
recovery file must be specified as described in the
Permanent File Information Subentry subsection.
T h e c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must not be duplicated in the old master directory
or in the source input to the DBMSTRD utility with
the exception of information being deleted in the
m o d i fi c a t i o n r u n . T h e a d d i t i o n a l p e r m a n e n t fi l e
i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o
a t t a c h t h e p e r m a n e n t fi l e w i t h t h e c o r r e c t p e r
mission.
T h e i n f o r m a t i o n s p e c i fi e d i n t h i s s u b e n t r y re p l a ce s
t h e i n f o r m a t i o n f o r t h e q u i c k r e c o v e r y fi l e i n t h e
o l d m a s t e r d i r e c t o r y . O n l y t h e p e r m a n e n t fi l e
information that is explicitly included in this
subentry is included in the new master directory
after the DBMSTRD run. The omission of information
for any optional clause (namely, PW, FAMILY, PACK,
D E V I C E , S E T, o r V S N ) t h a t i s i n t h e o l d m a s t e r
d i r e c t o r y, i n e f f e c t , d e l e t e s t h a t i n f o r m a t i o n i n
the new master directory.
The DBMSTRD utility does not require that the
schema or quick recovery file be available during a
m o d i fi c a t i o n r u n t o c h a n g e t h e p e r m a n e n t fi l e
information.

Change Job Control Information Subentry
The change job control information subentry changes
job control information for the CDCS-initiated job
t h a t d u m p s t h e j o u r n a l l o g fi l e . T h i s s u b e n t r y i s
o p t i o n a l a n d c a n b e s p e c i fi e d o n l y o n c e w i t h i n a
modify schema entry. The format of the change job
c o n t r o l i n f o r m a t i o n s u b e n t r y i s s h o w n i n fi g u r e
8-18.

60485200 A

/•fiBK

J00^\

The clauses that are applicable depend on the
operating system. All clauses are applicable for
use on NOS. Only the TAPE and CHARGE/ACCOUNT
clauses are applicable for use on NOS/BE. For the
description of the information provided by these
c l a u s e s a n d f o r t h e a p p l i c a b i l i t y o f c lauses to the
operating system, refer to the JOB CONTROL INFOR
M AT I O N C l a u s e s u b s e c t i o n t h a t a p p e a r s e a r l i e r i n
this section.

CHANGE JOB CONTROL INFORMATION
TYPE IS
TAPE
DENSITY IS / 4ts-

Change Area Subentry

CUN IS literal-i:
CPW IS literal-23
CFAMILY NAME IS family-namel
ACCOUNT
)1S Literal-3l
[( ACCOUNT
.
[\ CHARGE [
Figure 8-18. Change Job Control Information
Subentry Format
T h i s s u b e n t r y c a n b e s p e c i fi e d o n l y i f j o b c o n t r o l
information already exists for the specified schema
I n t h e o l d m a s t e r d i r e c t o r y. I f t h i s s u b e n t r y i s
s p e c i fi e d f o r a s c h e m a w i t h n o j o b c o n t r o l i n f o r
mation specified or is specified more than once in
t h e m o d i f y s c h e m a e n t r y, a f a t a l s y n t a x e r r o r
occurs in the DBMSTRD run.
The information provided by use of this subentry
replaces information in the old master directory.
The information changed depends on the optional
c l a u s e s s p e c i fi e d i n t h e e n t r y . E a c h o p t i o n a l
c l a u s e c a n b e s p e c i fi e d o n c e . A n y o n e o r a l l o f
the clauses can be specified. Only the information
that is explicitly included in the optional clauses
is included in the new master directory after the
DBMSTRD run. The omission of a clause In effect
deletes that information in the new master
d i r e c t o r y.

The change area subentry in the modify schema entry
changes logging options selected for the area and
changes permanent file information for an area and
i n d e x fi l e . T h e V E R S I O N c l a u s e o f t h e s u b e n t r y
I d e n t i fi e s t h e v e r s i o n a ff e c t e d b y t h e c h a n g e a r e a
s u b e n t r y. T h e i n f o r m a t i o n s p e c i fi e d i n t h e c h a n g e
area subentry replaces the information for the
indicated version and area in the old master direc
t o r y. T h e f o r m a t o f t h e c h a n g e a r e a s u b e n t r y i s
shown in figure 8-19.
The change area subentry can be specified only if
information about the version and area is included
i n t h e o l d m a s t e r d i r e c t o r y. T h e i n f o r m a t i o n c a n
be explicit or implicit. Explicit information is
included because the information was provided in an
a r e a s u b e n t r y. I m p l i c i t i n f o r m a t i o n i s i n c l u d e d
b e c a u s e a r e a i n f o r m a t i o n w a s e i t h e r s p e c i fi e d o r
assumed to be the same as master.
The combination of version name and area name
s p e c i fi e d i n t h e c h a n g e a r e a s u b e n t r y c a n n o t b e
duplicated in another change area subentry in
source Input to DBMSTRD. If a change area subentry
s p e c i fi e s a c h a n g e i n p e r m a n e n t fi l e i n f o r m a t i o n
f o r a n a r e a o r v e r s i o n t h a t i s n o t i n cluded in the
o l d m a s t e r d i r e c t o r y, a f a t a l s y n t a x e r r o r o c c u r s
in the DBMSTRD run.
The change area subentry cannot be used to change
the area name in the old master directory; this
t y p e o f c h a n g e r e q u i r e s m o d i fi c a t i o n t o a D D L
schema.

CHANGE AREA NAME IS area-name

T VERSION NAME IS I MASTER \ 1
1 version-name J 1

CSAME AS MASTER]
permanent file information subentry

BEFORE IMAGE RECORDS [$^"1
LOG

AFTER IMAGE RECORDS \?^-]

LHL J

BEFORE IMAGE BLOCKS \¥^\
LON J
INDEX FILE ASSIGNED
permanent file information s ubentry
Figure 8-19. Change Area Subentry Format

60485200 A

8-13

T h e c h a n g e a r e a s u b e n t r y a l l o w s t h e s p e c i fi c a t i o n
of area information to be the SAME AS MASTER or to
b e d i f f e r e n t f r o m m a s t e r. I f t h e i n f o r m a t i o n i s
different, any or all of the following options can
be specified to change area information: permanent
fi l e i n f o r m a t i o n f o r t h e a r e a fi l e ( p e r m a n e n t fi l e
s u b e n t r y f o r a r e a fi l e ) , p e r m a n e n t fi l e i n f o r m a t i o n
for the index file (INDEX clause), and logging for
the area (LOG clause). If the above options are
n o t s p e c i fi e d , t h e i n f o r m a t i o n p e r t a i n i n g t o t h e
area in the old master directory is retained in the
new master directory.
The change area subentry does not affect the area
i d e n t i fi c a t i o n t h a t i s a s s i g n e d b y t h e D B M S T R D
utility and listed in the second section of the
DBMSTRD output. An area retains the identification
number assigned when the area was previously speci
fied for inclusion in the old master directory.
The DBMSTRD utility does not require that the
schema or area and index files be available during
a modification run to change area or index perma
nent file information or logging options.
CHANGE AREA Clause
The CHANGE AREA clause (figure 8-19) is required
w i t h i n t h e c h a n g e a r e a s u b e n t r y. T h e a r e a n a m e
identifies the area being changed. The area name
must be an area specified in the old master direc
tory for the schema. An area name must be 1 through
30 characters in length.

T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e a r e a d a t a
file must be specified as described in the Perma
nent File Information Subentry subsection. The
c o m b i n a t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r
p e r m a n e n t fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k
must not be duplicated in the old master directory
or in the source input to the DBMSTRD utility with
the exception of information being deleted in the
m o d i fi c a t i o n r u n . T h e a d d i t i o n a l p e r m a n e n t fi l e
i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o
a t t a c h t h e p e r m a n e n t fi l e w i t h t h e c o r r e c t p e r
mission.

O n l y t h e p e r m a n e n t fi l e i n f o r m a t i o n t h a t i s e x p l i
citly included in the subentry is included in the
new master directory after the DBMSTRD run. The
omission of information for any optional clause
(namely, PW, FAMILY, PACK, DEVICE, SET, or VSN)
t h a t i s i n t h e o l d m a s t e r d i r e c t o r y, i n e f f e c t ,
deletes that information in the new master
d i r e c t o r y.
T h e s p e c i fi c a t i o n o f t h i s c l a u s e h a s n o e ff e c t o n
information associated with the LOG clause or INDEX
clause.

LOG Clause (Change Area Subentry)
T h e L O G c l a u s e ( fi g u r e 8 - 1 9 ) c a n c a n c e l l o g g i n g
options selected in the old master directory and
select new logging options. This clause is op
tional.

VERSION NAME Clause (Change Area Subentry)
The VERSION NAME clause (figure 8-19) specifies the
name of the version that is associated with the
area. This clause is optional. If this clause is
not specified, version name MASTER is assumed.
The version name must already be specified In the
o l d m a s t e r d i r e c t o r y. T h e r e s t r i c t i o n s i n s p e c i f y
ing a particular version name and associated area
name are described in preceding paragraphs. The
version name must not be duplicated in an add
version subentry or in a delete version subentry.
SAME AS MASTER Clause (Change Area Subentry)
The SAME AS MASTER clause (figure 8-19) replaces
all existing information for the area of the indi
cated version with t h e i n f o r m a t i o n a s s o c i a t e d w i t h
the same area for version MASTER. This clause is
optional.
I f t h i s c l a u s e i s s p e c i fi e d , t h e f o l l o w i n g o p t i o n s
c a n n o t b e s p e c i fi e d : p e r m a n e n t fi l e i n f o r m a t i o n
subentry, LOG clause, and INDEX clause.
Permanent File Information Subentry
(Change Area SubentryJ
The first permanent file information subentry shown
i n t h e f o r m a t ( fi g u r e 8 - 1 9 ) c a u s e s t h e e x i s t i n g
p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e a r e a fi l e t o b e
r e p l a c e d w i t h t h e i n f o r m a t i o n s p e c i fi e d i n t h e
s u b e n t r y. T h i s s u b e n t r y i s o p t i o n a l .

8-14

The LOG clause specifies the types of logging to be
performed for the area. Any combination of options
can be selected. The BEFORE IMAGE RECORDS option
selects logging of before-image records to a
j o u r n a l l o g fi l e . ( A b e f o r e - i m a g e r e c o r d i s a c o p y
o f a r e c o r d b e f o r e i t s m o d i fi c a t i o n . ) T h e A F T E R
IMAGE RECORDS option specifies logging of after
i m a g e r e c o r d s t o a j o u r n a l l o g fi l e . ( A n a f t e r
image record is a copy of a record after its
m o d i fi c a t i o n . ) T h e B E F O R E I M A G E B L O C K S o p t i o n
s e l e c t s b l o c k l o g g i n g t o a q u i c k r e c o v e r y fi l e .
Refer to section 9 for details on the journal log
fi l e , t h e q u i c k r e c o v e r y fi l e , a n d t h e l o g g i n g
options that must be selected for different re
covery capabilities.
To cancel the LOG options selected for an area in
the old master directory, the keyword OFF must be
s p e c i fi e d f o r t h e s a m e o p t i o n i n t h e s o u r c e i n p u t
to DBMSTRD.
To select new logging options, the option must be
s p e c i fi e d . T h e k e y w o r d O N d o e s n o t h a v e t o b e
specified but can be for documentation purposes.
If no LOG options are specified in a change area
subentry, the logging requirements specified in the
old master directory remain in effect. The speci
fication of the LOG clause has no effect on infor
mation associated with the INDEX clause or with the
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y f o r t h e a r e a
fi l e .

60485200 A

i*^*fe\

INDEX Clause (Change Area Subentry)

Add Version Subentry

The INDEX clause (figure 8-19) causes the existing
p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e i n d e x fi l e t o b e
r e p l a c e d w i t h t h e i n f o r m a t i o n s p e c i fi e d i n t h e
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y. T h i s c l a u s e
is optional.

The add version subentry designates the name of an
alternate data base version to be added to a data
base. This subentry also associates each area of
the schema with logging requirements and either a
p e r m a n e n t fi l e o r t w o p e r m a n e n t fi l e s i f a n i n d e x
fi l e i s r e q u i r e d f o r t h e a r e a . T h e f o r m a t o f t h e
add version subentry is shown In figure 8-21.

T h e p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e i n d e x fi l e
m u s t b e s p e c i fi e d a s d e s c r i b e d i n t h e P e r m a n e n t
File Information Subentry subsection. The combina
t i o n o f p e r m a n e n t fi l e i n f o r m a t i o n f o r p e r m a n e n t
fi l e n a m e , U N / I D , a n d f a m i l y / s e t / p a c k m u s t n o t b e
duplicated in the old master directory or in the
source input to the DBMSTRD utility with the
exception of information being deleted in the
m o d i fi c a t i o n r u n . T h e a d d i t i o n a l p e r m a n e n t fi l e
i n f o r m a t i o n m u s t b e s u f fi c i e n t t o e n a b l e C D C S t o
a t t a c h t h e p e r m a n e n t fi l e w i t h t h e c o r r e c t p e r
mission.
O n l y t h e p e r m a n e n t fi l e i n f o r m a t i o n t h a t i s e x p l i
citly included in the INDEX clause and in the
p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y i s i n c l u d e d i n
the new master directory after the DBMSTRD run.
The omission of information for any optional clause
(namely, PW, FAMILY, PACK, DEVICE, SET, or VSN)
t h a t i s i n t h e o l d m a s t e r d i r e c t o r y, i n e f f e c t ,
deletes that information in the new master
d i r e c t o r y.
T h e s p e c i fi c a t i o n o f t h i s c l a u s e h a s n o e f f e c t o n
i n f o r m a t i o n a s s o c i a t e d w i t h t h e p e r m a n e n t fi l e
information subentry or with the LOG clause.

A version name specified in this subentry must not
be associated with the same schema in the old
master directory or in the source input to DBMSTRD
with one exception: the version name can appear in
a p r e c e d i n g d e l e t e v e r s i o n s u b e n t r y. T h e v e r s i o n
name MASTER cannot be added.
The add version subentry is the same as the alter
nate version subentry with one exception: the
keyword ADD precedes the keywords VERSION NAME IS.
Therefore, the description of the alternate version
subentry applies to this subentry with the excep
tion of the restriction on version name described
in the preceding paragraph. Refer to the subsec
t i o n A l t e r n a t e Ve r s i o n S u b e n t r y f o r t h e d e s c r i p t i o n
of the clauses.

Delete Subschema Subentry
The delete subschema subentry specifies a subschema
t o b e d e l e t e d f r o m t h e m a s t e r d i r e c t o r y. T h e
format of the delete subschema subentry is shown in
fi g u r e 8 - 2 2 .
DELETE SUBSCHEMA NAME IS subschema-name.

Delete Version Subentry
The delete version subentry specifies the name of a
v e r s i o n t o b e d e l e t e d f r o m t h e m a s t e r d i r e c t o r y.
A l l a r e a i n fo r m a t i o n a s s o c i a t e d w i t h t h e v e r s i o n i s
also deleted. The format of the delete version
subentry is shown in figure 8-20.

DELETE VERSION NAME IS version-name.

Figure 8-22. Delete Subschema Subentry Format
The DELETE SUBSCHEMA clause identifies the sub
schema being deleted. This clause is required
w i t h i n t h e s u b e n t r y.
The subschema name must specify a subschema that is
already included in the old master directory.

Figure 8-20. Delete Version Subentry Format

Add Subschema Subentry
The DELETE VERSION clause identifies the version
being deleted. This clause is required within the
s u b e n t r y.

The add subschema subentry specifies a subschema to
be added to a data base. The format of the add
subschema subentry is shown in figure 8-23.

The version name must specify an alternate version
that already exists in the old master directory;
v e r s i o n M A S T E R c a n n o t b e s p e c i fi e d . T h e v e r s i o n
name must not duplicate a version name specified in
a change area subentry or in a preceding add ver
s i o n s u b e n t r y. T h e v e r s i o n n a m e c a n b e s p e c i fi e d
in a following add version subentry.

ADD SUBSCHEMA NAME IS subschema-name
FILE NAME IS lfn.
Figure 8-23. Add Subschema Subentry Format

ADD VERSION NAME IS version-name
j< {11. AREA
}
NAME IS area-name
i
SAME AS MASTER
( II area subentry

•II...}

Figure 8-21. Add Version Subentry Format

60485200 A

8-15

The ADD SUBSCHEMA NAME clause identifies the sub
schema being added. This clause is required.
The subschema name must not duplicate a subschema
name already associated with the same schema in the
old master directory unless the same subschema is
being deleted in a preceding delete subschema
subentry. The subschema name must be the same
subschema name specified in the subschema directory
and listed on the subschema compilation output
listing. A subschema name must be from 1 through
30 characters in length.
The FILE NAME clause specifies the local file name
(lfn) of the subschema directory or the subschema
l i b r a r y. T h i s c l a u s e i s r e q u i r e d .

I=lfn-1

j*Z$®$?K

T h e s p e c i fi e d fi l e n a m e i d e n t i fi e s t h e
l o c a l fi l e t h a t c o n t a i n s t h e s o u r c e i n p u t
f o r t h e u t i l i t y.

I-O
Not allowed.
T h e L p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
receives listings and diagnostics generated by the
u t i l i t y. T h e L p a r a m e t e r i s i n t e r p r e t e d a s f o l l o w s :
omitted
Local file OUTPUT receives the listings and
d i a g n o s t i c s g e n e r a t e d b y t h e u t i l i t y.

The lfn can be from one through seven characters in
length, must contain only letters and digits, and
m u s t b e g i n w i t h a l e t t e r . T h e fi l e t h a t c o n t a i n s
the subschema directory or subschema library must
be attached in the job stream with this lfn before
the execution of the DBMSTRD control statement.

Local file OUTPUT receives the listings and
d i a g n o s t i c s g e n e r a t e d b y t h e u t i l i t y.
L=lfn-2

MASTER DIRECTORY GENERATION
The master directory is generated by the DBMSTRD
u t i l i t y, w h i c h i s c a l l e d b y t h e D B M S T R D c o n t r o l
statement. The DBMSTRD utility generates a master
directory under two different conditions: a crea
tion run and a modification run.

DBMSTRD CONTROL STATEMENT
The DBMSTRD control statement is used to request
t h e c r e a t i o n o r m o d i fi c a t i o n o f a m a s t e r d i r e c t o r y
a n d t o p r o v i d e t h e D B M S T R D u t i l i t y w i t h t h e fi l e
names needed in the run.
The format of the DBMSTRD control statement is
s h o w n i n fi g u r e 8 - 2 4 . O p t i o n a l l y , t h e c o m m a
immediately following DBMSTRD can be replaced by a
left parenthesis; the terminating period can be
replaced by a right parenthesis.

T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e fi l e t h a t r e c e i v e s t h e l i s t i n g s a n d
d i a g n o s t i c s g e n e r a t e d b y t h e u t i l i t y.

L=0
Local file OUTPUT receives only warning and
error messages. A listing is not produced.
The LD parameter controls generation of the master
directory contents report that is produced at the
end of the run. This parameter is interpreted as
follows:
omitted
No master directory contents report is
generated.

LD
The master directory contents report Is
w r i t t e n t o t h e fi l e s p e c i fi e d b y t h e L
parameter.

All parameters of the control statement are op
tional. The parameters can appear in any order.
T h e I p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s t h e s o u r c e i n p u t f o r t h e u t i l i t y. T h e I
parameter is interpreted as follows:
omitted

T h e O M D p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s t h e o l d ( e x i s t i n g ) m a s t e r d i r e c t o r y. T h e
OMD parameter is interpreted as follows:
omitted

Local file INPUT is assumed to contain the
s o u r c e i n p u t f o r t h e u t i l i t y.

Local file OMSTRDR is assumed to contain
the old master directory.

OMD
L o c a l fi l e C O M P I L E i s a s s u m e d t o c o n t a i n
t h e s o u r c e i n p u t f o r t h e u t i l i t y.

Local file OMSTRDR is assumed to contain
the old master directory.

DE«STRDC,I=lfn-ljC,L=lfa-2]C,LD:C,0MD=lfn-3jC,NMD=lfn-4j.
Figure 8-24. DBMSTRD Utility Control Statement

8-16

60485200 A

0MD=lfn-3
T h e s p e c i fi e d fi l e n a m e i d e n t i fi e s t h e
l o c a l fi l e t h a t c o n t a i n s t h e o l d m a s t e r
d i r e c t o r y.
T h e N M D p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
contains the master directory generated by the
current run (the new master directory). The NMD
parameter is interpreted as follows:
omitted
Local file NMSTRDR is assumed to contain
the new master directory.

NMD
Local file NMSTRDR is assumed to contain
the new master directory.
NMD=lfn-4
T h e s p e c i fi e d fi l e n a m e i d e n t i fi e s t h e
l o c a l fi l e t h a t c o n t a i n s t h e n e w m a s t e r
d i r e c t o r y.

CREATION RUN
To c r e a t e t h e m a s t e r d i r e c t o r y, t h e s c h e m a d i r e c
tories and the subschema directories of any schema
and subschema specified in the source input for the
master directory must be available to the DBMSTRD
u t i l i t y. T h e fi l e c o n t a i n i n g t h e s c h e m a d i r e c t o r y
must be attached in the job stream by the local
fi l e n a m e s p e c i fi e d I n t h e c r e a t i o n e n t r y o f t h e
s o u r c e i n p u t . S i m i l a r l y, t h e fi l e c o n t a i n i n g t h e
s u b s c h e m a l i b r a r y o r t h e p a r t i c u l a r fi l e s t h a t
contain the subschema directories must be attached
in the job stream with the local file names speci
fied in the creation entry of source input.
The DBMSTRD control statement must be included in
the set of control statements to generate the
m a s t e r d i r e c t o r y. I t p r o v i d e s t h e D B M S T R D u t i l i t y
w i t h t h e l o c a l fi l e n a m e o f t h e s o u r c e i n p u t fi l e
a n d t h e l o c a l fi l e n a m e o f t h e m a s t e r d i r e c t o r y
that is generated. The DBMSTRD control statement
for master directory creation is as follows:
DBMSTRD,LD,NMD=1fn.
The LD parameter and the NMD parameter are optional
and have default values. The I and L parameters
m u s t b e s p e c i fi e d i f d e f a u l t v a l u e s a r e n o t a p p l i
c a b l e f o r i n p u t a n d o u t p u t fi l e s ( r e f e r t o t h e
DBMSTRD Control Statement subsection).
The data administrator is responsible for ensuring
t h a t t h e m a s t e r d i r e c t o r y fi l e g e n e r a t e d b y t h e
D B M S T R D u t i l i t y a n d c o n t a i n e d i n t h e fi l e i d e n t i
fied by the NMD parameter is made permanent. For
u s e o f t h e m a s t e r d i r e c t o r y fi l e u n d e r N O S , t h e
permanent file usually has to be made accessible to
the user number under which CDCS or some other job
that attaches the master directory executes. The
file can be made accessible to other user numbers
by execution of the PERMIT control statement. For
example, if the user number of the CDCS job is not
t h e o w n e r o f t h e m a s t e r d i r e c t o r y fi l e , e i t h e r t h e
PERMIT control statement designating access to that
user number must be executed or the master direc
tory file must be made a public file (CT=PU).

60485200 A

MODIFICATION RUN
To modify the master directory, the existing master
d i r e c t o r y t o b e m o d i fi e d ( c a l l e d t h e o l d m a s t e r
directory) must be made available to the DBMSTRD
u t i l i t y. T h e r e f o r e , t h e o l d m a s t e r d i r e c t o r y m u s t
be attached (read permission is required) in the
j o b s t r e a m w i t h t h e l o c a l fi l e n a m e s p e c i fi e d b y
the OMD parameter of the DBMSTRD control state
m e n t . T h e fi l e c o n t a i n i n g t h e s c h e m a d i r e c t o r y
must be available to the DBMSTRD utility if a
schema is being added to the master directory or if
a schema is being modified by having subschemas
a d d e d . S i m i l a r l y , t h e fi l e s c o n t a i n i n g t h e s u b
schema directories must be available to the DBMSTRD
utility if subschemas are being added to the master
directory either through an add schemas entry or
t h r o u g h a m o d i f y s c h e m a s e n t r y. I f t h e s c h e m a
directory is needed, the file containing the schema
directory must be attached in the job stream by the
l o c a l fi l e n a m e s p e c i fi e d i n t h e s o u r c e i n p u t . I f
t h e s u b s c h e m a d i r e c t o r y i s n e e d e d , t h e fi l e c o n
taining the subschema library or the subschema
directory must be attached in the job stream by the
local file name specified in the source input.
The DBMSTRD control statement provides the DBMSTRD
u t i l i t y w i t h t h e l o c a l fi l e n a m e o f t h e e x i s t i n g
m a s t e r d i r e c t o r y b e i n g m o d i fi e d ( t h e o l d m a s t e r
d i r e c t o r y ) , t h e l o c a l fi l e n a m e o f t h e s o u r c e i n p u t
fi l e , a n d t h e l o c a l fi l e n a m e o f t h e m a s t e r d i r e c
tory that is generated (the new master directory).
The DBMSTRD control statement for master directory
creation is as follows:
DBMSTRD,LD,0MD=1fn,NMD=1fn.
The LD parameter, the OMD parameter, and the NMD
parameter are optional and have default values.
The I and L parameters must be specified if default
values are not applicable for input and output
files (refer to the DBMSTRD control statement sub
section).
The data administrator must ensure that the master
directory file generated by the DBMSTRD utility and
contained In the file identified by the NMD param
eter is made permanent. For use of the master
d i r e c t o r y fi l e u n d e r N O S , t h e p e r m a n e n t fi l e
usually has to be made accessible to the user
number under which CDCS or some other job that
a t t a c h e s t h e m a s t e r d i r e c t o r y e x e c u t e s . T h e fi l e
can be made accessible to other user numbers by
execution of the PERMIT control statement. For
example, if the user number of the CDCS job is not
t h e o w n e r o f t h e m a s t e r d i r e c t o r y fi l e , e i t h e r t h e
PERMIT control statement designating access to that
user number must be executed or the master direc
tory file must be made a public file (CT=PU).

DBMSTRD OUTPUT
Output from the DBMSTRD utility is in two sec
t i o n s . T h e fi r s t s e c t i o n c o n s i s t s o f a l i s t i n g o f
t h e i n p u t fi l e w i t h a n y s y n t a x e r r o r s i d e n t i fi e d
and statistics about the CST (Condensed Schema/SubSchema Table) for each subschema for which informa
tion is added in the run. The second section,
called the master directory contents report, lists
the schemas, versions, areas, relations, and
subschemas for which information exists in the

8-17

master directory; the checksum values for the
areas, relations, and subschemas; and statistical
information about the master directory. The second
section appears only if the LD option was specified
in the DBMSTRD utility control statement.
The syntax listing and CST statistics section
indicates each card image read preceded by a
s e q u e n c e n u m b e r. S y n t a x e r r o r m e s s a g e s i n t h e
listing refer to the sequence number of the line on
which the error occurred. CST statistics appear at
the end of the section for each schema.
The CST statistics can help the data administrator
e s t i m a t e t h e fi e l d l e n g t h r e q u i r e d b y C D C S t o
service applications programs using a particular
combination of schema and subschema. The number of
words required in the CST for each portion of
statistical information can indicate the CDCS
memory overhead for use of various features and can
help the data administrator determine ways to
decrease memory requirements. The area, con
straint, record, and relation entries increase in
size when an increase occurs in the number and/or
complexity of areas/realms, constraints, records,
a n d r e l a t i o n s d e fi n e d i n t h e s c h e m a o r t h e s u b
schema.
Within the CST statistics, a lock entry refers to
a c c e s s c o n t r o l l o c k s o r p r o c e d u r e s d e fi n e d i n t h e
schema. A procedure entry is included for each
occurrence of a data base procedure at the area or
record level. Area capsule entries indicate the
size of the mapping capsules required for mapping
of keys or relation data names. Record capsule
entries indicate the size of the mapping capsules
required for mapping of record items. No statis
tics are given for data base procedure capsules
s i n c e t h e y a r e n o t p a r t o f t h e C S T. F i g u r e 8 - 2 5
s h o w s a s a m p l e o f t h e fi r s t s e c t i o n o f D B M S T R D
output for a creation run.
The optional second section, the master directory
contents report, consists of one entry for each
schema for which information is contained in the
m a s t e r d i r e c t o r y. T h e f o l l o w i n g i n f o r m a t i o n i s
given:
S c h e m a n a m e a n d i d e n t i fi c a t i o n a s s i g n e d b y
DBMSTRD.
Version name MASTER.

Names of all areas in the schema, along with
the identifications assigned by DBMSTRD and the
area checksums assigned by DDL.
Names of additional versions with every version
name followed by area information. The area
information is the same as indicated in the
item above and is listed only for those areas
t h a t h a v e u n i q u e p e r m a n e n t fi l e s f o r t h a t
version.
Names of all relations in the schema and the
relation checksums assigned by DDL.
Names of all subschemas for the schema and the
subschema checksums assigned by DDL.
Number of words used for all master directory
information.
The area, relation, and subschema checksums listed
In the DBMSTRD output can be used in conjunction
with DDL output listings to determine which sub
schemas and application programs must be recompiled
as a result of the recompilation of a schema. A
checksum is a one-word attribute generated by the
DDL compiler for each area and relation in the
schema and for each subschema. When a schema for
which information exists in the master directory is
recompiled, the data administrator should compare
the area and relation checksums in the version of
the schema that is already in the master directory
with the checksums of the newly compiled schema.
If the checksums do not agree, all subschemas
referencing the elements with changed checksum
values must be recompiled. (The DDL3 and DDLF
compilers can be used to determine if subschemas in
a subschema library need recompilation; refer to
sections 3 and 4 for more information.) Before an
applications program using a subschema is executed,
the checksum of the subschema used to compile the
program should be compared with the subschema
checksum recorded in the master directory to verify
that the program is consistent with the subschema
it references. In addition, when a schema or
subschema has been recompiled many times, the
checksums listed in the DBMSTRD output can be used
to determine which version of the schema or sub
schema is currently being used.
Figure 8-26 shows the master directory contents
report generated by the DBMSTRD utility during a
creation run.

DBMSTRD SOURCE LISTING NMD LFN=MSTRDIR OMD LFN=OMSTRDR DBMSTRD V2.3(82061)
SCHEMA NAME IS MANUFACTURING-DB
FILE NAME IS MANUFAC
PROCEDURE LIBRARY
PFN IS "DB1PLIB" UN IS "CDCS23"
TRANSACTION RECOVERY FILE
PFN IS "DB1TRF" UN IS "CDCS23"
UNIT LIMIT IS 50
UPDATE LIMIT IS 15
Figure 8-25. Sample First Section of DBMSTRD Output (Sheet 1 of 3)

8-18

*f?^\

60485200 A

>f^^^\

/C^Sjv

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

RESTART IDENTIFIER FILE
PFN IS "DB1RIF" UN IS "CDCS23"
JOURNAL LOG FILE
PFN IS "DB1JLF" UN IS "CDCS23"
QUICK RECOVERY FILE
PFN IS "DB1QRF" UN IS "CDCS23"
JOB CONTROL INFORMATION
TAPE TYPE IS NT
DENSITY IS PE
UN IS "CDCS23"
CHARGE IS "1982CHG".
VERSION NAME IS MASTER
AREA NAME IS EMPLOYEE
PFN IS "MEMPL" UN IS "CDCS23"
PW IS "0KCDCS2"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXEMPL" UN IS "CDCS23".
AREA NAME IS JOBDETAIL
PFN IS "MJOBD" UN IS "CDCS23"
PW IS "0KCDCS2"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS.
AREA NAME IS DEPARTMENTS
PFN IS "MDEPT" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
INDEX FILE ASSIGNED
PFN "MXDEPT" UN IS "CDCS23".
AREA NAME IS PROJECT
PFN IS "HPROJ" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXPROJ" UN IS "CDCS23".
AREA NAME IS DEVELOPMENT-PRODUCTS
PFN IS "MDEVE" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
INDEX FILE ASSIGNED
PFN IS "MXDEVE" UN IS "CDCS23".
AREA IS TESTS
PFN IS "MTEST" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
BEFORE IMAGE RECORDS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXTEST" UN IS "CDCS23".
AREA NAME IS CDCSCAT
PFN IS "MQCAT" UN IS "CDCS23".
VERSION NAME IS TESTVRS
AREA NAME IS EMPLOYEE
SAME AS MASTER.
AREA NAME IS JOBDETAIL
PFN IS "TJOBD" UN IS "CDCS23".

Figure 8-25. Sample First Section of DBMSTRD Output (Sheet 2 of 3)

60485200

A

8-19

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

AREA NAME IS DEPARTMENTS
SAME AS MASTER.
AREA NAME IS PROJECT
PFN IS "TPROJ" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN "TXPROJ" UN IS "CDCS23".
AREA IS DEVELOPMENT-PRODUCTS
PFN IS "TDEVE" UN IS MCDCS23"
INDEX FILE ASSIGNED
PFN "TXDEVE" UN IS "CDCS23".
AREA IS TESTS
PFN IS "TTEST" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN "TXTEST" UN IS "CDCS23".
AREA NAME IS CDCSCAT
PFN IS "TQCAT" UN IS "CDCS23".
SUBSCHEMA NAME IS C5SS-PR0DUCT-PERS0NNEL
FILE NAME IS C5SSLIB.
SUBSCHEMA NAME IS C5SS-PR0DUCT-MANAGEMENT
FILE NAME IS C5SSLIB.
SUBSCHEMA NAME IS F4SS-PR0DUCT-EVALUATI0N
FILE NAME IS F4SSLIB.
SUBSCHEMA NAME IS F5SS-PR0DUCT-MANAGEMENT
FILE NAME IS F5SSLIB.
SUBSCHEMA NAME IS QUCREA6
FILE NAME IS QUSSLIB.
SUBSCHEMA NAME IS QUPRODMGT
FILE NAME IS QUSSLIB.

CST BUILDER STATISTICS FOR THE CST FOR
SUBSCHEMA C5SS-PR0DUCT-PERS0NNEL
OF SCHEMA MANUFACTURING-DB
CATEGORY ENTRIES
W
O RDS IN THE CST
PERCENT
OF ENTRY IN CST
OCTAL
DECIMAL
36
30
AREA
3
AREA CAPSULE 1
143
99
10
CONSTRAINT 1
GENERAL
1
23
19
LOCK
3
14
12
PROCEDURE 2
REC
2
14
12
REC CAPSULE 4
1477
831
81
23
19
R E L AT I O N
1
TO TA L
18
2001
1025
100
THE CST BUILDER USED
0.038 SECONDS
CST BUILDER STATISTICS FOR THE CST FOR
SUBSCHEMA C5SS-PR0DUCT-MANAGEMENT
OF SCHEMA MANUFACTURING-DB

THE CST BUILDER USED
DBMSTRD COMPLETE

0.041 SECONDS
0 ERRORS
0 WARNINGS

REQUIRED
RUN TIME

45500B WORDS SCM
0.370 SECONDS

Figure 8-25. Sample First Section of DBMSTRD Output (Sheet 3 of 3)

>CSfey

8-20

60485200 A

MSTRDIR

PAGE

MASTER
DIRECTORY
CONTENTS
(S=SCHEMA, V=VERSION, A=AREA, R=RELATION, SB=SUBSCHEMA)
NAME

S

MANUFACTURING-DB
CREATION DATE - 82087 TIME - 14.14
V MASTER
A
EMPLOYEE
CHECKSUM - 56430552040035230620
A
J O B D E TA I L
CHECKSUM - 13626262424331006604
A
D E PA RT M E N T S
CHECKSUM - 16574462455232633415
A
PROJECT
CHECKSUM - 35175246562100113225
A DEVELOPMENT-PRODUCTS
CHECKSUM - 61470111011661762112
A
TESTS
CHECKSUM - 40015236474170366115
A
C D C S C AT
CHECKSUM - 57033604647410770643

V TESTVRS
A
J O B D E TA I L
CHECKSUM - 13626262424331006604
A
PROJECT
CHECKSUM - 35175246562100113225
A
DEVELOPMENT-PRODUCTS
CHECKSUM - 61470111011661762112
A
TESTS
CHECKSUM - 40015236474170366115
A
C D C S C AT

1
1
2
3
4
5
6
7
2
4
5
6
7

CHECKSUM - 57033604647410770643
R EMP-REL
CHECKSUM - 33541156402300070013
R TEST-REL

CHECKSUM - 10246503456523070027
R DPD-REL
CHECKSUM - 16223300077042601641
SB C5SS-PR0DUCT-PERS0NNEL
CHECKSUM - 07267725304252560742
CREATION DATE - 82087 TIME - 14.19
SB C5SS-PR0DUCT-MANAGEMENT
CHECKSUM - 34223316060544764172
CREATION DATE - 82087 TIME - 14.19
SB F4SS-PR0DUCT-EVALUATI0N
CHECKSUM - 00070537057255605254
C R E AT I O N D AT E - 8 2 0 8 7 T I M E - 1 4 . 1 9
SB F5SS-PR0DUCT-MANAGEMENT
CHECKSUM - 16022653644161327023
C R E AT I O N D AT E - 8 2 0 8 7 T I M E - 1 4 . 2 0
SB QUCREA6
CHECKSUM - 16231423336214473450
C R E AT I O N D AT E - 8 2 0 8 7 T I M E - 1 4 . 2 0
SB QUPRODMGT
CHECKSUM - 01703020523731103263
C R E AT I O N D AT E - 8 2 0 8 7 T I M E - 1 4 . 2 0

SUMMARY FOR MANUFACTURING-DB
NUMBER OF VERSIONS
NUMBER
OF
AREAS
N U M B E R O F R E L AT I O N S
NUMBER OF SUBSCHEMAS

2
7
3
6

OVERALL SUMMARY
NUMBER OF SCHEMAS 1
NUMBER OF SUBSCHEMAS
N U M B E R O F R E L AT I O N S 3
NUMBER OF VERSIONS 2
NUMBER
OF
AREAS
7
DIRECTORY SIZE (WORDS) 8118

Figure 8-26. Sample Second Section of DBMSTRD Output (Master Directory Contents)
60485200 A

8-21

/"^%

DATA BASE RECOVERY

Data base recovery facilities are grouped into two
categories: automatic recovery and manual recovery.
Automatic recovery is performed by CDCS and
provides for recovery from system failure, for
recovery from application program failure, and for
restarting application programs after a failure.
Manual recovery is performed by the data adminis
t r a t o r, w h o u s e s d a t a b a s e u t i l i t i e s p r o v i d e d f o r
manual recovery. The manual recovery utilities are
intended for use in situations whe..e automatic
recovery is not in effect or is incapable of
accomplishin g th e d e si re d re co ve ry. Th e a u to ma ti c
and manual recovery environments are shown in
figures 9-1 and 9-2, respectively.
The recovery facilities are described within the
following topics:

recovery from system failure. The applicationservice phase provides for data base recovery from
application program failure and for restarting
application programs after a failure. Automatic
recovery depends on data base transactions being
performed.
Data base utilities provide for the maintenance of
l o g fi l e s a n d f o r m a n u a l r e c o v e r y o p e r a t i o n s . T h e
data base utilities and the functions they perform
are as follows:
DBREC utility
I n i t i a l i z e s l o g fi l e s ; t r a n s f e r s t h e c o n
t e n t s o f a j o u r n a l l o g fi l e t o a t a p e fi l e .
DBRCN utility

Automatic recovery

R e c o n s t r u c t s a d a t a b a s e b y u s i n g fi l e s
reloaded from dumps and by using after
image records in a journal log file.

Data base utilities
Logging

DBRST utility
Recovery considerations
Manual recovery
and the use of
manual recovery
describing those

involves recovery considerations
data base utilities. Therefore,
is discussed in the subsections
topics.

Automatic recovery has two phases: the CDCS
initialization phase and the application-service
phase. The CDCS initialization phase provides for

Restores a data base to a previous state by
using a current copy of the data base and
before-image records in a journal Log file.
DBQRFA utility
Applies the contents of the quick recovery
file to a data base before a reconstruction
or restoration operation is initiated.

I just initialize CDCS. Then
CDCS performs the recovery operations.
0tMfW<~\

Initialize
CDCS

CONTROL DATA

CYBER

Data
Administrator

Transaction Recovery
File
R e s t a r t I d e n t i fi e r
File

Figure 9-1. Automatic Recovery Environment

60485200 A

9-1

I have developed a recovery strategy.
Now I must run the jobs that perform
the recovery operations.

/^S^v

Run DBREC

Run DBQRFA

CONTROL DATA

CYBER

Run DBRST

Load Backup
Data Base File
Data'
Administrator
Run DBRCN

Figure 9-2. Manual Recovery Environment

The log processing component of CDCS records data
o n t h e f o l l o w i n g fi l e s ( a s s e l e c t e d i n t h e m a s t e r
directory):
J o u r n a l l o g fi l e
Contains before and after images (as
selected) of records that are updated.
Quick recover y fi l e
Contains before-image records of CRM blocks
that have been updated.
Tr a n s a c t i o n r e c o v e r y fi l e
Contains information required for reversing
incomplete data base transactions.
R e s t a r t i d e n t i fi e r fi l e
C o n t a i n s r e s t a r t i d e n t i fi e r s f o r C D C S
r u n - u n i t s a n d a t r a n s a c t i o n i d e n t i fi e r o f
the last completed data base transaction.

is a facility of automatic recovery and is described
in the Automatic Recovery subsection. Recovery
p o i n t s a r e w r i t t e n t o t h e j o u r n a l l o g fi l e w h e n
requested by an application program and initiated
by CDCS in particular situations. Recovery points
are described in the Logging subsection.

AUTOMATIC RECOVERY
The automatic recovery facility of CDCS permits
automatic recovery of a data base (in whole or in
part) following a system failure or an application
program failure. The automatic recovery facility
also provides for automatic maintenance of the
j o u r n a l l o g fi l e a n d f o r r e s t a r t i n g a p p l i c a t i o n
programs. The application program interface to
automatic recovery is transaction processing. In
summary, the features of automatic recovery are as
follows:
Data base transactions
Application program restart

Each of the preceding log files is on mass storage
(disk).

Data base recovery from application program
failure

Two application program interfaces to recovery are
provided: data base transaction processing and
r e c o v e r y p o i n t d e fi n i t i o n . Tr a n s a c t i o n p r o c e s s i n g

Data base recovery from system failure
Automatic journal log maintenance
^3^?5v

9-2

60485200 A

Data base logging is required to support automatic
r e c o v e r y. T h e d a t a a d m i n i s t r a t o r m u s t s e l e c t t h e
logging options by specifying the log and recovery
fi l e s i n t h e m a s t e r d i r e c t o r y a n d b y i n i t i a l i z i n g
t h e fi l e s t h r o u g h t h e D B R E C u t i l i t y . D u r i n g
application-service phase processing, CDCS performs
t h e l o g g i n g t o t h e s e l e c t e d fi l e s a s a p p l i c a t i o n
programs perform data base updates. For recovery
purposes it is recommended that application
programs perform updates that involve several
associated records with a data base transaction.
The subsections that follow describe the require
ments to implement automatic recovery and the Data
Administrator's Role in Automatic Recovery.

Beginning a transaction
T h e a p p l i c a t i o n p r o g r a m s p e c i fi e s t h e
beginning of a transaction and communicates
a t r a n s a c t i o n i d e n t i fi e r t o C D C S . T h i s
causes CDCS to begin processing subsequent
updates by that program in transaction mode.
Committing a transaction
T h e a p p l i c a t i o n p r o g r a m s p e c i fi e s t h e
completion of the transaction. This causes
all the updates made within the transaction
to be made permanent.
Dropping a transaction

DATA BASE TRANSACTION
A d a t a b a s e t r a n s a c t i o n ( c a l l e d , s i m p l y, a t r a n s
action) is a sequence of one or more updates that
u s u a l l y i n v o l v e r e l a t e d fi l e s . T h e u s e o f d a t a
base transactions is essential for automatic
r e c o v e r y. T h e d a t a b a s e t r a n s a c t i o n f e a t u r e i s
available to COBOL and FORTRAN application pro
grams. It Is not available to Query Update users.
The application program specifies the beginning of
the transaction, performs the update operations,
and specifies the end of the transaction, which can
be either a commit or a drop. With the specifica
tion to commit the transaction, CDCS makes the
u p d a t e s p e r m a n e n t . W i t h t h e s p e c i fi c a t i o n t o d r o p
the transaction, all the updates performed within
the transaction are reversed by CDCS; therefore,
the data base is restored to its state before the
beginning of the transaction. If the application
program fails to commit a transaction because of a
system or program failure, automatic recovery is
performed and the data base is restored to its
state before the beginning of the transaction.
For example, a system failure occurs when an appli
cation program BETA is performing the third update
i n a t r a n s a c t i o n i d e n t i fi e d a s T R A N 6 8 9 . A u t o m a t i c
recovery is performed when CDCS is reinitialized
after the system failure. Each of the three
r e c o r d s a ff e c t e d b y t h e t r a n s a c t i o n i s r e s t o r e d t o
its state before the program began processing the
transaction.
The data base transaction feature also provides a
restart capability for application programs after a
system failure. Using this feature, the applica
tion program can determine the last transaction
that was committed by the program before the
failure occurred. For example in the situation
just described, program BETA could determine that
TRAN688 was the last committed transaction.
COBOL and FORTRAN data manipulation language (DML)
statements provide for the operations involved in
transaction processing. Five operations are
involved in transaction processing. Three of the
operations are directly involved in main-line code
d e a l i n g w i t h u p d a t e s . Tw o o f t h e o p e r a t i o n s a r e
used for restart operations. The transaction
processing operations are as follows:

60485200 A

The application program indicates that the
current transaction is to be terminated and
not committed. This causes each record
updated within the transaction to be
r e s t o r e d t o t h e s t a t e i t w a s i n j u s t b e fo r e
the beginning of the transaction.
O b t a i n i n g a r e s t a r t i d e n t i fi e r
Before beginning transaction processing,
the application program obtains a restart
i d e n t i fi e r f r o m C D C S a n d m u s t s a v e t h e
i d e n t i fi e r f o r s u b s e q u e n t u s e i n a r e s t a r t
operation.
Inquiring about the status of the last trans
action
In a restart operation, the application
program communicates to CDCS a restart
i d e n t i fi e r a n d o b t a i n s t h e t r a n s a c t i o n
i d e n t i fi e r f o r t h e l a s t c o m p l e t e d t r a n s
action associated with that restart
i d e n t i fi e r .

DATA BASE RECOVERY FROM
APPLICATION PROGRAM FAILURE
Recovery from application failure occurs auto
matically during CDCS application-service phase
processing with no effect on other users. CDCS
p e r f o r m s a n y r e q u i r e d r e c o v e r y o f d a t a b a s e fi l e s
before CDCS allows any user access to the records
affected by the recovery operation.
CDCS performs the recovery when CDCS detects the
termination of the application program from CDCS
and the existence of an incompleted transaction.
To a c c o m p l i s h r e c o v e r y, C D C S a p p l i e s t h e b e f o r e i m a g e r e c o r d s i n t h e t r a n s a c t i o n r e c o v e r y fi l e t o
reverse any updates made within the incompleted
transaction. This process restores the affected
d a t a b a s e fi l e s t o t h e i r r e s p e c t i v e s t a t e s j u s t
before the program failure occurred.
Requirements must be met to implement automatic
r e c o v e r y. R e f e r t o t h e s u b s e c t i o n e n t i t l e d D a t a
Administrator's Role in Automatic Recovery for a
discussion of the requirements.

9-3

RECOVERY FROM SYSTEM FAILURE

AUTOMATIC JOURNAL LOG MAINTENANCE

Recovery from system failure occurs automatically
during CDCS initialization. CDCS performs any
required recovery o f d a ta b a se fil e s b e fo re C D C S
a l l o w s a n y u s e r a c c e s s t o t h e fi l e s . T h e r e c o v e r y
process involves the following steps for each
schema referenced in the master directory:

The automatic journal log maintenance feature
provides two functions:

Application of before-image blocks from the
quick recovery file to reverse updates made to
the data base since the last recovery point.
Application of after-image records from the
j o u r n a l l o g fi l e f r o m t h e l a s t r e c o v e r y p o i n t
to the point of failure.
Application of before-image records in the
t r a n s a c t i o n r e c o v e r y fi l e t o r e v e r s e a n y
updates made for transactions that were not
committed.
This process restores all data bases to their
respective states just before the failure
occurred. The state of the data base is determined
by the last completed update made by an application
program processing in regular mode or by the last
committed transaction made by an application pro
gram processing in transaction mode.
Requirements must be met to implement automatic
r e c o v e r y. R e f e r t o t h e s u b s e c t i o n e n t i t l e d D a t a
Administrator's Role in Automatic Recovery for a
discussion of the requirements.
When the console operator enters a command to UP a
schema, that schema is put through the same
recovery process as is used for a recovery from a
system failure. If the recovery process for the
schema is not successful, then the schema is not
changed to "up" status.

RECOVERY OF A SINGLE DATA BASE FILE
If there is a malfunction that causes a single
database area to be placed in an "error down"
s t a t u s , t h a t a r e a i s s u b j e c t e d t o t h e fi r s t t w o
s t e p s o f a u t o m a t i c r e c o v e r y. T h e b e f o r e - i m a g e
blocks are applied and then the after-image records
are applied.
The intent is that the application of the
before-image blocks will restore the area to a
usable state. If not, then the application of the
after-image records will fail. In that case, the
schema will be placed in an "error down" status.
If the recovery is successful, the area is still
left in a down status. This forces recognition of
the fact that a malfunction has occurred. It is
necessary for the console operator to UP the area
in order to resume its use.
Any user jobs that had the file open at the time of
the malfunction are dropped. If any of those jobs
had an uncommitted transaction in progress, those
transactions are backed out.

y^S??S

Automatic switch to an alternate journal log
fi l e .
Automatic transfer of the contents of the
j o u r n a l l o g fi l e t o a s t o r a g e fi l e ( c a l l e d |
d u mp i n g th e j o u rn a l l o g fil e ).
CDCS initiates these operations when one of the
following conditions occurs:
A j o u r n a l l o g fi l e i s f u l l . T h i s o c c u r s w h e n
r e c o r d s h a v e b e e n w r i t t e n t o t h e fi l e a n d fi l l
its designated length.
A fatal error is detected on the journal log
file during a logging operation.
When CDCS detects one of these conditions, CDCS
begins logging operations on the alternate journal
l o g fi l e a n d i n i t i a t e s a j o b t h a t c a l l s t h e D B R E C
utility. DBREC performs the dump operation. When
that operation is complete, DBREC automatically
r e i n i t i a l i z e s t h e j o u r n a l l o g fi l e f o r f u t u r e u s e .

/**^^\

Requirements must be met to implement automatic
journal log maintenance.

DATA ADMINISTRATOR'S ROLE
IN AUTOMATIC RECOVERY
The data administrator selects recovery options by
including particular clauses in the master direc
t o r y t h a t s e l e c t t h e l o g fi l e s . S e l e c t e d r e c o v e r y
options apply to a data base on a schema basis;
other recovery options apply only to an area of a
particular version. A summary of the clauses that
implement features of automatic recovery is shown
in table 9-1. The table also indicates that a
parameter must be included in the CDCS control
statement to provide information for attaching the
m a s t e r d i r e c t o r y. F o r f u r t h e r i n f o r m a t i o n a b o u t
t h e c l a u s e s o f t h e m a s t e r d i r e c t o r y, r e f e r t o
s e c t i o n 8 . F o r f u r t h e r i n f o r m a t i o n a b o u t t he CDCS
control statement, refer to section 10.
A n y l o g a n d r e c o v e r y fi l e u s e d i n a u t o m a t i c
recovery must be initialized before CDCS can use
t h e fi l e . T h e D B R E C u t i l i t y p r o v i d e s f o r t h i s
initialization. The data administrator must
construct the job that calls the DBREC utility and
p r e p a r e s o u r c e i n p u t f o r t h e D B R E C u t i l i t y. T h e
DBREC utility is discussed later in this section.
The data administrator must establish certain size
l i m i t s f o r l o g a n d r e c o v e r y fi l e s . T h e s e l i m i t s
are established either in master directory clauses
or in DBREC clauses. These limits are described in
the following items:
Transaction Recovery File
I n i n p u t f o r t h e m a s t e r d i r e c t o r y, e s t a b
lish two limits: unit limit (the maximum
number of outstanding transactions for all
users of the schema) and update limit (the
maximum number of updates allowed within a
transaction).

/*^**^\
9-4

60485200 E

Journal Log File
I n i n p u t t o t h e D B R E C u t i l i t y, s p e c i f y t h e
fi l e s i z e i n p h y s i c a l r e c o r d u n i t s .
Quick Recovery File
I n i n p u t t o t h e D B R E C u t i l i t y, s p e c i f y t h e
fi l e s i z e i n p h y s i c a l r e c o r d u n i t s .
One or more messages pertinent to the recovery
process can appear in the CDCS dayfile and output
fi l e . I f a d a t a b a s e c a n n o t b e r e c o v e r e d , C D C S
downs the schema. When this occurs, the data
administrator must manually restore the data base
to an operational state.
If the CCLPROC sub-clause is specified in the JOB
CONTROL clause of DBMSTRD, then the data
a d m i n i s t r a t o r m u s t d e fi n e t h e c o r r e s p o n d i n g C C L
procedure.

60485200 E

DATA BASE UTILITIES
The data base utilities provide for maintenance and
u s e o f l o g a n d r e c o v e r y fi l e s . T h e d a t a a d m i n i s
trator has the major role in determining the use of
the utilities in the data base environment and in
constructing the jobs that use the data base
utilities. The data base utilities are described
in following subsections in the the order listed:
DBREC utility
DBQRFA utility
DBQRFI utility
DBRCN utility
DBRST utility

9-4.1/9-4.2

0**%,

TABLE 9-1. SUMMARY OF REQUIREMENTS OF DATA BASE DEFINITION FOR FEATURES OF AUTOMATIC RECOVERY

Requirements

Recovery
From
Application
Program
Failure

Application
Program
Restart

Recovery
From
System
Failure

Automatic
Journal
Log
Maintenance

Comments

Parameter
or Clause

Location

Scope

TRANSACTION
RECOVERY
FILE clause

Master
directory

Schema

This clause must be
s p e c i fi e d f o r a p p l i c a
tion programs to perform
data base transactions.

RESTART
IDENTIFIER
FILE clause

Master
directory

Schema

This clause cannot be
specified unless a
transaction recovery
fi l e i s s p e c i fi e d .

JOURNAL
LOG FILE
clause

Master
directory

Schema

This clause provides two
permanent file names for
j o u r n a l l o g fi l e s . F o r
the automatic switch,
both files must be es
tablished by the DBREC
u t i l i t y.

QUICK
RECOVERY
FILE clause

Master
directory

Schema

The quick recovery file
should be selected if a
j o u r n a l l o g fi l e o r a
transaction recovery
fi l e i s s e l e c t e d .

JOB CONTROL
INFORMATION
clause

Master
directory

Schema

This clause must be
specified for automatic
dumping of the journal
l o g fi l e .

LOG AFTER
IMAGE
RECORDS
option

Master
directory

Area
of a
version

This option causes log
ging to the journal log
file for the permanent
fi l e a s s o c i a t e d w i t h
the area and version.
For recovery of all data
b a s e fi l e , t h i s o p t i o n
must be specified for
each area of each
version.

LOG BEFORE
IMAGE
BLOCKS
option

Master
directory

Area
of a
version

This option causes
logging to the quick
r e c o v e r y fi l e f o r t h e
permanent file associ
ated with the area and
version. For recovery
o f a l l d a t a b a s e fi l e s ,
this option must be
specified for each area
of each version.

Parameters
for attach
ing the
master
directory

CDCS
control
statement

All data
bases in
master
direc
tory

The parameters must be
included for automatic
dumping of the journal
l o g fi l e .

60485200 A

9-5

DBREC UTILITY
The DBREC utility provides for two operations:
t r a n s f e r r i n g t h e c o n t e n t s o f t h e j o u r n a l l o g fi l e
t o a t a p e fi l e ( c a l l e d d u m p i n g t h e j o u r n a l l o g
fi l e ) a n d i n i t i a l i z i n g t h e fi l e s m a i n t a i n e d f o r
d a t a b a s e r e c o v e r y. T h e s e fi l e s a r e t h e j o u r n a l
l o g fi l e , t h e q u i c k r e c o v e r y fi l e , t h e t r a n s a c t i o n
r e c o v e r y fi l e , a n d t h e r e s t a r t i d e n t i fi e r fi l e .
The operations which the DBREC utility will perform
a r e s p e c i fi e d b y c l a u s e s i n a s o u r c e i n p u t fi l e .
The utility is called by the DBREC control state
ment.
The DBREC utility executes as a batch job at its
own control point. DBREC can be executed either
o n l i n e o r o f fl i n e . I n o f fl i n e e x e c u t i o n , t h e d a t a
administrator constructs a batch job that executes
t h e D B R E C u t i l i t y. I n o n l i n e e x e c u t i o n , C D C S
initiates a batch job that executes the DBREC
u t i l i t y.

Schema Entry
The source input for the DBREC utility consists of
one or more schema entries. Clauses included in
the schema entry indicate operations to be per
formed on log and recovery files for the specified
schema. The format of the schema entry is shown in
figure 9-3.
The clauses of the schema entry identify the schema
and specify any operation to be performed. One or
more schemas can be specified in any order in
schema entries.

Schema-name must be a valid schema name, 1 to 30
characters in length, that exists in the master
directory attached during execution of the DBREC
utility. Schema-name must not duplicate any other
schema-name specified in the source input to the
DBREC utility.

DUMP Clause
The DUMP clause provides for transferring the
contents of a journal log file to a tape file and
for reinitialization of the journal log file. The
DUMP clause can be specified in a job for either
online or offline execution. More than one DUMP
c l a u s e c a n b e s p e c i fi e d i n a j o b f o r o f fl i n e
execution; the job inititiated by CDCS for online
execution includes only one DUMP clause.
Log-file-name specified in the DUMP clause is the
7-character permanent file name of the journal log
file. Log-file-name must be specified as foiLows:
the first six characters of the name must be the
same as the 6-character permanent file name
specified for the journal log fiLe in the master
directory; the seventh character must be the digit
1 or 2.
If CDCS initiates the job of dumping the journal
log file, CDCS determines the appropriate log-file
name. If the data administrator initiates the job
of dumping the journal log file, the data adminis
trator must determine the appropriate log-file-name.

Clauses in the input file have a free-field for
mat. Data appears in columns 1 through 72; columns
73 through 80 are not examined and can be used for
sequencing or identification purposes.

After the DBREC utility has dumped the journal log
to tape, the DBREC utility causes the journal log
fi l e t o b e r e i n i t i a l i z e d a s i f t h a t fi l e w e r e
specified in an ALLOCATE clause.

The DUMP and ALLOCATE clauses must refer to log or
recovery files specified in the master directory
for the same schema as identified in the SCHEMA
NAME clause. DUMP and ALLOCATE clauses can appear
in any order within a schema entry.

ALLOCATE Clause

SCHEMA NAME Clause
The SCHEMA NAME clause identifies the schema. This
m u s t b e t h e fi r s t c l a u s e s p e c i fi e d i n t h e s c h e m a
e n t r y.

The ALLOCATE clause provides for the initialization
o f a s p e c i fi e d fi l e . I f t h e fi l e i s a j o u r n a l l o g ,
q u i c k r e c o v e r y , o r t r a n s a c t i o n r e c o v e r y fi l e ,
storage is allocated for it during intialization.
This process is called preallocation.
The ALLOCATE clause can be specified only for a job
e x e c u t i n g o f fl i n e .

SCHEMA NAME IS schema-name-1
DUMP
JOURNAL LOG FILE NAME IS log-file-name -1 C.J J
"ALLOCATE
JOURNAL LOG FILE [NAME IS log-file-name-2] SIZE is integer-1 PRUS
QUICK RECOVERY FILE NAME IS qrf-name-1 SIZE IS integer-2 PRUS
TRANSACTION RECOVERY FILE NAME IS trf-name
RESTART IDENTIFIER FILE NAME IS rif-name

C.J

Figure 9-3. Schema Entry Format (DBREC Utility)

9-6

60485200 A

F i l e o p t i o n s i d e n t i f y t h e fi l e t y p e s a n d t h e p e r
m a n e n t fi l e n a m e s o f t h e fi l e s t o b e i n i t i a l i z e d .
T h e r u l e s f o r s p e c i f y i n g fi l e o p t i o n s a r e a s
follows:
F i l e o p t i o n s c a n b e s p e c i fi e d i n a n y o r d e r i n
an ALLOCATE clause.
One ALLOCATE clause can specify one or more
fi l e o p t i o n s .
One or more ALLOCATE clauses can be included in
a schema entry.
A p a r t i c u l a r fi l e o p t i o n c a n b e s p e c i fi e d o n l y
once in a schema entry.
JOURNAL LOG FILE Option
The JOURNAL LOG FILE option provides for the
i n i t i a l i z a t i o n o f a j o u r n a l l o g fi l e . E v e r y j o u r
n a l l o g fi l e u s e d b y C D C S m u s t b e i n i t i a l i z e d b y
the DBREC utility.
Log-file-name identifies the permanent file name of
t h e j o u r n a l l o g fi l e . O n e o r t w o j o u r n a l l o g fi l e s
can be initialized by use of this clause. Logfi l e - n a m e c a n e i t h e r b e o m i t t e d o r a 7 - c h a r a c t e r
log-file-name can be specified.
If log-file-name is omitted, two log file names are
assumed. The first six characters of both assumed
n a m e s a r e c h a r a c t e r s s p e c i fi e d f o r t h e p e r m a n e n t
fi l e n a m e o f t h e j o u r n a l l o g fi l e i n t h e m a s t e r
d i r e c t o r y. T h e s e v e n t h c h a r a c t e r o f o n e n a m e i s
the digit 1; the seventh character of the other
n a m e i s t h e d i g i t 2 . W h e n l o g - fi l e - n a m e i s
o m i t t e d , o n e o r t w o fi l e s a r e i n i t i a l i z e d d e p e n d i n g
on whether one or two files have been established
a s p e r m a n e n t fi l e s b y o p e r a t i n g s y s t e m c o n t r o l
statements. Refer to the subsequent subsection
Execution of DBREC for Allocation for further
information.
If log-file-name is specified, the name must be one
of the 7-character names that would be assumed by
CDCS and must be the permanent file name of an
e s t a b l i s h e d p e r m a n e n t fi l e . T o i n i t i a l i z e t h e
second log file in this situation, another ALLOCATE
clause must be specified. Refer to the subsequent
subsection Execution of DBREC for Allocation for
further information.
I n t e g e r - 1 s p e c i fi e s t h e s i z e i n p h y s i c a l r e c o r d
u n i t s ( P R U S ) o f t h e j o u r n a l l o g fi l e ; i t m u s t b e a
p o s i t i v e i n t e g e r. C D C S u t i l i z e s t h e s i z e o f t h e
journal log file to determine when to switch to the
a l t e r n a t e fi l e .

QUICK RECOVERY FILE Option
The QUICK RECOVERY FILE option provides for the
i n i t i a l i z a t i o n o f t h e q u i c k r e c o v e r y fi l e . T h i s
fi l e m u s t b e i n i t i a l i z e d b e f o r e i t c a n b e u s e d .
Use of the DBREC utility rather than the DBQRFI
utility is recommended for initializing the quick
r e c o v e r y fi l e .

60485200 A

T h e q r f - n a m e s p e c i fi e d i n t h i s o p t i o n m u s t s p e c i f y
t h e p e r m a n e n t fi l e n a m e o f t h e q u i c k r e c o v e r y
file. Qrf-name must be be the same permanent file
name (a 1- through 7-character permanent file name)
a s t h e n a m e s p e c i fi e d f o r t h e q u i c k r e c o v e r y fi l e
in the master directory.
I n t e g e r - 2 s p e c i fi e s t h e s i z e i n p h y s i c a l r e c o r d
u n i t s o f t h e q u i c k r e c o v e r y fi l e ; i t m u s t b e a
p o s i t i v e i n t e g e r. C D C S c a n w r i t e t o t h e q u i c k
r e c o v e r y fi l e u n t i l t h e s p a c e p r o v i d e d b y s p e c i fi
c a t i o n o f t h e i n t e g e r i s fi l l e d . C D C S e n f o r c e s t h e
s i z e s p e c i fi e d b y i n t e g e r - 2 b y i n i t i a t i n g a
recovery point, which is described later in this
section.
TRANSACTION RECOVERY FILE Option
The TRANSACTION
initialization of
T h i s fi l e m u s t b e
before the file can

RECOVERY FILE option provides for
t h e t r a n s a c t i o n r e c o v e r y fi l e .
initialized by the DBREC utility
be used.

Tr f - n a m e s p e c i fi e s t h e p e r m a n e n t fi l e n a m e o f t h e
t r a n s a c t i o n r e c o v e r y fi l e . Tr f - n a m e m u s t b e s p e c i
fi e d a s f o l l o w s : t h e fi r s t s i x c h a r a c t e r s m u s t b e
t h e s i x c h a r a c t e r s o f t h e p e r m a n e n t fi l e n a m e
s p e c i fi e d f o r t h e t r a n s a c t i o n r e c o v e r y fi l e i n t h e
master directory; the seventh character must be the
digit 1.
RESTART IDENTIFIER FILE Option
The RESTART IDENTIFIER option provides for the
i n i t i a l i z a t i o n o f t h e r e s t a r t i d e n t i fi e r fi l e .
T h i s fi l e m u s t b e i n i t i a l i z e d b y t h e D B R E C u t i l i t y,
before the file can be used.
R i f - n a m e s p e c i fi e s t h e p e r m a n e n t fi l e n a m e o f t h e
r e s t a r t i d e n t i fi e r fi l e . R i f - n a m e m u s t b e t h e s a m e
p e r m a n e n t fi l e n a m e ( a 1 - t h r o u g h 7 - c h a r a c t e r
permanent file name) as the name specified for the
r e s t a r t i d e n t i fi e r fi l e i n t h e m a s t e r d i r e c t o r y.

DBREC Control Statement
Execution of the DBREC utility is called by the
DBREC control statement. Figure 9-4 illustrates
the format of the DBREC control statement. Option
ally, the comma immediately following DBREC can be
replaced by a left parenthesis; the terminating
period can be replaced by a right parenthesis.

DBRECC,I=lfn-i:ir.,L=lfn-2J.
Figure 9-4. DBREC Control Statement
All parameters of the DBREC control statement are
optional and can appear in any order.
T h e I p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
c o n t a i n s s o u r c e i n p u t f o r t h e D B R E C u t i l i t y. T h e I
parameter is interpreted as follows:

9-7

omitted
Local file INPUT is assumed to contain the
s o u r c e i n p u t f o r t h e u t i l i t y.

Local file COMPILE is assumed to contain
t h e s o u r c e i n p u t f o r t h e u t i l i t y.
I=lfn-1
T h e s p e c i fi e d fi l e n a m e i d e n t i fi e s t h e
l o c a l fi l e t h a t c o n t a i n s t h e s o u r c e i n p u t
f o r t h e u t i l i t y.

1=0
Not allowed.
T h e L p a r a m e t e r i d e n t i fi e s t h e l o c a l fi l e t h a t
receives a listing and diagnostics generated by the
D B R E C u t i l i t y. T h e L p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted

Local file OUTPUT receives the listing and
diagnostics generated by the utility.

Local file OUTPUT receives the listing and
diagnostics generated by the utility.
L=lfn-2
The specified local file name identifies
t h e fi l e t h a t r e c e i v e s t h e l i s t i n g a n d
diagnostics generated by the utility.
L=0
T h e l o c a l fi l e O U T P U T r e c e i v e s o n l y t h e
d i a g n o s t i c s g e n e r a t e d b y t h e u t i l i t y.

Execution of DBREC for Allocation
The job for execution of the DBREC utility for file
a l l o c a t i o n c a n o n l y b e i n i t i a t e d o f fl i n e . A d a t a
base administrator can initiate the job when CDCS
is either active or inactive.
All files that are specified in an ALLOCATE clause
must have been established as permanent (direct
access for NOS) files before execution of the DBREC
u t i l i t y. T h e f o l l o w i n g l i s t i n g i l l u s t r a t e s a
series of control statements that, if executed for
a p a r t i c u l a r p e r m a n e n t fi l e n a m e ( p f n ) , e s t a b l i s h
the permanent file:
For NOS
DEFINE
RETURN
For NOS/BE
REQUEST
REWIND
CATALOG
RETURN

9-8

Ta b l e 9 - 2 i n d i c a t e s t h e p e r m a n e n t fi l e n a m e t h a t
m u s t b e s p e c i fi e d i n t h e o p e r a t i n g s y s t e m c o n t r o l
s t a t e m e n t s t o e s t a b l i s h a p e m a n e n t fi l e f o r e a c h
fi l e o p t i o n o f t h e A L L O C AT E c l a u s e . A d d i t i o n a l l y,
table 9-2 summarizes all the contexts in which
p e r m a n e n t fi l e n a m e i s s p e c i fi e d f o r a l l o c a t i o n o f
a fi l e .
Execution of the DBREC utility requires that the
m a s t e r d i r e c t o r y fi l e b e a t t a c h e d b y u s i n g t h e
local file name MSTRDIR.

DBREC Execution to Dump the Journal
Log File
The DBREC utility can be executed both online and
offline for dumping the journal log file. The data
administrator creates and initiates the job for
offline execution; CDCS creates and initiates the
job for online execution.
Much greater flexibility is available during online
execution if the CCLPROC sub-clause is specified in
the JOB CONTROL clause of DBMSTRD input. The
storage file can be specified as either magnetic
tape or a permanent file. The online job can be
set up to copy the journal log file as an extension
of the storage file instead of over writing the
storage file on each execution.
The following steps must be contained within the
CCL procedure:
1. Specify an ATTACH, REQUEST or LABEL statement
to obtain the file to which the journal log file is
to be dumped. This file must be given the local
file name of LOGDUMP.
2. The file, LOGDUMP, must be positioned at the
beginning or at the end of information, as selected
by the installation.
3. The CDCS master directory must be attached with
the local file name MSTRDIR.
4. The utility progam, DBREC, must be called to
dump the journal log file.
These are the basic steps required. A recommended
addition would be to place an EXIT statement after
the DBREC statement. This can be used to notify
the data administrator of a failure of the online
dump job.
Offline Execution
The DBREC utility assumes the local file name
LOGDUMP for the tape file. This local file must be
associated with a tape volume serial number. The
VSN control statement should be included In the job
stream to associate the local file LOGDUMP with a
tape. If no tape volume serial number is supplied
in the job stream, the DBREC utility requests that
the operator assign one. The tape type and
density, if not specified in the master directory,
are assumed to be type NT (nine-track) with the
density of the installation default density.
Execution of the DBREC utility requires that the
master directory be attached in the job stream with
the local file name MSTRDIR.

60485200 E

F i g u r e 9 - 5 i s a n e x a m p l e o f a j o b f o r o f fl i n e
execution of the DBREC utility for dumping the
j o u r n a l l o g fi l e .
Online Execution
W h e n a j o u r n a l l o g fi l e i s f u l l o r a b a d fi l e
condition exists, CDCS can initiate a job to dump
the journal log file. CDCS uses the ROUTE control
statement to initiate execution of the job.
The following requirements must be met to provide
CDCS with information necessary to initiate a job:

60485200 E

T h e m a s t e r d i r e c t o r y p e r m a n e n t fi l e a t t a c h
information must have been supplied as input to
CDCS through the CDCS control statement.
The job control Information required for
initiation of the DBREC job must have been
supplied as part of the input for the master
d i r e c t o r y.
During the online job, the tape to which
j o u r n a l l o g fi l e i s d u m p e d i s s p e c i fi e d b y
o p e r a t o r. T h e d a t a a d m i n i s t r a t o r m u s t p r o v i d e
operator with a list of blank-labeled tapes
can be used for journal log file dumps.

the
the
the
that

9-8.1/9-8.2 |

,^^\

,'*%

TABLE 9-2. SUMMARY OF PERMANENT FILE NAME SPECIFICATIONS FOR ALLOCATION OF FILES BY DBREC UTILITY
Context in
Which Permafile Name (pfn)
I s S p e c i fi e d

File Type
Journal Log
File

Quick Recovery
File

Transaction Recovery
File

Master
directory

The 6-character
literal that speci
fi e s p f n i n t h e
JOURNAL LOG FILE
clause.

The literal
(of 1 to 7
characters in
length) that
s p e c i fi e s t h e
pfn in the
QUICK RECOVERY
FILE clause.

The 6-character
literal that
s p e c i fi e s p f n i n
the TRANSACTION
RECOVERY FILE
clause.

The literal (of 1 to
7 characters in
length) that speci
fi e s p f n i n t h e
RESTART IDENTIFIER
FILE clause.

Control
statements
(DEFINE
and so
forth for
NOS or
CATALOG
and so
forth for
NOS/BE)

A 7-character pfn
must be specified.
T h e fi r s t s i x c h a r
acters are the same
as those specified
in the clause indi
cated above. The
seventh character
must be the digit
1 or 2. The recom
mended procedure is
to include control
statements speci
fying both allowed
pfn'8 to establish
t w o fi l e s .

The same pfn
as specified
in the clause
indicated
above.

A 7-character pfn
must be specified.
T h e fi r s t s i x c h a r
acters are the same
as those specified
in the clause above.
The seventh
character must
be the digit 1.

The same pfn as
s p e c i fi e d i n t h e
clause indicated
above.

File
options
of the
ALLOCATE
clause of
the DBREC
utility

Either the pfn
is omitted from the
JOURNAL LOG FILE
option or a 7-char
acter pfn must be
s p e c i fi e d i n t h e
option. The 7character pfn must
be the same pfn as
t h e p f n s p e c i fi e d
in control state
ments indicated
above. If pfn is
o m i t t e d , t w o fi l e s
with 7-character
pfn'8 as indicated
above are assumed.

The same pfn
must be speci
fi e d i n t h e
QUICK RECOVERY
FILE option
as specified
in the master
directory and
in the control
statements
indicated
above.

The same 7-char
acter pfn must be
s p e c i fi e d i n t h e
TRANSACTION RECOVERY
FILE option as
s p e c i fi e d i n t h e
control statements
indicated above.

The same pfn
must be specified
In the RESTART
IDENTIFIER FILE
o p t i o n a s s p e c i fi e d
in the master direc
tory and in the
control statements
indicated above.

DBQRFA UTILITY
T h e D B Q R FA u t i l i t y a p p l i e s t h e c o n t e n t s o f t h e
quick recovery file to a data base before a recon
struction or restoration operation is initiated.
T h i s p r o c e d u r e e n s u r e s t h a t t h e fi l e s a r e i n a
processable state for subsequent operations. The
D B Q R FA u t i l i t y d u p l i c a t e s a r e c o v e r y c a p a b i l i t y o f
automatic recovery.
E x e c u t i o n o f t h e D B Q R FA u t i l i t y i s c a l l e d b y t h e
D B Q R FA c o n t r o l s t a t e m e n t . F i g u r e 9 - 6 i l l u s t r a t e s
t h e f o r m a t o f t h e D B Q R FA c o n t r o l s t a t e m e n t .
Optionally, the comma immediately following DBQRFA
can be replaced by a left parenthesis; the
terminating period can be replaced by a right
parenthesis.

60485200 A

R e s t a r t I d e n t i fi e r
File

The parameters can appear in any order in the
D B Q R FA c o n t r o l s t a t e m e n t . T h e S C p a r a m e t e r i s
required; the other parameters are optional.
The SC parameter identifies the schema associated
w i t h t h e q u i c k r e c o v e r y fi l e b e i n g p r o c e s s e d . T h e
SC parameter is interpreted as follows:
SC=schema-id
Schema-id must be the 4-digit schema
i d e n t i fi c a t i o n a s s i g n e d b y t h e D B M S T R D
utility and listed in the master directory
contents report.

9-9

NOS

NOS/BE

Job statement
FAMILY control statement
USER control statement
CHARGE control statement
RESOURC(tape-type=integer)
ATTACH,MSTRDIR=pfn/UN=usernum,PW=passwd,M=R,
R=devi ce-type/PN=packname.
VSN (LOGDUMP=VSN)
DBREC.
End-of-record
SCHEMA NAME IS SAMPSCH1
DUMP JOURNAL LOG FILE DB1JLF1.
SCHEMA NAME IS SAMPSCH2
DUMP JOURNAL LOG FILE DB2JLF2.
End-of-Informaticn

Job statement
ACCOUNT control statement
VSN(LOGDUMP=vsn)
MOUNT(SN=set-name,VSN=vsn)
ATTACH,MSTRDIR,pfn,ID=id,PW=read-passwds,
MR=1,SN=setname.
DBREC.
End-of-record
SCHEMA NAME IS SAMPSCH1
DUMP JOURNAL LOG FILE DB1JLF1.
SCHEMA NAME IS SAMPSCH2
DUMP JOURNAL LOG FILE DB2JLF2.
End-of-informat i on

." =
10
REWRITES PROCESSED =
TOTAL WRITES PROCESSED =
TOTAL DELETES PROCESSED
10
TOTAL REWRITES PROCESSEC> =
82026
82026
82026
82026
82026
82026
82026
82026
82026
82026

KEY=
KEY=
KEY=
KEY=
KEY=
KEY=
KEY=
KEY=
KEY=
KEY=

:::::::A
:::::::B
:::::::C
:::::::D
:::::::E
:::::::F
:::::::G
:::::: :H
:::::::I
:::::::J

D a y fi l e
17.01.18.DBRST.
17.01.19.USER, .,
17.01.19.CHARGE,
17.01. 19.ATTACH,QRFL0G=DUMQRF/UN=CDCS23,M=W.
17.01. 19.ATTACH,MSTRDIR=CDCSMD.
17.01. 20.VSN(0LDL0G=003487)
17.01. 20.LABEL(OLDLOG,D=PE,PO=R)
17.06, 58.NT54, ASSIGNED TO OLDLOG , VSN=003487.
17.06. 58.DBRST.
17.07, 00. 10 RECORDS SELECTED
17.07, 00.***KEY EXTRACTION USED
17.07. 00. ** INSERTIONS DURING INPUT
*********0
17.07, 00. ** DELETIONS DURING INPUT
*********o
17.07. 00. ** TOTAL RECORDS SORTED
********10
17.07. 00. ** INSERTIONS DURING OUTPUT * * * * * * * * * Q
*********o
17.07. 00. ** DELETIONS DURING OUTPUT
********* 0
17.07. 00. ** TOTAL RECORDS OUTPUT
17.07. 00. ** MERGE ORDER USED
17.07, 00. **END SORT RUN
17.07, 03. TOTAL WRITES PROCESSED =
0
17.07, 03. TOTAL DELETES PROCESSED =
10
17.07. 03. TOTAL REWRITES PROCESSED =
0
17.07, 03.
74600 MAXIMUM SCM WORDS USED

^/■S^V

Figure 9-11. DBRST Utility Example

9-16

60485200

A

]

The selection of the options determines the kind of
recovery possible for the area. The AFTER IMAGE
RECORDS option must be selected for automatic
recovery of the area and for recovery of the area
by the DBRCN utility. The BEFORE IMAGE RECORDS
option must be selected for recovery of the area by
the DBRST utility.

written before every recovery point. The copy of
t h e j o u r n a l l o g fi l e t r a n s f e r r e d t o t a p e b y t h e
DBREC utility and the journal log file produced by
DBRCN and DBRST logging are not partitioned.
T h e j o u r n a l l o g fi l e c a n c o n t a i n t h e f o l l o w i n g
types of log records:

Begin transaction
Commit transaction
Drop transaction
Invoke

Maintenance of the Journal Log File
The automatic journal log maintenance feature of
C D C S p r o v i d e s f o r m a i n t a i n i n g t h e d i s k fi l e t o
which CDCS logs journal log records. If all
requirements for this feature are met, CDCS initi
ates an online switch when the journal log file In
use becomes full or has an error condition. After
the switch, CDCS initiates a job that calls the
D B R E C u t i l i t y t o d u m p t h e j o u r n a l l o g fi l e t o t h e
s t o r a g e fi l e a n d r e i n i t i a l i z e t h e j o u r n a l l o g fi l e
for subsequent use. Refer to the Automatic Journal
Log Maintenance subsection which appears earlier in
this section. The data administrator should
establish the appropriate administrative procedures
for the maintenance of the tape files.

Version change
Open
Privacy breach

Before-image
After-image

Close
Terminate
Recovery point

Journal Log Record Structure
The header (first seven words) of each log record
contains information common to all log record
types; the trailer, which is the remainder of the
record, consists of information applicable to a
specific log record type. The number of words
contained in the log record varies according to the
type of log record being generated with the excep
tion of before-image and after-image records, which
conform to the schema description of the record.
All fields in the log record are in display code
with the exception of before- and after-image
records. The contents of all unused fields are
undefined.

If an error condition occurs on the journal log
fi l e , t h e d a t a a d m i n i s t r a t o r m u s t d e t e r m i n e t h e
cause of the error and take corrective action.
I f a m a s t e r d i r e c t o r y m o d i fi c a t i o n r u n i n v o l v e s
adding or deleting information for schemas or
areas, the schema and area identifications can be
changed by the DBMSTRD utility. When schema and
a r e a i d e n t i fi c a t i o n s c h a n g e , a l l l o g a n d r e c o v e r y
fi l e s c o n t a i n i n g t h e o l d s c h e m a a n d a r e a i d e n t i fi
cations become invalid. The data base should be
dumped so that a current backup copy can be ob
t a i n e d a n d a l l l o g fi l e s s h o u l d b e r e i n i t i a l i z e d .
If a data base is restructured, schema and area
i d e n t i fi c a t i o n s a r e c h a n g e d a l s o a n d t h e s a m e
procedure should be followed.

Log Record Header
The log record header, shown in figure 9-12, holds
information such as the record type code (one of
the twelve possible log record types); the direc
tive code (one of the operations that caused the
log record to be generated); the length of the
trailer; the version name; and the schema, area,
and user identifications.

Journal Log File Structure

r

The journal log file is a CRM Basic Access Methods
sequential (SQ) file with record type T (trailer)
and block type C (character count). The journal
log file to which CDCS logs during execution-time
processing is partitioned; an end-of-record is

An abbreviated description of the header is
included in the description of each log record type.

59
Unused

Unused

Unused

D
C

Schema Identification

Area Identification

Version Name

Unused

Job Identification

Unused

U
C

User Identification
Date

Unused

KL

Time

Figure 9-12. Log Record Header (Sheet 1 of 2)

j0@**\

60485200 E

9-17

Length in
Characters Description
1

Unused.

1 T: L o g r e c o r d t y p e c o d e ; t h e a p p l i c a b l e c o d e s a n d t h e i r i n t e r p r e t a t i o n s a r e a s
follows:
A
B
C
F
1
2
1

Begin transaction log record 3 Before image log record
Commit transaction log record 4 After image log record
Drop transaction log record 5 Close log record
Version change log record 6 Invoke log record
Open
log
record
7
Te r m i n a t e
log
record
Privacy breach log record 8 Recovery point log record

Unused.

1 DC: Directive code; the applicable codes and their interpretations are as follows:
A
B
D
E
F
Z

Open for retrieval
Open for update
Write \ Codes applicable for log record types 1,3, and 4.
Rewrite
Delete
Filler code / Code applicable for all other log record types.

6 L: The number of characters in the trailer portion of the log record. The number is
r i g h t j u s t i fi e d ; l e a d i n g u n u s e d p o s i t i o n s a r e z e r o fi l l e d .
2

Unused.

4 S c h e m a I d e n t i fi c a t i o n : T h e 4 - d i g i t s c h e m a i d e n t i fi c a t i o n n u m b e r a s s i g n e d b y t h e
DBMSTRD utility. The number is right justified; leading unused positions are zero
fi l l e d .
4 A r e a I d e n t i fi c a t i o n : T h e 4 - d i g i t a r e a i d e n t i fi c a t i o n n u m b e r a s s i g n e d b y t h e D B M S T R D
u t i l i t y. T h e n u m b e r i s r i g h t j u s t i fi e d ; l e a d i n g u n u s e d p o s i t i o n s a r e z e r o fi l l e d .
The field is set to display code zeros if the record does not concern a particular
area.
7 Ve r s i o n N a m e : T h e 1 - t o 7 - c h a r a c t e r v e r s i o n n a m e . T h e n a m e i s l e f t j u s t i fi e d i n t h e
fi e l d ; u n u s e d p o s i t i o n s a r e b l a n k fi l l e d .
3

Unused.

7 J o b i d e n t i fi c a t i o n : T h e j o b n a m e a s s i g n e d b y N O S / B E , o r t h e 4 - c h a r a c t e r j o b s e q u e n c e
number assigned by NOS. The identifier is left justified in the word; unused posi
t i o n s a r e b l a n k fi l l e d .
2

Unused.

1 UC: For log record types 3 and 4, the number of unused characters at the end of the
record; for all other log record types, display code zero.
1 0 U s e r i d e n t i fi c a t i o n : T h e p r o g r a m i d e n t i fi c a t i o n s u p p l i e d b y t h e a p p l i c a t i o n p r o g r a m .
5 D a t e : T h e d a t e o f t h e l o g e n t r y i n J u l i a n f o r m a t y y d d d w h e r e t h e fi r s t t w o d i g i t s
indicate the year, and the last three digits indicate the number of the day in the
y e a r.
2

Unused.

3 KL: For log record types 3 and 4, the number indicating the length of the record key;
for all other log record types, display code zeros. The number is right justified;
leading unused positions are zero filled.
1 0 Ti m e : T h e t i m e o f t h e l o g e n t r y i n h o u r s , m i n u t e s , a n d s e c o n d s i n t h e f o r m a t
Ahh.mm.ss. where the first character is a blank.
Figure 9-12. Log Record Header (Sheet 2 of 2)

9-18

60485200

B

Transaction Log Record

59
yf^^V

The transaction log record is written when an
application program begins, commits, or drops a
t r a n s a c t i o n . T h e r e c o r d f o r m a t , s h o w n i n fi g u r e
9-13, is the same for each of these operations
except for the log record type code, which indi
cates the operation performed.

59
70

Log Record Header

10

Tr a n s a c t i o n I d e n t i fi e r

10

R e s t a r t I d e n t i fi e r

70

Log Record Header

30

Schema Name

30

Subschema Name

Length in
Characters

70

Description
Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:
T F or 6 as follows: F for a
version change log record; 6
for an invoke log record.
DC Z
L 000060
UC 0
KL 000

Length in
Characters Description

70

Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:
T A, B, or C as follows: A for
a begin transaction log
record; B for a commit
transaction log record; C
for a drop transaction
log record.
DC Z
L 000020
UC 0
KL 000

10

Contains the 1- to 10-character
t r a n s a c t i o n i d e n t i fi e r a s s i g n e d b y
t h e u s e r . T h e i d e n t i fi e r i s l e f t
j u s t i fi e d i n t h e fi e l d ; u n u s e d
p o s i t i o n s a r e b l a n k fi l l e d .

10

Contains the 1- to 10-character
restart identifier assigned by CDCS.
T h e i d e n t i fi e r i s l e f t j u s t i fi e d i n
the field; unused positions are
b l a n k fi l l e d .
Figure 9-13. Transaction Log Record

30

Schema name: Contains the 1through 30-character schema name.
The name is left justified in the
field; unused positions are blank
fi l l e d .

30

Subschema name: Contains the 1through 30-character subschema name.
The name is left justified in the
field; unused positions are blank
fi l l e d .
Figure 9-14. Invoke and Version
Change Log Record

Open Log Record
The open log record, shown
written when an application
open operation on the area.

i n fi g u r e 9 - 1 5 ,
program performs

is
an

Invoke or Version Change Log Record
Privacy Breach Log Record
The Invoke or version change log record is written
when an application program begins interaction with
CDCS and when an application program specifies the
use of a new data base version. The record format,
shown in figure 9-14, is the same for both opera
tions except for the log record type code, which
indicates the operation performed.

60485200 A

The privacy breach log record is written to the
journal log file when a user attempts to access an
area but has failed to provide the appropriate
access control key (privacy key). The log record
includes the information shown in figure 9-16.

9-19

59

59
70

Log Record Header

30

Area Name

70

Log Record Header

10

DT

Un
used

Reserved

30
Length in
Characters

70

Description

30

Subschema Name

Log record header: Contains fields
as described in figure 9-12. Par
ticular fields contain values as
follows:

30

Area Name

T 1
DC A or B as follows: A for
open for retrieval; B for
open for update.
L 000030
UC 0
KL 000

30

Schema Name

Length in
Characters Description

70

Area name: Contains the 1- through
30-character area name. The name is
left justified in the field; unused
positions are blank filled.

T
2
DC Z
L 000100
UC 0
KL 000

Figure 9-15. Open Log Record

DT; contains a code indicating the
breach data type on which the breach
attempt occured. The only appli
cable code is A, which indicates the
area data type.

Before-image and After-image Log Records
The before-image and after-image log records are
written in response to an operation that updates
the data base. The record format, shown in figure
9-17, is the same for both types of records except
for the log record type code, which indicates the
kind of record that was written. This is the only
l o g r e c o r d t h a t c a n c o n t a i n fi e l d s t h a t a r e n o t
display code; the record image portion of the
record conforms to the schema description of the
record.

1

Unused.

8

Reserved.

30

Schema name: Contains the 1through 30-character schema name.
The name is left justified in the
field; unused positions are blank
fi l l e d .

30

Subschema name: Contains the 1through 30-character subschema name.
The name is left justified in the
field; unused positions are blank
fi l l e d .

30

Area name: Contains the 1- through
30-character area name. The name is
l e f t j u s t i fi e d i n t h e fi e l d ; u n u s e d
p o s i t i o n s a r e b l a n k fi l l e d .

Close Log Record
T h e c l o s e l o g r e c o r d , s h o w n i n fi g u r e 9 - 1 8 , i s
written when an application program performs a
close operation on the area.
Terminate Log Record
The terminate log record is written when an appli
cation program terminates interaction with CDCS.
The format of the terminate log record is shown in
figure 9-19.

9-20

Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:

Figure 9-16. Privacy Breach Log Record

60485200 A

r ^ * ^ \

/$P^V

59

59

70

Log Record Header

70

Log Record Header

k+k'

Record Key

30

Area Name

m+m'

Record Image

10

Number of Reads

10

Number of Writes

10

Number of Rewrites

10

Number of Deletes

Length in
Characters Description

70

Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:
T 3 or 4 as follows: 3 for a
before image log record; 4
for an after image log
record.
L n where n is the sum of
k+k'+m+m1; these quantities
a r e i d e n t i fi e d i n t h e
description of the record
key and record image fields.
UC m' where m' is number of
characters added to the end
of the data base record to
make the length (in char
acters) of the log record a
multiple of 10.
KL k where k is the number of
characters defined (in the
schema definition) for the
record key.

k+k'

m+m'

Record key: Contains the primary
key of the record and characters
added to the end of the key to make
number of characters in the field
equal to a multiple of 10; k repre
sents the length in characters of the
key; k' represents the number of
characters added. If k is a multi
ple of 10, k' equals 0.
Record image: Contains the image of
the data base record (as defined in
the schema) and a number of char
acters added to the end of the record
to make the number of characters in
the field equal to a multiple of 10;
m represents the length in characters
of the record; m' represents the
number of characters added. If m is
a multiple of 10, m' equals 0.

Length in
Characters Description

70

Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:
T
5
DC Z
L 000070
UC 0
KL 000

30

Area name: Contains the 1- through
30-character area name. The name is
l e f t j u s t i fi e d i n t h e fi e l d ; u n u s e d
p o s i t i o n s a r e b l a n k fi l l e d .

10

Number of reads by the user: The
n u m b e r i s r i g h t j u s t i fi e d i n t h e
field; leading unused positions are
z e r o fi l l e d .

10

Number of writes by the user: The
n u m b e r i s r i g h t j u s t i fi e d i n t h e
field; leading unused positions are
z e r o fi l l e d .

10

Number of rewrites by the user: The
n u m b e r i s r i g h t j u s t i fi e d i n t h e
field; leading unused positions are
z e r o fi l l e d .

10

Number of deletes by the user: The
n u m b e r i s r i g h t j u s t i fi e d i n t h e
field; leading unused positions are
z e r o fi l l e d .
Figure 9-18. Close Log Record

Figure 9-17. Before Image and After Image
Log Records

60485200 A

9-21

Recovery Point Log Record

59
70

Log Record Header
Z/

£

30

Schema Name

30

Subschema Name

T h e r e c o v e r y p o i n t l o g r e c o r d , s h o w n i n fi g u r e
9-20, is written whenever a recovery point is
requested by an application program or whenever
CDCS generates an internal recovery point.

59

10

Total Number of Reads

10

Total Number of Writes

10

Total Number of Rewrites

10

Total Number of Deletes

10

Unused

70

Log Record Header

10

Recovery Point Number

30

User Text

Length in
Characters Description

70
Len gth in
Cha racters

70

Description
Log record header: Contains fields
as described in figure 9-12. Par
ticular fields contain values as
follows:
T 7
DC Z
L 000110
UC 0
KL 000

30

Schema name: Contains the 1- through
30-character schema name. The name
is left justified in the field;
unused positions are blank filled.

30

Subschema name: Contains the 1through 30-character subschema name.
The name is left justified in the
field; unused positions are blank
fi l l e d .

10

Total number of reads by the user:
The number is right justified in the
field; leading unused positions are
zero filled.

10

Total number of writes by the user:
The number is right justified in the
field; leading unused positions are
zero filled.

10

Total number of rewrites by the
user: The number is right justified
in the field; leading unused posi
tions are zero filled.

10

10

Log record header: Contains fields
as described in figure 9-12. Par
t i c u l a r fi e l d s c o n t a i n v a l u e s a s
follows:
T
8
DC Z
L 000040
UC 0
KL 000

10

Recovery point number: The number,
which is assigned by CDCS, is right
j u s t i fi e d i n t h e fi e l d ; l e a d i n g
unused positions are zero filled.

30

User text: Contains the 1- through
30-character user-supplied text from
the call to DBSRPT routine. The text
i s l e f t j u s t i fi e d i n t h e fi e l d ;
unused positions are blank filled.

Figure 9-20. Recovery Point Log Record

QUICK RECOVERY FILE
The quick recovery file is assigned on a per-schema
b a s i s w h e n s p e c i fi e d i n a c l a u s e i n t h e s o u r c e
i n p u t f o r t h e m a s t e r d i r e c t o r y. I f l o g g i n g t o a
quick recovery file is specified in the schema and
the quick recovery file is not available, no access
to any area of the schema is allowed. The follow
ing rules apply to the quick recovery file.
File must be a permanent file.
File must be initialized before use. The DBREC
u t i l i t y c a n b e u s e d t o i n i t i a l i z e t h e fi l e .
File cannot be shared among schemas.

Total number of deletes by the user:
The number is right justified in the
field; leading unused positions are
zero filled.
Unused: Contains zeros.

When a quick recovery file is used, it is automat
ically attached at CDCS initialization time,
returned, and automatically reattached for requests
to use the schema. It is automatically returned
when the schema is not being used and when CDCS
system control point execution is terminated.

Figure 9-19. Terminate Log Record

9-22

60485200 A

A l t h o u g h t h e q u i c k r e c o v e r y fi l e i s s p e c i fi e d o n a
s c h e m a b a s i s i n t h e m a s t e r d i r e c t o r y, l o g g i n g t o
t h a t fi l e m u s t a l s o b e s e l e c t e d f o r e a c h a r e a o f
e a c h v e r s i o n t o w h i c h i t a p p l i e s . To s e l e c t l o g
ging for an area, the logging option BEFORE IMAGE
BLOCKS must be specified for the area in the master
d i r e c t o r y.

10

Restart Identifier

10

Current Date

The log processing module writes before-image
blocks to the quick recovery file before an area is
updated if logging of before-image blocks has been
specified for the area.

10

Current Time

10

Job Name

T h e s i z e l i m i t o f t h e q u i c k r e c o v e r y fi l e i s
adhered to by CDCS. When the quick recovery file
is full, CDCS initiates a recovery point which
causes the updated data base blocks for all areas
in the schema to be force written, the quick
r e c o v e r y fi l e f o r t h e s c h e m a t o b e e m p t i e d o f
before-image blocks, and a recovery point log
r e c o r d t o b e w r i t t e n o n t h e j o u r n a l l o g fi l e i f a
journal log file is specified for the schema.

10

User Identification

10

Transaction Identifier

The quick recovery file is composed of information
and blocks for internal use by CDCS. The data
administrator need not be concerned with the actual
s t r u c t u r e o f t h e fi l e , b u t , a s t h e fi r s t s t e p i n
manual recovery from a system failure, should
ensure that the contents of the quick recovery file
are applied to the data base by calling the DBQRFA
utility. If DBQRFA is not used, CDCS automatically
a p p l i e s t h e c o n t e n t s o f t h e q u i c k r e c o v e r y fi l e t o
the data base the next time CDCS is initialized.
If schema and area identifications change because a
m a s t e r d i r e c t o r y i s m o d i fi e d , t h e q u i c k r e c o v e r y
fi l e m u s t b e r e i n i t i a l i z e d .

RESTART IDENTIFIER FILE
T h e r e s t a r t i d e n t i fi e r fi l e i s a s s i g n e d o n a
per-schema basis when specified in a clause in the
s o u r c e i n p u t f o r t h e m a s t e r d i r e c t o r y. I f l o g g i n g
t o a r e s t a r t i d e n t i fi e r fi l e i s s p e c i fi e d f o r t h e
s c h e m a a n d t h e r e s t a r t i d e n t i fi e r fi l e i s n o t
available, no access to any area of the schema is
allowed. The following rules apply to the restart
i d e n t i fi e r fi l e .
File must be a random permanent file.
File must be initialized by the DBREC utility
before use.
Only one file can be assigned to a schema.
File cannot be shared among schemas.
W h e n a r e s t a r t i d e n t i fi e r fi l e i s u s e d , i t i s
automatically attached at CDCS initialization time,
returned, and automatically reattached for requests
to use the schema. It Is automatically returned
when the schema is not being used and when CDCS
system control point execution is terminated.

x^fcv

59

T h e r e s t a r t i d e n t i fi e r fi l e i s a n i n d e x e d s e q u e n
tial (IS) file whose primary key is the 10-character
r e s t a r t i d e n t i fi e r . E a c h r e c o r d i n t h e r e s t a r t
identifier is 6 words (60 characters) long and has
the format shown in figure 9-21.

60485200 A

Length in
Characters Description
1 0 R e s t a r t i d e n t i fi e r : C o n t a i n s t h e 1 t o 1 0 - c h a r a c t e r r e s t a r t i d e n t i fi e r,
w h i c h i s l e f t j u s t i fi e d i n t h e fi e l d ;
unused positions are blank filled.
This field is the primary record key
o f t h e r e s t a r t i d e n t i fi e r fi l e .
10 Current date: Contains the current
date. The format of the current date
is dependent on the format specified
for the operating system at instal
lation time.
10 Current time: Contains the current
time. The format of the current time
is dependent on the format specified
for the operating system at instal
lation time.
1 0 J o b n a m e : C o n t a i n s t h e fi r s t 7
characters of the job name assigned
by NOS/BE, or the 4-character job
sequence number assigned by NOS. The
j o b n a m e i s l e f t j u s t i fi e d i n t h e
field; unused positions are blank
fi l l e d .
1 0 U s e r i d e n t i fi c a t i o n : C o n t a i n s t h e
1 0 - c h a r a c t e r p r o g r a m i d e n t i fi c a t i o n
supplied by the application program.
T h e u s e r i d e n t i fi c a t i o n i s l e f t
j u s t i fi e d i n t h e fi e l d ; u n u s e d p o s i
t i o n s a r e b l a n k fi l l e d .
1 0 T r a n s a c t i o n i d e n t i fi e r : C o n t a i n s t h e
1 - to 1 0 - c h a r a c te r tr a n s a ction
i d e n t i fi e r , w h i c h i s l e f t j u s t i fi e d
in the field; unused positions are
b l a n k fi l l e d .
F i g u r e 9 - 2 1 . R e s t a r t I d e n t i fi e r F i l e
Record Format
A n e w r e c o r d i s w r i t t e n t o t h e r e s t a r t i d e n t i fi e r
file when an application program requests a restart
i d e n t i fi e r . T h e r e c o r d i s u p d a t e d e a c h t i m e t h e
application program commits a transaction. The
r e c o r d i s r e t a i n e d i n t h e r e s t a r t i d e n t i fi e r fi l e
until the application program associated with the
r e s t a r t i d e n t i fi e r t e r m i n a t e s n o r m a l l y.

9-23

A data administrator might want to read the restart
i d e n t i fi e r fi l e t o d e t e r m i n e t h e n u m b e r o f a p p l i c a
tion programs tha t t e r m i n a t e a b n o r m a l l y a n d h a v e
n o t b e e n r e a s s i g n e d t h e r e s t a r t i d e n t i fi e r i n a
restart operation.
I f t h e r e s t a r t i d e n t i fi e r fi l e b e c o m e s v e r y l a r g e ,
the data administrator should purge and reinitial
i z e t h e fi l e ; h o w e v e r , p u r g i n g t h e fi l e c o u l d
impact the restart of some application programs.
I f t h e t r a n s a c t i o n r e c o v e r y fi l e i s r e i n i t i a l i z e d ,
t h e r e s t a r t i d e n t i fi e r fi l e s h o u l d a l s o b e r e i n i t i
alized. If not, CDCS could get a CRM error when
CDCS accesses the restart identifier file.

TRANSACTION RECOVERY FILE
T h e t r a n s a c t i o n r e c o v e r y fi l e i s a s s i g n e d o n a
per-schema basis when specified in a clause in the
s o u r c e i n p u t f o r t h e m a s t e r d i r e c t o r y. I f l o g g i n g
t o a t r a n s a c t i o n r e c o v e r y fi l e i s s p e c i fi e d i n t h e
s c h e m a a n d t h e t r a n s a c t i o n r e c o v e r y fi l e i s n o t
available, no access to any area of the schema is
allowed. The following rules apply to the trans
a c t i o n r e c o v e r y fi l e .
File must be a random permanent file.
File must be initialized by the DBREC utility
before use*
Only one file can be designated per schema.
File cannot be shared among schemas.
W h e n a t r a n s a c t i o n r e c o v e r y fi l e i s u s e d , i t i s
automatically attached at CDCS initialization time,
returned, and automatically reattached for requests
to use the schema. It is automatically returned
when the schema is not being used and when CDCS
system control point execution is terminated.
T h e t r a n s a c t i o n r e c o v e r y fi l e c o n t a i n s t h e b e f o r e image records of the records updated during
execution of a particular transaction. If the
transaction is not completed, the records In this
fi l e a r e a u t o m a t i c a l l y a p p l i e d t o t h e d a t a b a s e
fi l e s t o r e s t o r e t h e a f f e c t e d r e c o r d s t o t h e s t a t e
they were in just before the beginning of the
transaction.
If schema and area identifications change because a
m a s t e r d i r e c t o r y i s m o d i fi e d , t h e t r a n s a c t i o n
r e c o v e r y fi l e m u s t b e r e i n i t i a l i z e d b y t h e D B R E C
u t i l i t y.

JOURNAL LOG FILE REPORT GENERATION
Reports can be generated from records in the
j o u r n a l l o g fi l e . T h e r e c o r d s p r o v i d e a h i s t o r i c a l
record of users' access to data base files and are
a source of statistical information about data base
use. A log record is generated each time an
update, write, or delete operation occurs on an
area for which logging of before- or after-image
records has been selected. In addition, a log
record is generated for each of the following
o p e r a t i o n s i f a j o u r n a l l o g fi l e h a s b e e n s p e c i fi e d
for the schema: begin transaction, commit trans
action, drop transaction, version change, open,

9-24

close, privacy breach, invoke, terminate, and
recovery point. The close log record contains
information on the number of times records in an
area have been read, written, rewritten, and
d e l e t e d b y a p a r t i c u l a r u s e r . Te r m i n a t e l o g
records contain summary counts for all activities
on all areas accessed by the user.

/rfEjN

By using FORM, Query Update, or a COBOL program to
r e a d t h e j o u r n a l l o g fi l e a n d c r e a t e a l o g r e p o r t ,
t h e c o n t e n t s o f t h e j o u r n a l l o g fi l e c a n b e
examined and the state of the data base can be
determined before beginning a recovery or restora
tion sequence. Reports consisting of information
by area, user, time, record type, or a combination
of these can be generated.
If Query Update is used to generate a report, the
journal log file should be described with the Query
Update DESCRIBE directive. Then a formatted log
report can be prepared from the data in the journal
l o g fi l e u s i n g Q u e r y U p d a t e r e p o r t p r e p a r a t i o n
facilities. The prepared report can be examined at
a terminal or it can be printed. The Query Update
r e f e r e n c e m a n u a l c o n t a i n s s p e c i fi c i n f o r m a t i o n o n
describing files and generating reports.
FORM, a general-purpose file management utility for
m a n i p u l a t i n g r e c o r d s a n d c o n v e r t i n g fi l e s , c a n b e
u s e d t o p r i n t t h e j o u r n a l l o g fi l e . F o r m a t o p t i o n s
can be selected. The information needed to use
this utility is located in the FORM reference
manual.
A log report can also be produced through the use
of COBOL. A COBOL program can be written to
extract and format the pertinent information in the
j o u r n a l l o g fi l e . R o u t i n e s c a n b e w r i t t e n t o
format report pages, or the Report Writer state
ments can be employed to define a report format and
to generate the log report. The COBOL reference
manual gives information on report generation
through the Report Writer.

RECOVERY CONSIDERATIONS
Selection of the log files for recovery purposes is
dependent on a number of factors, such as the
sensitivity of the data to loss, available mass
s t o r a g e , s y s t e m s t a b i l i t y, a n d p e r f o r m a n c e c o n s i
d e r a t i o n s . M a x i m u m b e n e fi t i s a c h i e v e d w h e n t h e
full complement of log files and logging options is
s e l e c t e d ; h o w e v e r , t h e r e c a n b e a s i g n i fi c a n t
penalty in terms of performance for some applica
tion environments. The data administrator must
consider the available trade-offs when implementing
the recovery strategy for a data base.
Backup data base files generated by dumps of the
d a t a fi l e s a r e r e q u i r e d f o r s o m e r e c o v e r y s t r a t e
gies. The data administrator must determine which
fi l e s r e q u i r e b a c k u p d u m p s a n d t h e f r e q u e n c y t h e
dumps should be taken.
CDCS achieves coordination of logging to the trans
a c t i o n r e c o v e r y fi l e , q u i c k r e c o v e r y fi l e , a n d
j o u r n a l fi l e a l o n g w i t h w r i t i n g u p d a t e s t o d a t a
b a s e fi l e s t h r o u g h r e c o v e r y p o i n t s . T h e r e f o r e , a n
understanding of the sequence of events at recovery
points can help the data administrator select
appropriate logging options for the particular data
base environment.

60485200 A

>*^sV

RECOVERY POINTS
/pt*\

A recovery point is a point in data base processing
to which recovery can be carried with no loss of
data. Recovery points are either system-generated
or user-generated.
System-generated recovery points are initiated when
particular events occur in processing; some of
these events are mentioned in the following dis
cussion.

T h e j o u r n a l l o g fi l e r e c o r d h e a d e r i s r e w r i t t e n
with the recovery point number and location of
the new recovery point log record.
T h e f o l l o w i n g e v e n t s i n i t i a t e a j o u r n a l l o g fi l e
recovery point:
A user request for a recovery point
The termination of a user from CDCS
A f u l l - fi l e c o n d i t i o n f o r t h e j o u r n a l l o g fi l e

y$s5S\

User-generated recovery points are initiated by a
direct call to the DB$RPT routine from a user
program. Each application programming language is
provided with a mechanism for calling this routine;
refer to the CDCS 2 Application Programming refer
ence manual for further information. For recovery
purposes, the use of data base transactions are
recommended for application programs rather than
user-generated recovery points. The creation of a
recovery point does incur system overhead, since
CDCS activity halts for some users until recovery
point processing is completed. Overuse of usergenerated recovery points can severely decrease
thro ughput.

A f u l l - fi l e c o n d i t i o n o f t h e q u i c k r e c o v e r y fi l e

Recovery Point Processing
With No Log Files
Recovery point processing is automatically per
formed by CDCS if no journal log or quick recovery
fi l e i s u s e d . A t a n y e v e n t t h a t w o u l d c a u s e a
j o u r n a l l o g fi l e r e c o v e r y p o i n t , t h e C R M d a t a fi l e
b u ff e r s a r e f o r c e w r i t t e n t o d i s k .

Recovery points occur on both the quick recovery
a n d j o u r n a l l o g fi l e s .

LOGGING OPTIONS

Quick Recovery File Recovery Points

L o g fi l e s p r o v i d e c a p a b i l i t i e s f o r b o t h a u t o m a t i c
a n d m a n u a l r e c o v e r y. T h e d a t a a d m i n i s t r a t o r m u s t
consider strategies for manual recovery along with
requirements for automatic recovery when selecting
logging options.

The following events occur at a quick recovery file
recovery point:
CRM data file buffers are force written to disk.
T h e q u i c k r e c o v e r y fi l e i s r e i n i t i a l i z e d a s a n
e m p t y fi l e .
No recovery point number is assigned for a quick
r e c o v e r y fi l e r e c o v e r y p o i n t .
T h e f o l l o w i n g e v e n t s i n i t i a t e a q u i c k r e c o v e r y fi l e
recovery point:
A j o u r n a l l o g fi l e r e c o v e r y p o i n t .
A user request to commit a transaction.

Logging to the Transaction Recovery File
L o g g i n g t o t h i s fi l e m u s t b e s e l e c t e d t o u s e t h e
facilities of automatic recovery and to provide for
data base transactions being performed by applica
tion programs.
Selection of this option guarantees recovery of the
a f f e c t e d d a t a b a s e fi l e s t o t h e l a s t c o m m i t t e d
transaction before a failure. This guarantee
a s s u m e s t h a t t h e d a t a fi l e i s u s a b l e a f t e r t h e
failure so that automatic recovery can perform
recovery operations.

The end of CDCS automatic recovery operations.

Logging to the Restart Identifier File

A n y e v e n t t h a t w o u l d c a u s e a j o u r n a l l o g fi l e
r e c o v e r y p o i n t , i f t h e r e i s n o j o u r n a l l o g fi l e
assigned for the schema.

Logging to this file must be selected for COBOL and
F O RT R A N a p p l i c a t i o n p r o g r a m s t o b e p ro vi d e d th e
restart capability of determining the last commit
ted transaction before a failure. If logging to
t h i s fi l e i s s e l e c t e d , l o g g i n g t o t h e t r a n s a c t i o n
recovery file must also be selected.

A f t e r a q u i c k r e c o v e r y fi l e r e c o v e r y p o i n t , t h e
d a t a b a s e fi l e s a r e i n a c o n s i s t e n t s t a t e b e c a u s e
all data base updates have been force written to
disk.

Logging to the Quick Recovery File
Journal Log File Recovery Point
T h e f o l l o w i n g e v e n t s o c c u r a t a j o u r n a l l o g fi l e
recovery point:
A quick recovery file recovery point is forced.
A recovery point number is assigned and a
recovery point record logged.

60485200 A

The purpose of the quick recovery file is to permit
t h e r e c o v e r y o f a d a t a b a s e fi l e a f t e r s y s t e m
failure has occurred while CRM was in the process
o f u p d a t i n g o n e o f t h e fi l e s . A f a i l u r e c a n l e a v e
a file unusable because of inconsistencies between
i n d e x b l o c k s , d a t a b l o c k s , a n d o t h e r fi l e s t a t u s
b l o c k s . D a t a b a s e fi l e s a r e o n l y r a r e l y l e f t i n a n
u n u s a b l e s t a t e . I f a fi l e i s u n u s a b l e , n o u s e r
a c c e s s t o t h e fi l e i s a l l o w e d .

9-25

I f a q u i c k r e c o v e r y fi l e r e c o v e r y p o i n t o c c u r r e d
j u s t b e f o r e a f a i l u r e , d a t a b a s e fi l e s a r e i n a
consistent state and, therefore, protected from
becoming unusable.
I f q u i c k r e c o v e r y fi l e l o g g i n g i s s e l e c t e d a n d a
d a t a fi l e i s u n u s a b l e a f t e r a f a i l u r e , C D C S c a n
perform automatic recovery at CDCS initialization.
CDCS attaches the quick recovery file and by using
i t s c o n t e n t s r e s t o r e s t h e fi l e t o t h e s t a t e i t w a s
i n a t t h e t i m e o f t h e l a s t q u i c k r e c o v e r y fi l e
recovery point.
Th e c o n s e q u e n c e s o f n o t s e l e c t i n g q u i c k r e c o v e r y
log file logging could be temporary loss of a data
b a s e fi l e . I f t h e d a t a fi l e i s u n u s a b l e , a u t o m a t i c
r e c o v e r y c a n n o t b e p e r f o r m e d o n t h e fi l e a n d n o
s u b s e q u e n t a c c e s s i s a l l o w e d o n t h e fi l e . M a n u a l
recovery must be performed.
A manual recovery strategy can be to select the
after-image record journal logging option. If this
o p t i o n i s s e l e c t e d , a n u n u s a b l e d a t a fi l e c a n b e
r e c o n s t r u c t e d b y u s e o f t h e D B R C N u t i l i t y, w h i c h
a p p l i e s a f t e r - i m a g e r e c o r d s t o a d a t a b a s e fi l e
that has been reloaded from a backup copy of the
d a t a fi l e .
Another consequence of not selecting the quick
r e c o v e r y fi l e o p t i o n c o u l d b e t h e l o s s o f u p d a t e s
made to data base records. Any record updated
outside of a data base transaction since the last
quick recovery file recovery point could be lost.
On a highly stable system with a small data base
that has a high volume of updates, the data admin
istrator could decide not to select logging to a
q u i c k r e c o v e r y fi l e . T h e d a t a b a s e c o u l d s t i l l
occasionally have to be reconstructed using the
DBRCN utility or be reset to its state at the time
o f t h e l a s t s e t o f fi l e d u m p s i f p o w e r o r s y s t e m
f a i l u r e s o c c u r.

Logging After-Image Records
to a Journal Log File

Selection of the after-image record option provides
f o r d a t a b a s e fi l e r e c o n s t r u c t i o n i n t h e e v e n t t h e
data base file is unusable because of some failure
and there is no quick recovery file. This can be a
g o o d m o d e o f o p e r a t i o n o n s t a b l e s y s t e m s with a
small but active data base. File dumps could be
taken frequently to reduce the time of recon
struction.
The consequences of not selecting a quick recovery
fi l e o r j o u r n a l l o g fi l e a f t e r - i m a g e r e c o r d s c o u l d
be the loss of all processing since the last set of
file dumps.

Logging Before-image Records
to a Journal Log File
Before-image records are necessary to restore a
data base to a previous state. Restoration must be
done through manual recovery by use of the DBRST
u t i l i t y. B e f o r e - i m a g e r e c o r d s a r e n o t u s e d b y
automatic recovery. The before-image record option
does not provide for reconstructing a data base.

MANUAL DATA BASE RECOVERY
Manual recovery is usually needed to reconstruct an
u n u s a b l e fi l e o r t o r e v e r s e t h e e f f e c t s o f i n v a l i d
application program logic. These recovery proc
e s s e s c a n n o t b e d o n e a u t o m a t i c a l l y. A u t o m a t i c
recovery performs most of the necessary recovery
tasks that ensure the validity of the data base
following a failure by CDCS, the operating system,
or hardware.
The data base utilities and the logging facilities
provide the tools needed by the data administrator
f o r m a n u a l d a t a b a s e r e c o v e r y. T h e d a t a b a s e
utilities apply selected entries from a journal log
fi l e t o r e c o n s t r u c t o r r e s t o r e o n e o r m o r e d a t a
base areas (and versions, if applicable). The two
utilities, DBRCN and DBRST, perform reconstruction
a n d r e s t o r a t i o n , r e s p e c t i v e l y.

J o u r n a l l o g fi l e a f t e r - i m a g e r e c o r d s a r e r e q u i r e d
t o r e c o n s t r u c t t h e d a t a b a s e fi l e . T h e a f t e r - i m a g e
log records can be used during automatic recovery
o r f o r m a n u a l r e c o v e r y u s i n g t h e D B R C N u t i l i t y.
The after-image record option does not provide for
reversing updates to restore a data base to a
previous state.

DBRCN can recover one or more data base files that
have been lost or damaged. This utility takes
after-image records recorded in the journal log
file and applies them to a data base backup copy
that has been previously dumped.

During automatic recovery when both the quick
r e c o v e r y fi l e a n d t h e j o u r n a l l o g fi l e a f t e r - i m a g e
r e c o r d s a r e l o g g e d f o r a fi l e , C D C S a p p l i e s t h e
c o n t e n t s o f t h e q u i c k r e c o v e r y fi l e t o r e t u r n t h e
fi l e t o t h e s t a t e i t w a s i n a t t h e l a s t q u i c k
r e c o v e r y fi l e r e c o v e r y p o i n t . T h e n C D C S a p p l i e s
t h e a f t e r - i m a g e r e c o r d s o f t h e j o u r n a l l o g fi l e t o
the data file to apply all the updates made to the
fi l e s i n c e t h e l a s t q u i c k r e c o v e r y fi l e r e c o v e r y
point.

DBRST restores a data base to a previous state.
DBRST works from the current data base, applies
b e f o r e - i m a g e r e c o r d s i n t h e j o u r n a l l o g fi l e , a n d
reverses the results of invalid operations per
formed on the data base. When system failure
o c c u r s , t h e q u i c k r e c o v e r y fi l e c o u l d h a v e t o b e
applied (by using the DBQRFA utility) to make the
data base physically processable before DBRST can
be used to restore the data base.

T h e j o u r n a l l o g fi l e a f t e r - i m a g e r e c o r d s a r e n o t
required to guarantee that the data base is updated
with the last committed transaction. All committed
transactions are a part of the data base after any
automatic recovery.

Both reconstruction and restoration can be per
f o r m e d s e l e c t i v e l y b y a r e a , v e r s i o n , u s e r, d a t e ,
and time. Reconstruction or restoration to a
s p e c i fi c r e c o v e r y p o i n t i s a l s o p r o v i d e d b y t h e
utilities.

9-26

60485200 A

RECOVERY CONDITIONS
The recovery sequence chosen by the data adminis
trator is dependent upon the type of failure that
has occurred and the logging techniques employed.
Three examples of recovery from computer and soft
ware failure are given in the following paragraphs.
If all recovery options have been selected, a data
base can be recovered as described.

Physical Storage or Software Failure
When an entire data base and all disk resident log
fi l e s a r e l o s t b e c a u s e o f a d i s k m a l f u n c t i o n o r a
software failure, every update to the data base
s i n c e t h e l a s t j o u r n a l l o g fi l e d u m p i s l o s t . A l l
u p d a t e s p e r f o r m e d b e f o r e t h e l a s t fi l e d u m p a r e
recorded on the journal log file.
T h e fi r s t s t e p t o t a k e f o r r e c o v e r y i s t o e s t a b
lish a data base from the latest set of data base
fi l e d u m p s . T h e n , u s i n g t h e D B R C N u t i l i t y, t h e
. p . a f t e r - i m a g e r e c o r d s o n t h e j o u r n a l l o g fi l e c a n b e
0m^ used to update this data base. This procedure
\ should reconstruct the data base to its previous
state before the last journal log file dump.

Cascade Effect
The cascade effect problem should be considered.
This problem occurs when a user erroneously updates
a data base and another user processes the erron
eous data before the data administrator can initi
ate a restoration sequence to correct the data
base. The restoration utility cannot detect this
problem. This problem can be solved through fore
thought in the way applications are written,
through consi d e r a t i o n o f t h e t i m e o f d a y a t w h i c h
they are executed, and through careful use of the
DBRCN and DBRST utility by the data administrator.
It might be necessary to initiate several consecu
tive executions of these utilities in order to
recover a data base fully.

Program Logic Error
When a previously executed program has been found
t o c o n t a i n a p r o g r a m l o g i c e r r o r, a l l i t s u p d a t e s
to a data base are suspect. Using the DBRST util
ity and the before-image records on the journal log
fi l e f r o m b e f o r e t h e p r o g r a m fi r s t e x e c u t e d , a l l
the incorrect updates can be removed from the data
base.

Some problems are associated with this type of
r e c o v e r y. F i r s t , i f t h e e r r o n e o u s d a t a i n t h i s
data base has been used, the errors may have cas
caded throughout the data base. Second, recovery
is on a record basis. Using the DBRST utility
causes updates to the affected records performed by
other programs to be lost when they may be per
fectly valid. The recovery utilities cannot solve
this problem.

System Failure
If a failure occurs that causes the system to
crash, a data base is still Largely intact. If
block logging is specified, CDCS performs automatic
recovery to ensure the usability of the data base
fi l e s . I f , h o w e v e r , b l o c k l o g g i n g h a s n o t b e e n
s p e c i fi e d f o r a f f e c t e d d a t a b a s e fi l e s a n d t h e
files are determined by CRM to be unprocessable,
t h e d a t a b a s e fi l e s m u s t b e r e l o a d e d f r o m fi l e
dumps and reconstructed if after-image records are
available.

RECOVERY FROM RECOVERY FAILURES
When the DBRST or DBRCN utility does not terminate
normally, several options are available to the data
a d m i n i s t r a t o r.
If the recovery failure was not caused by media
f a i l u r e o n t h e l o g fi l e o r t h e d a t a b a s e , t h e d a t a
administrator can rerun the utility provided the
following conditions are met:
The same input parameters are used.
The original journal log file is used as input.
B l o c k l o g g i n g t o t h e q u i c k r e c o v e r y fi l e w a s
s p e c i fi e d f o r t h e s c h e m a a n d f o r t h e a ff e c t e d
d a t a b a s e fi l e s .
If the NL parameter in the utility control state
m e n t w a s s p e c i fi e d , a n e w l o g fi l e i s g e n e r a t e d
during the new recovery run, but it will contain
only records for updates that were successfully
performed in the previous recovery run. DBRST
could be run to remove updates logged during the
utility run that aborted but need not be run if the
recovery run is to be repeated.
If the failure was caused by or resulted in media
failure, the data base must be reconstructed by
DBRCN from file dumps and journal log files. Then,
i f t h e l o g fi l e s a r e i n t a c t f r o m t h e o r i g i n a l r u n ,
the original recovery run can be performed if
necessary.

y^S-\

60485200 A

9-27

DATA ADMINISTRATOR AND OPERATING
SYSTEM PROCEDURES

10

rrrw ■■»r~-—
Data administration is a major concept in the data
base environment. The data administrator is a
person or group in a user installation responsible
f o r d e fi n i n g t h e d a t a b a s e s , d e t e r m i n i n g w h o h a s
access to them, ensuring data base security and
integrity, and managing the execution of CDCS.
The data administrator prepares the initialization
procedures for CYBER Database Control System (CDCS)
a n d d e fi n e s t h e s y s t e m p r o c e d u r e fi l e u s e d i n
initializing the system. Accounting charges for
CDCS usage and data base input/output can be
adjusted subject to the data administrator's dis
cretion. This section details CDCS initialization
and provides information the data administrator
needs to establish operating procedures.
This section also indicates the data administra
tor's responsibilities and concerns in overseeing
t h e d a t a b a s e e n v i r o n m e n t . F o r a n o v e r v i e w, t h e
sequence of operations involved in establishing an
a c t i v e d a t a b a s e e n v i r o n m e n t i s s h o w n i n fi g u r e
10-1. The operations are shown along with result
i n g fi l e s a n d d i r e c t o r i e s . ( T h e o p e r a t i o n s p e r
formed by the data administrator are shaded.) An
arrow indicates direct information transfer from
the directory to the next unit. Files or direc
tories shown above an operation need to be present
f o r t h e o p e r a t i o n . H o w e v e r, p a r t i c u l a r d a t a b a s e
files need not be available for CDCS to be either
initialized or active. If a particular data base
fi l e i s n o t a v a i l a b l e , r u n - u n i t s t h a t r e q u i r e t h e
fi l e c a n n o t e x e c u t e . S i m i l a r l y, i f l o g o r r e c o v e r y
files and a data base procedure library are speci
fied for a schema but the files are not available,
a run-unit cannot invoke a subschema based on that
schema because of unavailable files.

DATA ADMINISTRATORS
RESPONSIBILITIES
The data administrator should be concerned with the
following aspects of the data management system:
CDCS operational environment, including the
console operator Interface

Application program interface
System accounting
Information about many of these aspects is con
tained in other sections of this manual: the
schema (section 2), subschemas (sections 3 and 4),
master directory (section 8), data base procedures
(section 7), and data base recovery (section 9).
The CDCS environment is discussed in section 1
where processing flow, CDCS loading and execution,
and the system control point concept are described.
Additional information is contained in this section
a n d i n a p p e n d i x G , w h i c h d e t a i l s fi e l d l e n g t h
requirements for CDCS and the data base utilities.
P r o b l e m s a s s o c i a t e d w i t h i n a d e q u a t e fi e L d l e n g t h
are discussed also. The CDCS Batch Test Facility,
which allows CDCS and an application program to be
run at the same control point, is described in the
CDCS 2 Application Programming reference manual.
Data base files are described in sections 1 and 6;
h o w e v e r, a d d i t i o n a l i n f o r m a t i o n a b o u t p r i v a c y o f
data base files and about the CYBER Record Manager
(CRM) interface appears later in this section.

SYSTEM LIMITATIONS
System limitations imposed by the Data Description
Language (DDL) limit to 4095 each the number of
areas, records, items in a record, relations in a
schema, constraints in a schema, or versions for a
schema. In practice, the number of items in a
record is smaller because of the presence of
variable length subentries. The number of these
entries that can be declared in a subschema is a
function of DDL and CDCS internal table require
ments. The number that can be accommodated,
h o w e v e r, s h o u l d b e a d e q u a t e f o r a l l p r a c t i c a l
cases. Another limit imposed by DDL concerns data
base procedures: a maximum of 600 unique data base
procedures is permitted in a schema.

DATA PRIVACY
Data privacy can be maintained by features of CDCS
a n d b y fi l e s e c u r i t y f e a t u r e s o f t h e o p e r a t i n g
system. It is the responsibility of the data
administrator to implement the use of privacy
features.

Field length requirements for CDCS
Data base files

Privacy (Access Control) Checking

Data base procedures

CDCS supports two types of privacy (access control)
checking. The data administrator can supply a data
base procedure for privacy checking, or access
control locks can be declared in the schema for use
i n a u t o m a t i c a c c e s s v a l i d a t i o n b y C D CS. Checking
of access control keys against lock values by CDCS
has the advantages of simplicity, ease of implemen
tation, and better performance. Access control
locks are encrypted, which provides additional
s e c u r i t y. T h i s f e a t u r e i s n o t a v a i l a b l e i f d a t a
base procedures are used for privacy checking.

Schema, subschema, and master directory crea
tion and maintenance
Data base recovery, including log and recovery
fi l e s
System limitations
Data privacy

60485200 A

10-1

Sequence

Establish permanent files that correspond to data base areas.
To execute user programs, files required by subschema and versions
soused must be available. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^i^Ji^a

Generate data base procedures.
Create data base procedure library

Data
Base
Files

Data Base
Prodedure
(Library File)

Schema
Directory

Query
Update
Subschema
Directories,

^Subschemas?

Master
Directory

Operation by Data
Administrator

■S ^ a L i z e ^
gRecovery^

Log and
Recovery
Files

Any other
operation
CDCS
Active

Compile
COBOL
Programs

Preprocess
and Compile
FORTRAN
Programs

-^

Binary
File

Execute
Program

Binary
File

Execute
Program

Use
Query
Update
>H

Figure 10-1. Sequence of Operations to Establish an Active Data Base Environment
10-2

60485200 A

JSP&V

Access control locks provide privacy at the area
level. The ACCESS-CONTROL clause in the schema
s p e c i fi e s t h e a c c e s s c o n t r o l l o c k s t h a t a p p l y t o
the use of an area. At execution time, the appli
cations program must supply the appropriate access
control key (also called privacy key) to gain
access to a given area. If data base versions
a P P l y > t h e s a m e a c c e s s c o n t r o l l o c k i s i n e ff e c t
for the same area of each version.
Data base procedures for privacy checking are most
useful for controlling access based on a program's
j o b i d e n t i fi c a t i o n , w h i c h C D C S d o e s n o t d o . T h e
procedures make the decision whether to allow the
use of a data base area or an input/output function
for a data base area, based on the access control
key supplied by a program and possibly on the job
name of the program. The program must supply an
access control key in order for the data base
procedure to be called; the key can be a dummy key
if it is not used in the decision made by the data
base procedure to allow access. Data base proce
dures are loaded and executed at the system control
point.

Operating System File Security
D a t a b a s e fi l e s ( t h a t i s , fi l e s a s s o c i a t e d w i t h
a r e a s ) m u s t b e e s t a b l i s h e d a s p e r m a n e n t fi l e s
according to operating system procedures. When
establishing the permanent files, the data adminis
t r a t o r s h o u l d u s e t h e fi l e s e c u r i t y f e a t u r e s
provided by the operating system. For use under
NOS, the files must be direct access files.
When used in the data base environment, the data
base files are attached at the system control point
by CDCS. CDCS, therefore, is the only job that
p r o v i d e s u s e r n u m b e r o r u s e r i d e n t i fi c a t i o n , p r o
v i d e s p a s s w o r d s , a n d s p e c i fi e s t y p e o f a c c e s s f o r
w h i c h t h e d a t a b a s e fi l e i s a t t a c h e d . C D C S u s e s
the information in the master directory for attach
ing the data base files.
For NOS, one password is allowed. If a password is
s p e c i fi e d , i t m u s t b e i n c l u d e d i n t h e p e r m a n e n t
fi l e i n f o r m a t i o n i n t h e m a s t e r d i r e c t o r y i f t h e
user number under which CDCS executes is different
f r o m t h e u s e r n u m b e r u n d e r w h i c h t h e fi l e I s
d e fi n e d . F o r fi l e s e c u r i t y, i t i s r e c o m m e n d e d t h a t
t h e d a t a b a s e fi l e h a v e t h e a c c e s s c a t e g o r y o f
p r i v a t e ( C T = P R I VAT E , w h i c h i s t h e d e f a u l t c a t e
gory). By use of the PERMIT control statement,
a c c e s s t o t h e fi l e c a n b e s p e c i fi e d f o r a n y o t h e r
user name for which the data administrator permits
fi l e u s e . R e f e r t o t h e N O S r e f e r e n c e m a n u a l f o r
detailed information.
For NOS/BE, up to five passwords can be specified
f o r a fi l e . I f p a s s w o r d s a r e s p e c i fi e d , t h e p e r m a
n e n t fi l e i n f o r m a t i o n i n t h e m a s t e r d i r e c t o r y m u s t
include the appropriate passwords to obtain the
p e r m i s s i o n s f o r t h e i n t e n d e d u s e o f t h e fi l e .
Refer to the NOS/BE reference manual for detailed
information.

a d m i n i s t r a t o r. T h i s d i s c u s s i o n a s s u m e s t h a t t h e
programmer is provided with the subschema listing.
Refer to the CDCS 2 Application Programming refer
ence manual for discussions of information provided
by these listings. The data administrator should
provide application programmers with any other
information required to code and execute user
programs.
The data administrator must provide the following
information when it is applicable.
Access control keys (privacy keys)
If an area has been defined with an access
control lock in the schema, the application
program must provide the appropriate access
control key to gain access to the area.
Information about all access control keys
required by an application program must be
provided to the application programmer.
Constraints
I f c o n s t r a i n t s a r e d e fi n e d i n t h e s c h e m a
and updates are likely to violate them, the
a p p l i c a t i o n p r o g r a m m e r s h o u l d be provided
with information about constraints.
P e r m a n e n t fi l e i n f o r m a t i o n f o r t h e s u b s c h e m a
library
The subschema directory must be available
to compile a COBOL program, to preprocess a
FORTRAN program with the Data Manipulation
L a n g u a g e ( D M L ) p r e p r o c e s s o r, a n d t o u s e
Query Update for data base access. There
fore, the application programmer must have
t h e i n f o r m a t i o n r e q u i r e d t o a c c e s s t h e fi l e
containing the subschema directory.
Join items of the relation
Usually, an application programmer does not
need to know the join items in a relation.
Often the programmer can determine the join
items from the subschema listing. However,
in some situations, the application pro
grammer should be provided with information
about these items.
Requirements imposed by a data base procedure
If data base procedures are defined in the
schema and require that the user program
provide information, the application pro
grammer must be provided with the informa
tion required by the data base porocedure.
Tr a n s a c t i o n u p d a t e l i m i t
Application programmers should be told
about the update limit allowed for data
base transactions involving a particular
schema so that the programmers can code
application programs to handle the situa
tion of the update limit being reached.
Version names

APPLICATION PROGRAMMING INTERFACE
/fR^V

The information required by application programmers
to perform data base processing is provided by the
subschema compilation listing and by the data

60485200 A

If an application program is to use a data
base version other than version MASTER, the
application programmer must be provided
with the version name.

10-3

CDCS CONTROL STATEMENT

CDCSC,p] ... .

The CDCS control statement initiates CDCS and
provides information for the running of CDCS. The
CDCS control statement format and parameters are
shown in figure 10-2.

where p is a parameter,
follows:
DIR=lfn

The CDCS control statement cannot exceed 80 char
acters in length and must conform to the operating
system syntax rules for control statements.
Optionally, the comma immediately following CDCS
can be replaced by a left parenthesis; and the
terminating period can be replaced by a right
parenthesis.

Directive file for CDCS
control statement param
eters

BL=nn

Maximum pooled buffer
space

CP=t1

Central processor average
time

All CDCS control statement parameters are optional.
Parameters can be specified in a directive file.

I0=t2

Input/output average time

MFL=fl

Maximum field length for
CDCS

SBL=sbl

Small block limit for
CDCS

SBI=sbi

Small block boundary
increment for CDCS

CAP=ovcap-name1
L7ovcap-name2j.

Static load of CDCS over
lay capsules where pos
sible OVCAP names are as
follows:
CON
DBP

DIRECTIVE FILE
A n o p t i o n a l d i r e c t i v e fi l e c a n b e u s e d t o
parameters in addition to, or instead
parameters in the CDCS control statement.
t h e d i r e c t i v e fi l e a l l o w s s p e c i fi c a t i o n o f a
eter list longer than that allowed in the
statement.

contain
of, the
Use of
param
control

P a r a m e t e r s e n t e r e d i n t h e d i r e c t i v e fi l e m u s t
conform to certain rules. Parameters can be speci
fi e d i n a n y o r d e r. T h e M F L a n d D I R p a r a m e t e r s
c a n n o t b e s p e c i fi e d i n t h e d i r e c t i v e fi l e ; a n y
other valid parameter can be specified. No param
e t e r s p e c i fi e d i n t h e d i r e c t i v e fi l e c a n d u p l i c a t e
a p a r a m e t e r s p e c i fi e d i n t h e c o n t r o l s t a t e m e n t .
Parameters can be specified in columns 1 through
8 0 . T h e fi r s t p a r a m e t e r s p e c i fi e d i n a l i n e m u s t
begin in column 1. Parameters can either be placed
in separate lines or combined in a line with commas
acting as separators. Parameters cannot be split
across lines. Blanks, which are ignored, can be
used to improve readability.

PARAMETERS
A l l t h e p a r a m e t e r s ( fi g u r e 1 0 - 2 ) o f t h e C D C S
control statement are optional and can be specified
in any order. The CDCS control statement parameters
perform the following functions:

INV

JLOG
QRF

REL
TRAN
/^f^!\

CRM=fs1L7fs2j...

UN=user-name
ID=user-id
PW=pwrd1C/pwrd2j..

Adjustment of accounting charges

FAM=family-name

A l l o c a t i o n o f t h e m a x i m u m fi e l d l e n g t h t h a t
CDCS is allowed to use

PN=pack-name

Control of retention of certain CYBER Record
Manager (CRM) capsules
S p e c i fi c a t i o n o f i n f o r m a t i o n r e q u i r e d t o a t t a c h
the master directory if online dumping of
j ournal log files is desired
S p e c i fi c a t i o n o f a d i r e c t i v e fi l e w h i c h c a n
contain any of the CDCS control statement
parameters except MFL and DIR.

10-4

Static load CRM capsules
where fs is a file
structure as follows:
AK
DA
IS
HIP or MP

HDPFN=pfn

Allocation of maximum pooled buffer space

Control of loading certain CDCS overlay
capsules for the duration of CDCS execution

The parameters are as

permanent file
information for
m a s t e r d i r e c t o r y fi l e

SN=set-name
VSN=serial-number
DT=device-set
NOTE: The OVCAP names and CRM capsule loading
parameters can themselves be parameters of the
control statement.
Figure 10-2. CDCS Control Statement

60485200 E

^^$0\

The DIR parameter specifies the directive file from
which CDCS parameters are read. The DIR parameter
is interpreted as follows:

CP=tl
The average central processor time is
d e fi n e d a s t h e v a l u e s p e c i fi e d b y t l . T h e
value of tl cannot exceed seven decimal
digits in length. If this form of the
parameter is chosen, all the CDCS values in
the CDCS accounting table are adjusted
based on the CP time specified.

omitted
No parameters are read from a directive
fi l e ; t h e C D C S p a r a m e t e r s a r e c o m p l e t e l y
specified In the CDCS control statement.

DIR
The local file INPUT is assumed to contain
t h e d i r e c t i v e fi l e f o r t h e C D C S c o n t r o l
statement.
DTR=lfn

The 10 parameter specifies the average input/output
channel time in microseconds required by CDCS for a
random read by primary key on an indexed sequential
fi l e . T h e A c c o u n t i n g S t a t i s t i c s s u b s e c t i o n c o n
t a i n s m o r e i n f o r m a t i o n a b o u t t h i s p a r a m e t e r. T h e
10 parameter is interpreted as follows:
omitted

T h e s p e c i fi e d l o c a l fi l e n a m e i d e n t i fi e s
t h e d i r e c t i v e fi l e f o r t h e C D C S c o n t r o l
statement.
T h e B L p a r a m e t e r s p e c i fi e s i n o c t a l t h e
pooled buffer space that is allowed to be
by Advanced Access Methods (AAM) for all
base files during a CDCS session. The BL
is interpreted as follows:

maximum
allocated
open data
parameter

No accounting takes place unless the CP
p a r a m e t e r i s s p e c i fi e d .

10
The average input/output channel time is
d e fi n e d a s t h e v a l u e s p e c i fi e d a t s o f t w a r e
installation time. (The value suggested in
the released version of the software is
7000.) If this form of the parameter is
chosen, the accounting charge table in the
CDCS code is used for computing CDCS
accounting charges.

omitted
The maximum pooled buffer space is computed
by CDCS. The allowed space is a little
over half of the memory that is available
b e t w e e n t h e i n i t i a l l o a d fi e l d l e n g t h a n d
the maximum field length.

I0=t2
The average input/output time is defined as
t h e v a l u e s p e c i fi e d b y t 2 . T h e v a l u e o f t 2
cannot exceed seven decimal digits in
length. When this form of the parameter is
chosen, all the values in the CDCS account
ing charge table are adjusted, based on the
1 0 t i m e s p e c i fi e d .

BL

0^\

The maximum pooled buffer space is the
pooled buffer space usually allowed by the
AAM allocation scheme.
BL=nn
The maximum pooled buffer space is defined
as the value specified by nn, which must be
an octal integer. The value of nn must be
l e s s t h a n t h e m a x i m u m fi e l d l e n g t h e s t a b
l i s h e d b y t h e s p e c i fi c a t i o n o f t h e M F L
parameter or by a default of that parameter.
T h e C P p a r a m e t e r s p e c i fi e s t h e a v e r a g e c e n t r a l
processor time in micro seconds required by CDCS
for a random read by primary key on an indexed
s e q u e n t i a l fi l e . T h e A c c o u n t i n g S t a t i s t i c s s u b
section contains more information about this
p a r a m e t e r. T h e C P p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted
No accounting takes place unless the 10
p a r a m e t e r i s s p e c i fi e d .
CP

j0&&\.

The average central processor time is
d e fi n e d a s t h e v a l u e s p e c i fi e d a t s o f t w a r e
installation time. (The value suggested in
the released version of the software is
4000.) If this form of the parameter is
chosen, the accounting charge table in the
CDCS code is used for computing CDCS
accounting charges.

60485200 E

T h e M F L p a r a m e t e r s p e c i fi e s t h e m a x i m u m fi e l d
length in octal that CDCS is allowed to use. The
MFL parameter is interpreted as follows:
omitted
T h e m a x i m u m fi e l d l e n g t h i s t h e s y s t e m
default maximum.
MFL
The maximum field length is 120000 octal.
MFL=fl
T h e m a x i m u m fi e l d l e n g t h i s s p e c i fi e d b y
fl . T h e v a l u e o f fl c a n n o t e x c e e d s e v e n
octal digits in length.
The SBL and SBI parameters are provided for
reduction of memory fragmentation. CDCS
establishes a boundary beyond which CYBER Memory
Manager will not assign small blocks. A small
block is one which is less than 240 octal words.
The SBL parameter specifies a maximum limit beyond
which the boundary will not be moved. If SBI is
n o t s p e c i fi e d , S B L s p e c i fi e s a fi x e d b o u n d a r y
l o c a t i o n . S e e a p p e n d i x G f o r a d i s c u s s i o n o f fi e l d
length requirements and optimizations. The SBL
parameter is interpreted as follows.

10-5

omitted

DBP

The small block limit is equal to the
maximum field length.

The data base procedure overlay capsules
are loaded at CDCS initialization time and
remain loaded for the duration of the CDCS
session.

SBL
The small block limit is equal to the
maximum field length.

The INV parameter is interpreted as follows:
omitted

SBL=sbl
T h e s m a l l b l o c k l i m i t i s s p e c i fi e d b y s b l .
If this number is equal to or larger than
t h e m a x i m u m fi e l d l e n g t h , i t w i l l h a v e n o
effect.
T h e S B I p a r a m e t e r s p e c i fi e s t h a t C D C S s h o u l d
increase the small block boundary in increments of
sbi. Each increment will be added only after CDCS
and CRM have released any blocks that are
releasable at that ti me . Th e sma l l b l o ck b o u n d a ry
will not be advanced beyond the limit set by the
SBL parameter. The SBI parameter is interpreted as
follows:
omitted

The invoke overlay capsules are loaded and
unloaded according to use.
INV
The invoke overlay capsules are loaded at
CDCS initialization time and remain loaded
for the duration of the CDCS session.
The JLOG parameter is interpreted as follows:
omitted
T h e j o u r n a l l o g fi l e o v e r l a y c a p s u l e s a r e
loaded and unloaded according to use.
JLOG

The small block boundary is not varied from
that specified by SBL.

T h e j o u r n a l l o g fi l e o v e r l a y c a p s u l e s a r e
loaded at CDCS initialization time and
remain loaded for the duration of the CDCS
session.

SBI
The small block boundary is not varied from
that specified by SBL.
SBI=sbi

The QRF parameter is interpreted as follows:
omitted
T h e q u i c k r e c o v e r y fi l e o v e r l a y c a p s u l e s
are loaded and unloaded according to use.

The small block limit increment is
s p e c i fi e d b y s b i .
QRF
The following CDCS OVCAP loading parameters control
loading of certain CDCS overlay capsules during
C D C S i n i t i a l i z a t i o n . S p e c i fi c a t i o n o f t h e s e
parameters causes the overlay capsules to be kept
in memory during the entire time CDCS is executing
at a system control point. It is not necessary to
specify one of these parameters in order to be able
to use the corresponding feature. The following
OVCAP parameters are available:

T h e q u i c k r e c o v e r y fi l e o v e r l a y c a p s u l e s
are loaded at CDCS initialization time and
remain loaded for the duration of the CDCS
session.
The REL parameter is interpreted as follows :
omitted
The relations overlay capsules are loaded
and unloaded according to use.

The CON parameter is interpreted as follows:
REL
omitted
The constraint overlay capsules are loaded
and unloaded according to use.
CON

The TRAN parameter is interpreted as follows:
The constraint overlay capsules are loaded
at CDCS initialization time and remain
loaded for the duration of the CDCS session.

The DBP parameter is interpreted as follows:
omitted
The data base procedure overlay capsules
are loaded and unloaded according to use.

10-6

The relations overlay capsules are loaded
at CDCS initialization time and remain
loaded for the duration of the CDCS session.

omitted
The data base transaction overlay capsules
are loaded and unloaded according to use.
TRAN
The data base transaction overlay capsules
are loaded at CDCS initialization time and
remain loaded for the duration of the CDCS
session*

60485200 E

The CAP parameter offers an alternate form in which
to specify the CON, DBP, INV, JLOG, QRF, REL, and
TRAN parameters. The CAP= portion of the parameter
functions as documentation only. The CAP parameter
is interpreted as follows:

The extended indexed sequential file struct u r e c a p s u l e s a r e loaded and unloaded
according to use.

IS

omitted
Any of the CDCS overlay capsules that have
n o t b e e n s p e c i fi e d b y o t h e r C D C S O V C A P
loading parameters are loaded and unloaded
according to use.
CAP=ovcap-namel[/ovcap—name2]...
T h e C D C S o v e r l a y c a p s u l e s s p e c i fi e d b y
ovcap-namel and ovcap-name2 are loaded at
CDCS initialization and remain loaded for
the duration of the CDCS session. The
v a l u e s d e fi n e d f o r o v c a p - n a m e l a n d
ovcap-name2 are CON, DBP, INV, JLOG, QRF,
REL, and TRAN. Refer to the description of
the individual parameter for the
interpretation of each option. If more
than one CDCS OVCAP parameter is specified,
the options must be separated by a slash.
The following CRM capsule loading parameters
control loading of certain CYBER Record Manager
(CRM) capsules during CDCS initialization. Speci
fication of these parameters causes the capsules to
be kept in memory during the entire time CDCS is
active. It is not necessary to specify one of
these parameters in order to be able to use the
corresponding feature. Before specifying any of
these parameters, refer to the Duration Loading
subsection.
The AK parameter is interpreted as follows:
omitted
T h e e x t e n d e d a c t u a l k e y fi l e s t r u c t u r e
capsules are loaded and unloaded according
to use.

T h e e x t e n d e d i n d e x e d s e q u e n t i a l fi l e
structure capsules are loaded at CDCS
initialization and remain loaded for the
duration of the CDCS session.
The MIP or MP parameter is interpreted as follows:
omitted
T h e e x t e n d e d m u l t i p l e i n d e x p r o c e s s o r fi l e
structure capsules are loaded and unloaded
according to use.

MIP
T h e e x t e n d e d m u l t i p l e i n d e x p r o c e s s o r fi l e
structure capsules are loaded at CDCS
Initialization and remain loaded for the
duration of the CDCS session. The extended
indexed sequential capsules are also
loaded, whether or not they are explicitly
s p e c i fi e d .

M
P
Same as MIP.
The CRM parameter offers an alternate form in which
to specify the AK, DA, IS, and MIP parameters. The
CRM= portion of the parameter functions as documen
t a t i o n o n l y. T h e C R M p a r a m e t e r i s i n t e r p r e t e d a s
follows:
omitted
Any of the CRM file structure capsules that
h a v e n o t b e e n s p e c i fi e d b y o t h e r c a p s u l e
loading parameters are loaded and unloaded
according to use.
CRM=fsl[/fs2] ...

AK
T h e e x t e n d e d a c t u a l k e y fi l e s t r u c t u r e
capsules are loaded at CDCS initialization
and remain loaded for the duration of the
CDCS session.
The DA parameter is interpreted as follows:
omitted
T h e e x t e n d e d d i r e c t a c c e s s fi l e s t r u c t u r e
capsules are loaded and unloaded according
to use.
DA
T h e e x t e n d e d d i r e c t a c c e s s fi l e s t r u c t u r e
capsules are loaded at CDCS initialization
and remain loaded for the duration of the
CDCS session.
The IS parameter is interpreted as follows:
omitted

60485200 E

T h e C R M fi l e s t r u c t u r e c a p s u l e s s p e c i fi e d
by fsl and fs2 are loaded at CDCS initiali
zation and remain loaded for the duration
o f t h e C D C S s e s s i o n . T h e v a l u e s d e fi n e d
for fsl and fs2 are AK, DA, IS, and MIP
(MP). Refer to the description of the
individual parameter for the Interpretation
o f e a c h o p t i o n . I f m o r e t h a n o n e fi l e
s t r u c t u r e o p t i o n i s s p e c i fi e d , t h e o p t i o n s
must be separated by a slash.
The master directory file attach parameters consist
of a series of parameters that can be used to
s p e c i f y t h e p e r m a n e n t fi l e i n f o r m a t i o n r e q u i r e d t o
a t t a c h t h e m a s t e r d i r e c t o r y fi l e . T h e s e p a r a m e t e r s
m u s t b e s p e c i fi e d i f a u t o m a t i c o n l i n e d u m p i n g o f
t h e j o u r n a l l o g fi l e I s t o b e p e r f o r m e d b y C D C S .
I f t h e m a s t e r d i r e c t o r y fi l e i s a t t a c h e d e x t e r n a l l y
prior to execution of the CDCS control statement,
s p e c i fi c a t i o n o f t h e s e m a s t e r d i r e c t o r y fi l e a t t a c h
parameters causes CDCS execution to abort. All of
t h e m a s t e r d i r e c t o r y fi l e a t t a c h p a r a m e t e r s , e x c e p t
for VSN and DT, must contain only letters or digits
and must not exceed seven characters in length.

10-7 |

If automatic CDCS online dumping of the journal log
fi l e i s d e s i r e d , m a s t e r d i r e c t o r y fi l e a t t a c h
parameters must be specified. The parameters are
used by CDCS to construct the DBREC job that dumps
the log file. For the DBREC job, a minimum set of
m a s t e r d i r e c t o r y fi l e a t t a c h p a r a m e t e r s m u s t b e
s p e c i fi e d . T h e m i n i m u m s e t o f p a r a m e t e r s f o r t h e
NOS operating system consists of MDPFN and UN. The
minimum set of parameters for the NOS/BE operating
system consists of MDPFN and ID. The master direc
tory attach parameters are defined as follows:
MDPFN=pfn
The permanent file name of the of the file
containing the master directory.
UN=user-name
The user name of the owner of the permanent
fi l e c o n t a i n i n g t h e m a s t e r d i r e c t o r y
(applicable for NOS).
ID=user-id
The name of the owner of the permanent file
containing th e m a s te r d i r e c to r y ( a p p l i c a b l e
for NOS/BE).
PW=pwrdl[/pwrd2] ...
The operating system password (pwrdl) or
passwords used to restrict access to the
p e r m a n e n t fi l e c o n t a i n i n g t h e m a s t e r
d i r e c t o r y . U p t o fi v e p a s s w o r d s c a n b e
specified for NOS/BE; on NOS only the first
password is used. If more than one
password is used, the passwords must be
separated by a slash.
FAM= f amily-name
The family name of the device on which the
permanent file containing the master direc
tory resides (NOS only). Refer to the NOS
reference manaual for more information
about devices associated with a family name.
PN°pack-name
The name of the auxiliary device on which
t h e p e r m a n e n t fi l e c o n t a i n i n g t h e m a s t e r
directory resides (NOS only). Refer to the
NOS reference manual for more information
about auxiliary devices.

directory resides (NOS/BE only). Refer to
the NOS/BE reference manual for more
informa- tion about this parameter.
DT=device-type
The auxiliary mass storage device type on
w h i c h t h e p e r m a n e n t fi l e c o n t a i n i n g t h e
master directory resides (NOS only). An
auxiliary device is any supported device
t h a t a n i n s t a l l a t i o n d e fi n e s a s a u x i l i a r y.

ACCOUNTING STATISTICS
Accounting charges for CDCS central processor usage
(CP) and data base input/output processing (10) are
r e fl e c t e d i n t h e a c c o u n t i n g s t a t i s t i c s t h a t a p p e a r
i n t h e u s e r ' s c o n t r o l p o i n t d a y fi l e . S p e c i fi c
charges are for central processor time and input/
o u t p u t p r o c e s s i n g t i m e a t t r i b u t a b l e t o a s p e c i fi c
user request. The CP and I/O times are charged to
the user job by CDCS. Under NOS/BE they are added
directly into the CP and I/O times that are
accumulated by the user job. Under NOS, the CP and
I/O times are accumulated together into another
catagory called application unit charge. This
catagory appears on the user job dayfile as UEAC
units. Under NOS and NOS/BE, the following two
informative messages are sent to the user control
point dayfile when the program terminates from CDCS:
CP SECONDS CHARGED BY CDCS xxxxxx.xxx
10 SECONDS CHARGED BY CDCS yyyyyy.yyy
T h e fi r s t m e s s a g e i n d i c a t e s t h e c e n t r a l p r o c e s s o r
time in seconds used by CDCS in processing requests
f o r t h e u s e r. T h e s e c o n d m e s s a g e i n d i c a t e s t h e
channel time in seconds used by CDCS in processing
requests for the user.
The application unit charges are transferred to the
user job on each request. They are subject to
rounding errors and conversion ratios used by the
operating system, so they will not exactly match
the total seconds shown in the dayfile messages.
The data administrator has three choices concerning
accounting charges:
To use the accounting charge table included in
the CDCS code
To t u n e a c c o u n t i n g c h a r g e s f o r t h e p a r t i c u l a r
installation

SN=set-name
The name of the private device set on which
t h e p e r m a n e n t fi l e c o n t a i n i n g t h e m a s t e r
directory resides (NOS/BE only). If SN is
s p e c i fi e d , V S N m u s t a l s o b e s p e c i fi e d . I f
SN is specified, the master member of the
set must have been mounted via a MOUNT
control statement in the CDCS initializa
tion procedure. Refer to the NOS/BE refer
ence manual for more information about
private devices.
VSN= serial-number
The volume serial number of the master pack
of the private device set on which the
p e r m a n e n t fi l e c o n t a i n i n g t h e m a s t e r

10-8

To n o t c a l c u l a t e c h a r g e s f o r t h e i n d i v i d u a l
users
Specification of the 10 or CP parameter in the CDCS
control statement implements accounting proce
dures. If the data administrator wants accounting
to be performed and wants to use the values in the
accounting charge table included in the released
version of the software, the CP and 10 parameters
must be specified in the CDCS control statement as
shown in the following examples:
CDCS,CP,10.
CDCS.CP.

^^v

CDCS,10.

60485200 E

If the data administrator wants to tune accounting
c h a r g e s , t h e s p e c i fi c v a l u e s d e s i r e d m u s t b e
specified in the CP and 10 parameters in the CDCS
control statement. If the data administrator wants
no calculation of charges for CDCS users, the CP
and 10 parameters must not be specified in the CDCS
control statement.
CDCS is released with an accounting charge table
generated for a CYBER 170 Model 74. If the data
administrator determines that charges made to users
from this charge table require adjustment for the
installation's needs, the parameters on the CDCS
control statement can be changed so that the
charging mechanism is more suitable. Since the
accounting charges are all relative to the CP and
10 time for an IS random read through CDCS, the
entire table can be adjusted if new values for
these times are specified.
The elements th a t a ffe c t a c c o u n ti n g c h a r g e s d i ffe r
depending on the type of CDCS request. Charges for
CDCS 10 requests are based on the number of keys
f o r t h e fi l e , t h e fi l e o r g a n i z a t i o n , t h e n u m b e r o f
data base accesses, and logging. Charges for CDCS
n o n - 1 0 r e q u e s t s a r e a fi x e d c o s t p l u s p o s s i b l e
logging charges per request.
When CDCS terminates, accounting statistics are
s e n t t o t h e C D C S s y s t e m c o n t r o l p o i n t d a y fi l e .
These statistics can be used by the data adminis
trator to determine what adjustments need to be
made to the accounting charge table to minimize the
discrepancy between amount charged and amount used.
Under NOS/BE and NOS, the following two messages
are sent to the dayfile:

0^*\

CDCS CHARGED

CP xxxxxx.xxx
10 yyyyyy.yyy

CDCS USED

CP aaaaaa.aaa
10 bbbbbb.bbb

The values denoted as lowercase letters are in
seconds. The values returned in the CDCS CHARGED
message represent the total charges made by CDCS
for all requests CDCS users made during the time
CDCS was active (that is, from the time CDCS was
initialized until the time CDCS was terminated).
The values returned in the CDCS USED message repre
sent the total resources used by CDCS during the
time CDCS was active.
Under NOS, an additional message is sent to the
CDCS dayfile and appears as follows:
CDCS zz.zz PERCENT CPU USAGE
PERCENT CPU USAGE is defined as the ratio of the
total CP time used to the real time elapsed while
CDCS was active.

DURATION LOADING
The capsule loading parameters of the CDCS control
s t a t e m e n t a l l o w s p e c i fi c a t i o n o f c e r t a i n C D C S
overlay capsules and CYBER Record Manager (CRM)
capsules to be loaded during CDCS initialization
and kept in memory during the entire time CDCS is
active. This procedure is called duration
loading. It is aimed at improving CDCS performance

in a situation of heavy usage of a particular
f e a t u r e . T h e p a r a m e t e r s n e e d n o t b e s p e c i fi e d i n
order to use the corresponding feature. The
parameters should be specified if the feature is in
regular use because the corresponding capsules are
loaded in a contiguous group and retained in memory
during the entire execution of CDCS. In this case,
specifying the parameters avoids the memory
fragmentation and extra loading time that occurs
when the capsules are each loaded as they are
used. Specifying parameters for infrequently used
CDCS overlay capsules or CRM capsules should be
avoided because this causes memory for these
capsules to be allocated for long time periods when
the capsules are not in use.

CDCS LOADING OF OVERLAY CAPSULES
When the CDCS OVCAP loading parameters are
specified, CDCS loads the overlay capsules for each
f e a t u r e s p e c i fi e d a t i n i t i a l i z a t i o n t i m e . I f t h e
O V C A P l o a d i n g p a r a m e t e r s a r e n o t s p e c i fi e d , t h e
overlay capsules which support a feature are loaded
and unloaded according to use.

CDCS LOADING OF CRM CAPSULES
When the CRM capsule loading parameters are
s p e c i fi e d , C R M s e l e c t s t h e c a p s u l e s f o r e a c h fi l e
structure, and loads them at initialization. CRM
includes those capsules required for routine
reading and updating; it excludes capsules that are
required for exceptional processing such as block
splits. The CRM capsule loading parameters need
not be specified in order to use the corresponding
fi l e s t r u c t u r e f e a t u r e , s u c h a s M I P p r o c e s s i n g o f
alternate keys.

CLASSIFICATION AND EFFECT
OF CRM ERRORS
C D C S c l a s s i fi e s t h e C R M e r r o r s r e t u r n e d o n d a t a
b a s e fi l e s . A c l a s s 1 e r r o r i n d i c a t e s t h a t t h e
d a t a b a s e fi l e c a n b e s t r u c t u r a l l y b a d a n d c a n n o t
be used. If a class 1 error occurs, the data admin
i s t r a t o r m u s t r e c o n s t r u c t t h e fi l e . A c l a s s 2
error indicates an operation that is not allowed
h a s b e e n a t t e m p t e d o n t h e d a t a b a s e fi l e b y a
particular application program* If a class 2 error
occurs, no action by the data administrator is
required.
The action that CDCS takes when a CRM error occurs
d e p e n d s o n t h e c l a s s i fi c a t i o n o f t h e e r r o r . I f a
class 1 error is returned, CDCS aborts all applica
tion programs using the file, gives the file a down
s t a t u s a n d p e r m i t s n o f u r t h e r u s e o f t h e fi l e .
CDCS also writes an error message to the CDCS
o u t p u t fi l e i n d i c a t i n g t h a t t h e fi l e c o u l d b e
structurally bad.
When a class 1 error Is returned, the file must be
recreated by the data administrator before subse
quent access is attempted. The data administrator
could develop administrative procedures to inquire
about the status of data base areas in order to
d e t e c t t h e d o w n s t a t u s o f a n a r e a ( fi l e ) . R e f e r t o
the description of the STATUS command in the Oper
ator Interface subsection for further information.

/$SBS\

60485200 E

10-8.1 |

If a class 2 error is returned, CDCS returns the
CRM error information through a CDCS diagnostic to
the application program that caused the error and
writes a message to the CDCS output file. The CDCS
diagnostic returned depends on the severity of the
C R M e r r o r. I f t h e C R M e r r o r i s a f a t a l e r r o r ( a s
indicated in the CYBER Record Manager Advanced
Access Methods reference manual), CDCS issues a
nonfatal error and prohibits the application
p r o g r a m f r o m h a v i n g f u r t h e r a c c e s s t o t h e fi l e . I f
the CRM error is a nonfatal error, CDCS issues a
t r i v i a l e r r o r. U p o n i s s u i n g e i t h e r a n o n f a t a l o r
trivial error, CDCS terminates the request for data
base access that caused the error.

writes the message list information on a file named
CDCSOUT.

For information about CRM error codes and messages,
refer to the CYBER Record Manager Advanced Access
Methods reference manual.

SYSTEM OPERATOR GUIDELINES

CRM ERROR FILE USE
The data administrator can use the CRM error file
ZZZZZEG at the CDCS system control point to obtain
statistics and other information about processing
o f d a t a b a s e fi l e s . H o w e v e r, t h e j o u r n a l l o g fi l e
s h o u l d b e u s e d i n s t e a d o f t h e e r r o r fi l e b e c a u s e
d i f fi c u l t i e s c o u l d a r i s e w h e n u s i n g t h e e r r o r
fi l e . T h e f o l l o w i n g p a r a g r a p h s d e s c r i b e t h e p r o b
lems that can occur when the CRM error file is used
at the system control point.
When CDCS opens a data base area, an internal file
name different from the schema area name is gener
a t e d . T h i s i s t h e fi l e n a m e r e f e r e n c e d i n t h e
ZZZZZEG error file at the system control point.
CRM refers to the DFC and EFC fields in the FIT to
determine whether error messages or statistics/
notes for an area are to be written to the dayfile
o r e r r o r fi l e , o r b o t h . T o c o n t r o l w r i t i n g o f
error messages and statistics/notes, the DFC and
E F C fi e l d s m u s t b e s p e c i fi e d i n t h e F I L E c o n t r o l
statement for an area at schema compilation time.
I f fi l e s t a t i s t i c s a r e w r i t t e n t o t h e e r r o r fi l e
from a number of user jobs running with CDCS, the
error file can become very large.

CDCS LISTING
The CDCS output file contains a list of significant
user messages issued during CDCS execution. Each
message is identified by a time stamp and a user
identification. CDCS writes the message list
i n f o r m a t i o n o n t h e fi l e n a m e d O U T P U T. C D C S B T F

10-8.2

E a c h t i m e t w e n t y - fi v e p a g e s o f m e s s a g e s a r e
accumulated , the OUTPUT file is copied to another
fi l e a n d r o u t e d t o a p r i n t e r . I f t h e C D C S u s e r
message listing is the first record on the OUTPUT
fi l e , t h e fi l e i s r e w o u n d a f t e r t h e c o p y. I f t h e r e
are other records ahead of the CDCS listing, the
O U T P U T fi l e i s p o s i t i o n e d a t t h e fi r s t
end-of-record. This preserves listing information
that may have been placed on the OUTPUT file by
CDCS initialization procedures.

T h e f o l l o w i n g s u b s e c t i o n d e t a i l s t h e p r o c e dure for
CDCS initialization and reviews some operations
information concerning the system control point.
This information is given so that the data admin
istrator can set up appropriate installation
operating procedures for CDCS. Following the
initialization discussion, information concerning
the communication between CDCS and the system
operator that can be achieved through the central
programmable displays is presented. Information is
communicated to CDCS by the system operator under
t h e g u i d a n c e o f t h e d a t a a d m i n i s t r a t o r. R e f e r t o
the appropriate operating system-related reference
manuals and operator's guides for additional
information.

CDCS INITIALIZATION
The system operator initializes CDCS at a system
control point by typing in one of the following
commands:
n.CDCSx. (for NOS)
n.X CDCSx. (for NOS/BE)
The n designation is the control point number; x
can be one or two alphanumeric characters. These
commands execute a system procedure file defined
w i t h t h e n a m e C D C S x . T h e s y s t e m p r o c e d u r e fi l e
must contain control statements to set system
resource requirements. Exit processing should also
b e s p e c i fi e d t o p r o v i d e d i a g n o s t i c i n f o r m a t i o n i n
case of a CDCS failure. Information for attaching
the master directory must be provided as indicated
i n t h e d e s c r i p t i o n o f t h e s y s t e m p r o c e d u r e fi l e
that follows. The method used to define the system
p r o c e d u r e fi l e d i ff e r s u n d e r t h e N O S a n d N O S / B E
operating systems.

60485200 E

The system operator should not adjust the time or
d a t e f o r t h e s y s t e m i f l o g g i n g t o j o u r n a l l o g fi l e s
is in progress*
I f p e r m a n e n t fi l e i n f o r m a t i o n i n t h e C D C S c o n t r o l
s t a t e m e n t o r i n t h e m a s t e r d i r e c t o r y s p e c i fi e s t h e
use of private packs or devices, the private packs
or devices should be online at the time CDCS is
initialized.
A t C D C S i n i t i a l i z a t i o n t i m e , a l l l o g fi l e s a n d d a t a
b a s e p r o c e d u r e l i b r a r y fi l e s s p e c i fi e d i n t h e
master directory should be available to CDCS. If
o n e o f t h e s e fi l e s i s n o t a v a i l a b l e , t h e a f f e c t e d
schema is marked with the down status and cannot be
used.

NOS System Procedure File

y$^^\

The system procedure file under NOS is generated by
creating a CYBER Control Language procedure with
the name of CDCSx (where x is one or two alphanu
meric characters). This procedure must contain
appropriate control statements and must be saved as
a permanent indirect access file with the same name
as the procedure. The system operator moves the
s y s t e m p r o c e d u r e fi l e t o t h e s y s t e m c a t a l o g b y
typing in the following:
x.MOVEPF(Fl=CDCSx/UI=a,DI=377777)
T h e s p e c i fi c a t i o n a i s t h e u s e r i n d e x a s s o c i a t e d
with the user number under which the system proce
dure file is saved. Any number of system procedure
fi l e s c a n b e c r e a t e d . T h e fi r s t t h r e e l e t t e r s o f
the procedure file name must be CDC.

/gp?\

To give a user job access to CDCS, the MODVAL
function must be used by the operator to set the
C U C P b i t i n t h e u s e r ' s v a l i d a t i o n fi l e a c c e s s
word. This procedure allows the user job to access
a system control point. Refer to the NOS instal
lation handbook for a discussion of MODVAL.
The master directory can be attached either inter
nally by CDCS using information provided in the
master directory file attach parameters of the CDCS
c o n t r o l s t a t e m e n t o r e x t e r n a l l y b y s p e c i fi c a t i o n o f
an ATTACH control statement prior to execution of

.PR0C,CDCSx.
USER,username.
RETURN,CDCSx.
MFL,xxxxxxx.
CDCS,MDPFN=xxxxxxx,UN=xxx.
EXIT.
DMD.
DMD,xxxxxx.

the CDCS control statement. The internal method of
a t t a c h i n g i s r e c o m m e n d e d . I f m a s t e r d i r e c t o r y fi l e
attach parameters are specified in the CDCS control
s t a t e m e n t , t h e m a s t e r d i r e c t o r y fi l e c a n n o t b e
a t t a c h e d e x t e r n a l l y. A m a s t e r d i r e c t o r y a t t a c h e d
e x t e r n a l l y b y t h e s y s t e m p r o c e d u r e fi l e m u s t b e
attached by using the local file name MSTRDIR.
C o n t r o l s t a t e m e n t s f o r t h e j o u r n a l l o g fi l e , t h e
t r a n s a c t i o n r e c o v e r y fi l e , t h e r e s t a r t i d e n t i fi e r
fi l e , t h e q u i c k r e c o v e r y fi l e , a n d t h e d a t a b a s e
procedure library must not be present in the system
p r o c e d u r e fi l e ; t h e fi l e s a r e a u t o m a t i c a l l y a t t a c h e d
b y C D C S u s i n g p e r m a n e n t fi l e i n f o r m a t i o n i n t h e
m a s t e r d i r e c t o r y.
A sample system procedure file for NOS is shown in
fi g u r e 1 0 - 3 . E i t h e r t h e M F L c o n t r o l s t a t e m e n t o r
the MFL parameter on the CDCS control statement can
be used to set maximum field length.
The USER control statement specifies the user name
under which CDCS executes. This control statement
i s r e q u i r e d i f p a r t i c u l a r fi l e s u s e d b y C D C S a r e
not defined as PUBLIC. (In this situation, a PERMIT
c o n t r o l s t a t e m e n t i s u s e d t o s p e c i f y t h a t a fi l e
should be accessible to the user name under which
CDCS will execute.) The USER control statement
a f f e c t s a c c e s s f o r t h e f o l l o w i n g fi l e s : m a s t e r
d i r e c t o r y fi l e , d a t a b a s e a n d i n d e x fi l e s , a n d l o g
a n d r e c o v e r y fi l e s . I f a l l o f t h e s e fi l e s a r e
PUBLIC, the USER control statement is not required.

NOS/BE System Procedure File
The system procedure file under NOS/BE is created
b y t h e d a t a a d m i n i s t r a t o r u s i n g E D I T L I B . T h e fi l e
is placed on the system library with an access
level that allows it to be called from control
s t a t e m e n t s . A n y n u m b e r o f p r o c e d u r e fi l e s c a n b e
created. A sample system procedure file for NOS/BE
is shown in figure 10-4.
On the CDCS control statement, the MFL parameter
s p e c i fi e s t h e u p p e r l i m i t o n t h e fi e l d l e n g t h f o r
C D C S . T h e fi e l d l e n g t h , h o w e v e r, c o u l d b e c o n
siderably less at any point during execution,
depending on the number of users and the requests
outstanding.

Establishes the CYBER Control Language Procedure
Specifies the user name for CDCS
Returns the system procedure file
Establishes maximum field length
Initiates CDCS; attaches master directory
Establishes processing if error occurs
Prints exchange package dump
Prints the contents of selected areas of memory

Figure 10-3. Sample NOS System Procedure File

.PROC,CDCSx.
CDCS,MDPFN=xxxxxxx,ID=xxx.
EXIT.
DMD,xxxxxx.

Initiates CDCS; attaches the master directory
Establishes processing if error occurs
Prints the contents of selected areas of memory

Figure 10-4. Sample NOS/BE System Procedure File
60485200 C

10-9

The master directory can be attached either inter
nally by CDCS using information provided in the
master directory attach parameters of the CDCS
c o n t r o l s t a t e m e n t o r e x t e r n a l l y b y s p e c i fi c a t i o n o f
an ATTACH control statement prior to execution of
the CDCS control statement. The internal method of
a t t a c h i n g i s r e c o m m e n d e d . I f m a s t e r d i r e c t o r y fi l e
attach parameters are specified in the CDCS control
s t a t e m e n t , t h e m a s t e r d i r e c t o r y fi l e c a n n o t b e
a t t a c h e d e x t e r n a l l y. A m a s t e r d i r e c t o r y a t t a c h e d
e x t e r n a l l y i n t h e s y s t e m p r o c e d u r e fi l e m u s t b e
attached by using the local file name MSTRDIR.
C o n t r o l s t a t e m e n t s f o r t h e j o u r n a l l o g fi l e , t h e
t r a n s a c t i o n r e c o v e r y fi l e , t h e r e s t a r t i d e n t i fi e r
fi l e , t h e q u i c k r e c o v e r y fi l e , a n d t h e d a t a b a s e
procedure library must not be present in the system
p r o c e d u r e fi l e ; t h e fi l e s a r e a u t o m a t i c a l l y
attached by CDCS using permanent file information
in the master directory.

OPERATOR INTERFACE
The system operator can communicate with the CDCS
system control point by using the central program
mable displays, the K display under NOS, or the L
display under NOS/BE. These displays are available
through the Dynamic System Display (DSD), one of
two routines that control the operator console.
Throughout the following discussion of programmable
displays, the reference K/L display refers to the K
display for NOS and to the L display for NOS/BE.
Operator communication with CDCS via the program
mable display is allowed any time after CDCS
initialization is complete. While CDCS is operat
ing at a control point, it can use the display to
place information on the console screen and to
receive information from the keyboard.

used for all operator commands. The minidisplay is
viewable only for the moment between the time the
K/L display is assigned to CDCS and the time the
main display is brought up. When CDCS determines
that the K display (for NOS) or L display (for
NOS/BE) has been assigned to it, CDCS makes sure it
i s r o l l e d i n , t h e n b r i n g s u p t h e m a i n d i s p l a y.
(CDCS might roll out all but 1000 octal words of
i t s fi e l d l e n g t h i f n o u s e r r e q u e s t s a r e a c t i v e . )
During this short interval, the minidisplay places
a message on the console screen requesting the
operator to wait a moment while CDCS is preparing
i t s d i s p l a y.
The error display is used to communicate to the
operator that the current operator command cannot
be processed at this time due to memory usage by
CDCS. The error display is viewable only when the
maximum field length assigned to CDCS at initiali
z a t i o n i s i n s u f fi c i e n t f o r b o t h t h e c u r r e n t C D C S
user activity and for the operator command just
entered. When CDCS activity subsides, the operator
command can be retried.
The main display is the major means of communica
tion between CDCS and the operator. When the K/L
d i s p l a y i s fi r s t b r o u g h t u p , t h e m a i n d i s p l a y l i s t s
the commands available to the operator for use with
CDCS. A list of the options available with the
STATUS command can be viewed by entering the .
( p e r i o d ) k e y. W h e n a n o t h e r . k e y i s e n t e r e d , t h e
display cycles back to the command list.
Use of the K/L display allows the operator to view
up to 43 lines with 64 characters per line of dis
played information. The main display prepared by
C D C S a l w a y s c o n s i s t s o f t h e f o l l o w i n g fi e l d s o f
information:
CDCS version number
CDCS level number

Programmable Display Usage
CDCS initialization must be complete before the
operator can use the programmable display to com
municate with CDCS. In addition, the K/L display
can be used only after it has been assigned to CDCS.
The operator can call the display by typing the
following:
K,cpnum. (for NOS)
L=ord. (for NOS/BE)
Each call must be terminated with a carriage
return. The cpnum specification in the NOS call to
the K display indicates the control point number of
CDCS, which can be found by looking at the B
d i s p l a y. T h e o r d s p e c i fi c a t i o n i n t h e N O S / B E c a l l
to the L display indicates the JDT ordinal, which
can be found by looking at the B display.
The operator can terminate the display by replacing
the K or L display with the A display. To do this
under NOS, the operator enters the left blank key
f o l l o w e d b y a c a l l t o t h e A d i s p l a y. To d o t h i s
under NOS/BE, the operator enters the right blank
k e y.
CDCS uses three types of displays in its interface
w i t h t h e s y s t e m o p e r a t o r : a m a i n d i s p l a y, a m i n i display, and an error display. The main display is

10-10

CDCS build date in the form yydd
SCP name
SCP id for NOS/BE, or SCP priority for NOS
CDCS status: UP, IDLE, DOWN, or IDLE/TERM
User count since initialization
Active user count
Active schema count
Active area count, including areas used impli
citly due to constraints
Most recent operator command entered
Most of the information displayed at the console
remains the same each time the display is refreshed.
This information represents a snapshot of the CDCS
environment at the time the last command was
processed. Five of the fields, however, are dynam
ically updated:
CDCS status
User count since initialization
y^SJ^v

Active user count

60485200 A

Active schema count

NOTE

Active area count

0S^\
Some commands entered by the operator might require
CDCS to display more lines of information than can
fi t o n t h e c o n s o l e s c r e e n a t o n e t i m e . I n t h i s
case, CDCS displays as many lines as possible and
prompts the operator that the + and - keys can be
used to reach lines that are not currently di
splayed .

Operator Commands

Commands that affect the running status of CDCS are
shown in the system dayfile and the system control
p o i n t d a y fi l e .
DOWN Command

The operator commands to be used with CDCS are as
follows:
DOWN
IDLE
RETAIN
RETURN
STATUS
TERM
UP
The format and effect of each
in the following paragraphs,
can be used optionally to
Within each command, spaces
equivalently as separators,
of a space or a comma are
occurrence.

The limit on input from the operator
console of NOS/BE limits the size of the
subschema name that can be specified in a
RETAIN or RETURN command. If the schema is
s p e c i fi e d b y a 4 - d i g i t s c h e m a i d , t h e
subschema name is limited to 29 characters
for NOS/BE. A 30-character subschema name
cannot be used.

command are described
In general, a period
terminate a command,
and commas are used
Multiple occurrences
treated as a single

For some commands, the operator must consider the
operating system limitations concerning the maximum
number of characters that can be entered in a
command: NOS/BE limits the input to a maximum of
47 typed characters; NOS allows 50 typed char
a c t e r s . I n t h e c o m m a n d s t h a t r e q u i r e t h e s p e c i fi
c a t i o n o f a s c h e m a o r a r e a , s p e c i fi c a t i o n o f t h e
schema and area names can cause the command to
e x c e e d i n p u t l i m i t ; h o w e v e r, i d e n t i fi c a t i o n c o d e s
are available to shorten a command. The schema can
be specified by either the schema name or schema
i d ; t h e a r e a c a n b e s p e c i fi e d b y e i t h e r t h e a r e a
name or area id. The schema id and area id are
1 - t o 4 - d i g i t i d e n t i fi c a t i o n s a s s i g n e d b y t h e
DBMSTRD utility and listed on the master directory
contents report (the second section, which is an
optional section of the DBMSTRD output). The
o p e r a t o r m u s t u s e t h e i d e n t i fi c a t i o n s i n s t e a d o f
the names if the length of the names make the
length of a command exceed the operating system
limit. In the DOWN, IDLE, STATUS, and UP commands,
the schema and area ids can be used. In the RETAIN
and RETURN commands, the schema id can be used. In
the RETAIN and RETURN commands, however, a sub
schema must be specified by the subschema name.

The DOWN command specifies that usage of CDCS, of a
particular schema, or of a particular area is to be
shut down and that all active jobs using CDCS, the
schema, or area are to be terminated. The format
o f t h e D O W N c o m m a n d i s s h o w n i n fi g u r e 1 0 - 5 .
Options used with the parameters of the DOWN com
mand are defined in table 10-1.
When DOWN,CDCS is specified, all programs currently
using CDCS are aborted. Any program attempting an
invoke call to CDCS after this command is issued is
also aborted. The effect of this command can be
removed for all programs except those that have
already been aborted by specifying an UP,CDCS com
mand. Each occurrence of a DOWN,CDCS command is
e c h o e d i n t h e s y s t e m d a y fi l e a n d i n t h e s y s t e m
c o n t r o l p o i n t d a y fi l e .
When a schema name or schema id is specified in the
DOWN command, all programs currently using the
indicated schema are aborted. Any program attempt
ing an invoke call using this schema after the
c o m m a n d i s i s s u e d i s a l s o a b o r t e d . T h e s p e c i fi e d
schema is given a down status; all areas of the
schema are returned so that they can be attached
for recovery purposes. When a schema is marked as
down, this status is retained by CDCS during the
time CDCS remains active, unless an UP command for
the schema is issued to bring the schema up again.
All knowledge of a schema with a down status is
lost when CDCS is terminated.
When an area name or area id is specified in the
DOWN command, all programs currently using the
indicated area are aborted. After the command is
issued, any program attempting an invoke call to a
subschema that uses this area is also aborted. The
specified area is given a down status and returned
so that the area can be attached for recovery
purposes. When an area is marked down, the down
status is retained by CDCS during the time CDCS
remains active, unless an UP command for the area
is issued to bring the area up again. All know
ledge of an area with a down status is lost when
CDCS is terminated.

Figure 10-5. DOWN Command

/f|p£?!\

60485200 A

10-11

TABLE 10-1. OPTIONS USED WITH PARAMETERS
OF THE OPERATOR COMMANDS

Area-id

INVALID/UNKNOWN VERSION NAME
D e fi n i t i o n

Option

S p e c i fi e s t h e 1 - t o 4 - d i g i t
a r e a i d e n t i fi c a t i o n a s s i g n e d
by the DBMSTRD utility and
listed in the master directory
contents.

Area-name

Specifies the 1- to
30-character name of the area
as recorded in the master
d i r e c t o r y.

Job-name

Specifies the unique
7-character job name assigned
by NOS or NOS/BE and shown on
the B display.

Schema-id

S p e c i fi e s t h e 1 - t o 4 - d i g i t
schema identification assigned
by the DMSTRD utility and
listed in the master directory
contents.

Schema-name

Specifies the 1- to
30-character name of the
schema, as recorded in the
m a s t e r d i r e c t o r y.

Subs chema-name

S p e c i fi e s th e 1 - to
30-character name of the
subschema, as recorded in the
m a s t e r d i r e c t o r y.

Version-name

Specifies the 1- to
7-character version name, as
recorded in the master
d i r e c t o r y. T h e v e r s i o n - n a m e
option can be used only in
conjunction with either the
area-name option or the
area-id option.

When a version name is specified in the DOWN com
mand, either the associated area name or the
a s s o c i a t e d a r e a i d m u s t a l s o b e s p e c i fi e d . I f
MASTER is the only version defined in the master
d i r e c t o r y, t h e o p e r a t o r n e e d n o t s p e c i f y t h e v e r
sion name. If the version name is required but is
omitted, the following message is issued to the
console:
VERSION NAME REQUIRED FOR AREA
The operator must then resubmit the command with
the version name.

IDLE

If an incorrect or unknown version name is entered,
the following diagnostic message appears:

The operator must then resubmit the command with
the proper version name.
Use of the DOWN command for a schema or area
r e q u i r e s o p e r a t o r c o n fi r m a t i o n b e f o r e t h e c o m m a n d
c a n b e e x e c u t e d . V e r i fi c a t i o n o f t h e c o m m a n d
serves to prevent the unintentional termination of
a program which could occur due to an error in the
typing of the command. After the operator types in
the DOWN command, the appropriate schema name and
id, or area name and id, are displayed, along with
a message requesting the operator to verify that
the DOWN command for this schema or area should
still be executed. The operator must respond
a p p r o p r i a t e l y. I f t h e o p e r a t o r r e l e a s e s t h e K
display (NOS) or L display (NOS/BE) without
r e s p o n d i n g t o t h e c o n fi r m a t i o n r e q u e s t , a fl a s h i n g
message is placed on the B display to remind the
operator that an operator reply is required.

IDLE Command
The IDLE command specifies that usage of CDCS, of a
particular schema, or of a particular area is to be
shut down, but that all active jobs using CDCS or
the schema or area are to be allowed to complete
p r o c e s s i n g n o r m a l l y. T h e f o r m a t o f t h e I D L E c o m
m a n d i s s h o w n i n fi g u r e 1 0 - 6 . O p t i o n s u s e d w i t h
parameters of the IDLE command are defined in table
10-1.
W h e n I D L E , C D C S i s s p e c i fi e d , a n y p r o g r a m t h a t
subsequently attempts an invoke call to CDCS is
aborted. All programs already using CDCS are
permitted to continue processing until completion.
The effects of an IDLE,CDCS command can be counter
a c t e d b y s p e c i f y i n g a n U P, C D C S c o m m a n d . E a c h
occurrence of an IDLE,CDCS command is echoed in the
s y s t e m d a y fi l e a n d i n t h e s y s t e m c o n t r o l p o i n t
d a y fi l e .
When a schema name or schema id is specified in the
IDLE command, any program that subsequently attempts
an invoke call using the indicated schema is
aborted. When the number of users of the schema
becomes zero, the schema is given an idle status;
all areas of the schema are returned so that they
can be attached for recovery purposes. CDCS
retains knowledge of an idle status for a schema
while CDCS remains active; that knowledge is lost,
however, when CDCS is terminated.

,CDCS
cr-C ~/schema-name)
'S
i s c h e m a - i d /f |._„
/ ( a(area-name)
r e a - i d } C r' V.,„
N =version-name]

Figure 10-6. IDLE Command

10-12

60485200 A

■ff^^Sv

When an area name or area Id is specified in the
IDLE command, any program that subsequently
attempts an invoke call to a subschema that uses
the indicated area is aborted. When the number of
users of the area becomes zero, the area is given
an idle status and returned so that the area can be
attached for recovery purposes. CDCS retains
knowledge of an idle status for an area while CDCS
r e m a i n s a c t i v e ; t h a t k n o w l e d g e i s l o s t , h o w e v e r,
when CDCS is terminated.
The requirements for usage of a version name with
the IDLE command are the same as those described
for the DOWN command. Refer to the description of
the DOWN command for version name specification
requirements.
As in the case of the DOWN command, operator
confirmation of an IDLE command for a schema or
area is required before the command can be exe
cuted. Refer to the description of the DOWN
command for details on this requirement.
RETAIN Command
The RETAIN command causes CDCS to retain certain
tables generated by CDCS and to keep data base
fi l e s a t t a c h e d f o r C D C S u s e . N o r m a l l y, w h e n a n
application program invokes a subschema, CDCS
g e n e r a t e s t a b l e s a n d a t t a c h e s t h e fi l e s r e q u i r e d
for executing the application program (unless the
t a b l e s a l r e a d y e x i s t a n d t h e fi l e s a r e a l r e a d y
attached because a program executing concurrently
has required t h e m ) . N o r m a l l y, w h e n a n a p p l i c a t i o n
program terminates execution, CDCS returns the
t a b l e s a n d fi l e s i f t h e y a r e n o t r e q u i r e d b y
a n o t h e r p r o g r a m e x e c u t i n g c o n c u r r e n t l y. W h e n t h e
R E TA I N c o m m a n d i s i s s u e d , t h e t a b l e s a n d fi l e s
associated with the schema or subschema specified
by the command are retained as long as CDCS remains
a c t i v e o r u n t i l t h e s c h e m a o r a r e t a i n e d fi l e i s
given a down status or until a corresponding RETURN
command is issued. The RETAIN command can specify
t h a t t h e r e t e n t i o n o f t a b l e s a n d fi l e s b e o n a
schema or subschema basis. The format of the
RETAIN command is shown in figure 10-7. Options
used for the parameters of the RETAIN command are
defined in table 10-1.

RETAIN

,SC={

schema-name
=subschema-name3
schema-id
}C,SB=

I f t h e s c h e m a s p e c i fi e d i n a R E TA I N c o m m a n d i s
downed, the RETAIN command is canceled, and the
fi l e s a s s o c i a t e d w i t h t h e s c h e m a a r e r e t u r n e d . I f
a file affected by a RETAIN command is downed, the
fi l e i s r e t u r n e d . I f t h e d o w n e d fi l e i s g i v e n a n
up status while CDCS remains active and the RETAIN
c o m m a n d r e m a i n s i n e f f e c t , t h e fi l e i s r e t a i n e d
after being accessed through CDCS.
When CDCS is initialized, retention of tables and
files is not assumed; the RETAIN command must be
s p e c i fi e d t o c a u s e t h e t a b l e s a n d fi l e s t o b e
retained.
The use of the RETAIN command can benefit CDCS
p r o c e s s i n g ; h o w e v e r, t h e r e a r e p o s s i b l e d i s a d v a n
t a g e s i n u s i n g t h e R E TA I N c o m m a n d . I f r u n - u n i t s
continuously use a particular schema or if run-units
using a particular subschema frequently invoke and
terminate so that CDCS must repeatedly attach data
base files, prepare them for processing, and return
t h e m , t h e s p e c i fi c a t i o n o f t h e R E TA I N c o m m a n d
improves the performance of CDCS. This situation
normally occurs In the CDCS processing environment
when the major use is by Query Update programs or
b y p r o g r a m s e x e c u t i n g t h r o u g h t h e Tr a n s a c t i o n
F a c i l i t y ( TA F ) . T h e i m p r o v e d p e r f o r m a n c e i n t h e
execution of CDCS that results from the use of the
R E TA I N c o m m a n d i s o b t a i n e d a t t h e e x p e n s e o f
i n c r e a s e d fi e l d l e n g t h f o r C D C S . I f a R E T A I N
command is in effect, files affected by the command
could be available only to jobs executing with
CDCS, depending on the permission with which CDCS
has a file attached.
RETURN Command
The RETURN command cancels the retention of tables
and files affected by a RETAIN command. A specifi
cation of this command causes the tables and files
indicated by the command to be returned when the
t a b l e s a n d fi l e s a r e n o t i n u s e . T h e R ETURN can
s p e c i f y t h e r e t u r n i n g o f t a b l e s a n d fi l e s o n a
schema or subschema basis. The format of the RETURN
command is shown in figure 10-8. Options used for
the parameters of the RETURN command are defined in
table 10-1.

RETURN ,SC= {

schema-name
subschema-name!!
schema-id
} C,SB=

Figure 10-8. RETURN Command
Figure 10-7. RETAIN Command
T h e s p e c i fi c a t i o n o f j u s t a s c h e m a i n t h e R E TA I N
command causes the retention of all versions of the
tables and files involved in CDCS processing using
t h e s p e c i fi e d s c h e m a . T h e r e f o r e , a l l t h e t a b l e s
a n d fi l e s i n v o l v e d i n C D C S p r o c e s s i n g u s i n g a n y
subschema of the specified schema are retained.
The specification of a schema and a subschema in
the RETAIN command causes retention of the tables
a n d fi l e s i n v o l v e d i n C D C S p r o c e s s i n g u s i n g t h e
s p e c i fi e d s u b s c h e m a a n d v e r s i o n M A S T E R . I f a
RETAIN command specifying a schema and a subschema
is entered when a RETAIN command specifying only
t h a t p a r t i c u l a r s c h e m a i s i n e ff e c t , t h e n e w c o m
mand is ignored.

60485200 A

If only a schema name is specified in the RETURN
command, retention is canceled for all tables and
fi l e s i n v o l v e d i n C D C S p r o c e s s i n g u s i n g a l l v e r
sions of that schema. This command must be used to
cancel a RETAIN command that specifies a schema
o n l y . S i n c e t h i s c o m m a n d s p e c i fi e s r e t u r n i n g
tables and files on a schema basis, the command can
be used to cancel a RETAIN command that specifies
both a schema and subschema. For example, the
command RETURN,SC=AA must be used to cancel the
command RETAIN,SC=AA. The command RETURN,SC=AA can
also be used to cancel the command RETAIN,SC=AA,
SB=ASUB; however, if other subschemas of schema AA
were specified in other RETAIN commands, the tables
and files used for processing with those subschemas
are also returned.

10-13

If a subschema and a schema are specified in the
RETURN command, retention is canceled for the
tables and files involved in processing the speci
fied subschema and version MASTER. This command
can be used to cancel a corresponding RETAIN com
mand that specifies the same schema and subschema.
For example, the command RETURN,SC=BB,SB=BSUB can
cancel the corresponding command RETAIN,SC=BB,
SB=BSUB; the RETURN command is ignored if a
RETAIN,SC=BB command is in effect.

STATUS Command

STATUS,SC=xxx
Specifies a particular schema. This com
mand causes schema status information to be
displayed for the specified schema only.
STATUS,SC=xxx,AR=xxx[,VN=xxx]
Specifies a particular schema and area.
Op ti o n a l l y, i t a l s o s p e c i fi e s a v e r s i o n .
This command causes schema status informa
t i o n t o b e d i s p l a y e d f o r t h e s p e c i fi e d
schema and area status information to be
displayed for the specified area.

The STATUS command causes requested information
concerning CDCS and the status of schemas, areas,
and jobs to be displayed. In the comuiand, STATUS
can be specified by the abbreviation ST. The
options in the command can be specified in any
order. The format of the STATUS command is shown
in figure 10-9. Options used for the parameters of
the STATUS command are defined in table 10-1.

STATUS,JOBS,SC=xxx

An error status can be Indicated for a schema or
area. An error status is effectively a down
status. Error status for a schema usually indi
cates that a data base procedure file or log file
cannot be attached or a fatal input/output error
occurred on a log file. Error status on an area
usually indicates that the permanent file associ
ated with the area cannot be attached or that a
fatal input/output error occurred on the file.

STATUS,JOBS,SC=xxx,AR=xxx[,VN=xxx]

The options specified in the command determine the
information that is displayed. The information
displayed is divided into three categories as shown
in table 10-2. The following list indicates the
forms of the STATUS command and the categories of
information that are displayed for each form. In
the commands, the specification xxx indicates a
schema name, schema id, area name, area id, version
name or job name (whichever is appropriate in
context).

STATUS,JOBS

STATUS,SC
Causes schema status information to be
displayed for every schema currently in use.
STATUS,SC,ALL
Causes schema status information to be
displayed for every schema for which infor
mation exists in the master directory.

Specifies JOBS and a particular schema.
This command causes schema status informa
t i o n t o b e d i s p l a y e d f o r t h e s p e c i fi e d
schema and job status information to be
displayed for each job that is using CDCS
and the specified schema.

Specifies JOBS and a particular schema and
a r e a . O p t i o n a l l y, i t a l s o s p e c i fi e s a
version. This command causes schema status
information and area status information to
be displayed for the specified schema and
area, and job status information to be
displayed for each job that is using CDCS
and the specified area.

Causes job status information to be dis
played for each job that is currently using
CDCS.
STATUS,J0B=xxx
S p e c i fi e s a p a r t i c u l a r j o b n a m e . T h i s
command causes job status information to be
displayed for the specified job.
TERM Command
The TERM command specifies that usage of CDCS is to
be shut down, but that all active jobs using CDCS
are to be allowed to complete processing normally.
The format of the TERM command is as follows:
TERM.

,sc :,all:
er- (schema-name
|" ._ ( \area-name
r .... =version-name3
'SC"
\schema-id ( JL'AR"
area-id j )C'VN"
( STATUS\
,J0B= job-name
moc T
e n - { S scnema_id
schema-n
m e \ {area_1d
[ . _ f a r }e aC,VN=version-name]JJ
- n a m e } P . . . . - " fl
.JOBS
^,SC»
) a[,AR=

Figure 10-9. STATUS Command

10-14

60485200 A

TABLE 10-2. INFORMATION RETURNED BY THE STATUS COMMAND
Information Displayed

Type of Information
Schema Status Information

Schema id and name
Schema status (DOWN, IDLE, UP, or ERROR)
Number of schema users
Current status of the log files indicated as follows:
JLF
QRF
TRF
RIF

Area Status Information

j o u r n a l l o g fi l e
q u i c k r e c o v e r y fi l e
t r a n s a c t i o n r e c o v e r y fi l e
r e s t a r t i d e n t i fi e r fi l e

Area id and name
Area status (DOWN, IDLE, UP, or ERROR)
Area activity (active or inactive)
Number of users (indicated only if the area is active)
Version name

Job Status Information

Job name
Program name
Task id for task executing through the Transaction Facility (TAF)
Job activity (active, inactive, or rolled out)
Schema id and name
Subschema name
Name of currently requested function
Name of currently requested version

When the TERM command is specified, any program
that subsequently attempts to issue an invoke call
to CDCS is aborted. All programs already using
CDCS are permitted to continue processing until
completion. When the number of CDCS users reaches
z e r o , C D C S i s t e r m i n a t e d . T h e e ff e c t o f a T E R M
command can be counteracted by specifying an
UP,CDCS command. Each occurrence of a TERM command
is echoed in the system dayfile and in the system
c o n t r o l p o i n t d a y fi l e .
UP Command
The UP command specifies that usage of CDCS, of a
particular schema, or of a particular area that has

previously been shut down is to be restarted. The
UP command can be used to allow access again to a
schema or area that has had an error status. The
format of the UP command is shown in figure 10-10.
Options used for parameters in the UP command are
defined in table 10-1.
An UP,CDCS command counteracts a DOWN,CDCS command,
an IDLE,CDCS command, or a TERM command. All
i n v o k e c a l l s t o C D C S s u b s e q u e n t t o t h e U P, C D C S
command will be allowed. However, the down status
of a schema or areas in a schema is not affected by
an UP,CDCS command; all schemas or areas marked
down remain down. All UP,CDCS commands are dis
p l a y e d i n t h e s y s t e m d a y fi l e a n d i n t h e s y s t e m
c o n t r o l p o i n t d a y fi l e .

Figure 10-10. UP Command

60485200 A

10-15

An UP command that specifies a schema name or
schema id removes the down status or error status
of the indicated schema and its associated areas or
terminates the effects of an IDLE command on the
schema. All subsequent invoke calls using the
schema will be allowed.
An UP command that specifies an area name or an
area id removes the down status or error status of
the indicated area or terminates the effects of an
IDLE command on the area. All subsequent invoke
calls to subschemas that use the area will be
allowed if other required areas are usable.
The requirements for usage of a version name in the
UP command are the same as those described for the
DOWN command. Refer to the description of the DOWN
command for version name specification requirements.
An UP command to counteract a DOWN command of a
particular schema or area cannot be issued until
the down status of that schema or area is complete.

Paging and Cycling Commands
The operator can use the + and - keys to display
lines of information that are not currently dis
played. (The programmable display affected is the
K display for NOS or the L display for NOS/BE.)
The . (period) key can be entered to cycle through
the lists of available commands and command
options. The keys and the actions they initiate
are listed in table 10-3.

TABLE 10-3. PAGING AND RECYCLING COMMANDS

/f<3Sx

Action

Key

Advances the K/L display to the next page
of information. This key is valid only
if the following message appears at the
bottom of the currently displayed infor
mation:
(ENTER + TO SEE NEXT PAGE).
If this message does not appear, entering
the + key has no effect. If the page
currently displayed contains the last
line of information, the message
(END OF LIST)
is shown at the bottom of the page.
Backs up the K/L display to the previous
page of information. This key is valid
only if the following message appears at
the bottom of the currently displayed
information
(ENTER - TO SEE PREVIOUS
PAGE).
If this message does not appear, entering
the - key has no effect. If the page
c u r r e n t l y d i s p l a y e d c o n t a i n s t h e fi r s t
line of information, the message:

Sample Operator Interface
A series of operator commands illustrating the
communication between the operator and CDCS is
p r e s e n t e d i n fi g u r e 1 0 - 1 1 . U s e o f a c a r r i a g e
return to terminate each command is assumed. After
the K or L display has been called, a STATUS com
mand is entered to determine which schemas are
currently active. The operator should note that
under NOS, the character K precedes only the first
message typed to CDCS. DSD retains the K or L
display for operator convenience. After examining
the status of CDCS, the operator enters an IDLE
command to terminate CDCS when all active jobs have
c o m p l e t e d p r o c e s s i n g . F i n a l l y, t h e o p e r a t o r
replaces the K or L display with the A display. To
do this under NOS, the operator enters the left
b l a n k k e y f o l l o w e d b y a c a l l t o t h e A d i s p l a y. To
do this under NOS/BE, the operator enters the right
blank key.
NOS Example
K,cpnum.
K.STATUS,SC.
IDLE,CDCS.
Left blank key
A.

NOS/BE Example
L=ord.
STATUS,SC.
IDLE,CDCS.
Right blank key

Figure 10-11. Sample Series of
Operator Commands

(BEGINNING OF LIST)
is displayed at the top of the page.
Cycles through command/option lists.
When the K/L display is first assigned
to CDCS, the main display shows a list of
the commands available to the operator.
Entering a period causes the display to
cycle to a list of the options that can
be specified in the STATUS command.
Entering another period causes the
display to cycle back to the command
list.

CDCS TERMINATION
Two options are provided for termination of CDCS by
the system operator. Either the special CDCS DOWN
or TERM command or the operating system DROP com
mand (STOP command in NOS) can be entered at the
console to terminate CDCS. The DOWN and TERM
commands, which have been described previously in
this section, are preferred because they cause
gradual shutdown; normally, DROP or STOP should not
be used.

^^\
10-16

60485200 A

>glSS\

rWith

U n d e r N O S / B E , t h e D R O P c o m m a n d c a n b e e n t e r e d a t T h e o p e r a t o r s p e c i fi e s t h e C D C S c o n t r o l p o i n t
the console to terminate CDCS. The DROP command number for n.
has the following format:
t nh .eD R O P

p e r a t i n go r
D R Oo P

s y sSt T
em
OP

a l s co o m m aa nb do ,r t s
l lC S
u s e r a b o r tj so .b s .
Ca D
TAhl el
a c t i v e l o g fi l e s a r e r e t u r n e d .
T h e o p e r a t o r s p e c i fi e s t h e C D C S c o n t r o l p o i n t
number
for
n.
N o r m a l l y,
this
method
of
CDCS
termination
is
not
used because of the possible negative effect on
U n d e r N O S , t h e S TO P c o m m a n d c a n b e u s e d t o t e r m i - c u r r e n t l y a c t i v e r u n - u n i t s a n d t h e i m p l i c a t i o n s f o r
n a t e C D C S . T h e S TO P c o m m a n d i s e n t e r e d a s f o l l o w s : d a t a b a s e r e c o v e r y. T h i s m e t h o d s h o u l d b e u s e d
only when CDCS processing must be terminated
n.STOP
i m m e d i a t e l y.

J0^\

60485200

A

10-17

!/**%

0*%

EXAMPLES

11

/sP^N

The examples in this section show various phases of
CDCS data base preparation for a sample manufactur
ing data base. In preparing the data base, the
data administrator creates a schema, subschemas,
a n d a m a s t e r d i r e c t o r y, a n d i n i t i a l i z e s l o g a n d
r e c o v e r y fi l e s . S a m p l e j o b s t h a t t h e d a t a a d m i n i
strator uses to accomplish these tasks are shown in
this section.
T h e e x a m p l e s i n t h i s s e c t i o n r e fl e c t o p e r a t i o n
under the NOS operating system. Conversion to the
NOS/BE operating system can be accomplished by
making the following changes:
Substitute a NOS/BE ACCOUNT control statement
for the NOS USER and CHARGE control statements.
Substitute the NOS/BE REQUEST and CATALOG
control statements for the NOS DEFINE control
statement.
S u b s t i t u t e t h e N O S / B E fi l e i d e n t i fi c a t i o n
p a r a m e t e r I D f o r t h e N O S fi l e i d e n t i fi c a t i o n
parameter UN.
Omit the NOS PERMIT control statements.
The examples are shown as batch jobs. The end-ofrecord that is required to separate control state
ments from source input in the job stream Is shown
in the examples by the symbol —EOR—.

SAMPLE SCHEMA
The first phase of data base preparation is schema
c r e a t i o n . A s a m p l e s c h e m a i s s h o w n i n fi g u r e
11-1. The schema is called MANUFACTURING-DB and
includes seven data base areas: EMPLOYEE, JOBDETAIL,
DEPARTMENTS, PROJECT, DEVELOPMENT-PRODUCTS, TESTS,
and CDCSCAT.
The control statements required for the job include
a FILE control statement for each area specified in
t h e s c h e m a . T h e fi l e o r g a n i z a t i o n s p e c i fi e d f o r
t h e a r e a i n t h e fi l e c o n t r o l s t a t e m e n t i s e v e n t u
ally associated with the permanent file (data base
fi l e ) t h r o u g h p e r m a n e n t fi l e I n f o r m a t i o n i n t h e
master directory. The DEFINE control statement is
also included in the job stream to establish the
permanent file that contains the schema directory.
In the schema source input, access control locks
a r e s p e c i fi e d f o r e a c h a r e a . T h i s s c h e m a i l l u s
trates using either one or two locks for an area.
Two locks are specified for area EMPLOYEE, with one
lock required for update and the other required for
retrieval. A single lock applying for both update
and retrieval is specified for area JOBDETAIL.

60485200 E

Area information is provided in the data control
e n t r y. T h e p r i m a r y k e y f o r e a c h a r e a m u s t b e
s p e c i fi e d i n t h e e n t r y. E M P - I D o f E M P R E C ( a r e a
EMPLOYEE) and a concatenated key CONCATKEY (area
JOBDETAIL) are examples of primary keys specified
for two areas. Alternate keys are optional and are
s p e c i fi e d f o r fi v e a r e a s .
A r e a C D C S C AT i l l u s t r a t e s t h e d e s c r i p t i o n r e q u i r e d
for an area that can be used as a catalog file for
a Query Update application using CDCS catalog
mode. The primary key QUCAT-KEY is a 10-character,
alphanumeric data item. The length of item QUCATITEM corresponds to the Query Update's default
transmission length (1030 characters). The collat
i n g s e q u e n c e s p e c i fi e d i n t h e d a t a c o n t r o l e n t r y
for the area is DISPLAY.
A constraint entry called PR0J-C0NST associates the
PROJECT and DEVELOPMENT-PRODUCTS areas through a
common data item PROJECT-ID, with the record PROJREC
being designated as the dominant record and DEVREC
being designated as the dependent record in the
constraint. CDCS enforces the constraint during
update operations. A record in the PROJECT area
cannot be deleted if the value of the PROJECT-ID
also occurs in the DEVELOPMENT-PRODUCTS area.
Similarly, the value of PROJECT-ID cannot be modi
fied in a record in the PROJECT area if the modifi
cation references a value of PROJECT-ID occurring
in both areas. Also, a record cannot be added to
the DEVELOPMENT-PRODUCTS area if the value of the
PROJECT-ID does not occur in the PROJECT area.
A relation entry called EMP-REL is used to join the
areas EMPLOYEE and JOBDETAIL. The areas are joined
by identical data items EMP-ID, which occurs in
each area. This relation links employee informa
tion in both areas.

SAMPLE SUBSCHEMAS
The second phase of data base
subschema creation. One sample
following kinds of subschemas is
s e c t i o n : C O B O L , F O RT R A N 5 , a n d

preparation is
of each of the
shown in this
Query Update. |

COBOL SUBSCHEMA
Sample COBOL subschema C5SS-PR0DUCT-PERS0NNEL is
s h o w n i n fi g u r e 1 1 - 2 . A f t e r c o m p i l a t i o n , t h e
subschema directory resides on the subschema
library C5SSLIB (the job creates the subschema
library).

11-1

Job statement
USER control statement
CHARGE control statement
DEFINE ,MANUFAC.
FILE(EMPLOYE,F0=IS,XN=IXEMP)
FILE(J0BDETA,F0=IS)
FILE(DEPARTM,FO=IS,XN=IXDEPTi,RT=T)
FILE(PROJ ECT,FO=DA,XN=IXPROJ,,HMB=7)
FILE(DEVELOP,FO=DA,XN=IXDEV,HMB=11)
FILE(TESTS,FO=IS,XN=IXTEST)
FILE(CDCSCAT,FO=IS)
DDL3,DS,SC=NANUFAC.
--EORSCKEMA NAME IS MANUFACTURING--DB.
AREA IS EMPLOYEE
ACCESS-CONTROL LOCK FOR RETRIEVAL IS "EMP-READ"
ACCESS-CONTROL LOCK FOR UPDATE IS "EMP-WRITE"
CALL OPENEMP BEFORE OPEN.
RECORD IS EMPREC WITHIN EMPLOYEE.
01 EMP-ID
PICTURE "X(8)".
01 SALARY
TYPE FIXED DECIMAL 8,2
CALL EMPCHK BEFORE.
01 EMP-LAST-NAME
PICTURE "A(20)M.
01 EMP-INITIALS
PICTURE "A(4)".
01 DEPT
PICTURE "X(4)".
01 ADDRESS-NUMBERS
PICTURE *'X<6>".
01 ADDRESS-STREET
PICTURE "XC20)".
01 ADDRESS-CITY
PICTURE "Ad5)".
PICTURE "A(15)H.
01 ADDRESS-STATE-PROV
01 POSTAL-CODE
PICTURE "X(10)".
01 ADDRESS-COUNTRY
PICTURE "A(15)".
01 PHONE-NO
PICTURE "9(10)".
01 HIRE-DATE
PICTURE "9(6)".
01 INSURANCE-NO
PICTURE "9(10)".
01 NUM-DEPENDENTS
TYPE DECIMAL FIXED 2.
01 JOB-CLASS
PICTURE "A"
FOR ENCODING CALL DBPJC1
FOR DECODING CALL DBPJC2.
01 GRADE-LEVEL
PICTURE "9"
CHECK VALUE 0 THRU 8.

/*
*/

y^^\

THE FOLLOWING ARE YEAR--TO-DATE TOTALS

01
01
01
01
01

GROSS
FED-TAX
STATE-TAX
DISABILITY
SS-INSURANCE

TYPE DECIMAL FIXED 7,2.
TYPE DECIMAL FIXED 7,2.
TYPE DECIMAL FIXED 6,2.
TYPE DECIMAL FIXED 5,2.
TYPE DECIMAL FIXED 4,4.

Figure 11-1. Sample Schema Named MANUFACTURING-DB (Sheet 1 of 4)

11-2

60485200 A

,*«3^V

AREA IS JOBDETAIL
ACCESS-CONTROL LOCK IS 'ABCDEFZ".
RECORD IS JOBREC WITHIN JOBDETAIL
CALL DELCHK BEFORE DELETE.
01 EMP-ID
PICTURE "X(8)M.
01 SEQ-NO
PICTURE "X(4)".
01 PRODUCT-ID
PICTURE "X(10)".
01 SECURITY-CODE
PICTURE "X(2)M.
01 PROJECT-ID
PICTURE "X(10)".
01 MONTHLY-COMPENSATION OCCURS 12 TIMES.
02 REG-HOURS
TYPE DECIMAL FIXED 5,2.
02 REG-COMPENSATION TYPE DECIMAL FIXED 6,2.
02 OT-HOURS
TYPE DECIMAL FIXED 5,2.
02 OT-COMPENSATION
TYPE DECIMAL FIXED 6,2.
01 HOURS-YTD
TYPE DECIMAL FIXED 6,2
VIRTUAL RESULT OF CALCHR.
01 C0MPENSAT7.0N-YTD
TYPE DECIMAL FIXED 10,2
VIRTUAL RESULT OF CALCCP.
01 START-DATE
PICTURE "9(6)".
01 LOC-CODE
PICTURE "X(4)".
01 ACTUAL-DATE
PICTURE "X(6)"
ACTUAL RESULT OF DATESP.
AREA IS DEPARTMENTS
ACCESS-CONTROL LOCK IS 'VERY*PRIVATE".
RECORD IS DEPTREC WITHIN DEPARTMENTS.
01 DEPT-NO
PICTURE "X(4)".
01 DEPT-NAME
PICTURE "X(20)".
01 MGR-ID
PICTURE "X(8)".
01 MGR-NAME
PICTURE "X(20)".
01 NUM-ITEM
PICTURE "9(3)"
CHECK VALUE 5 THRU 25.
01 ITEM
OCCURS NUM-ITEM TIMES.
02 LOC-CODE
PICTURE "X(4)".
02 HEAD-COUNT
PICTURE "9(4)".
02 EXPENSES-YTD
PICTURE "9(8)V99T".
02 BUDGET
PICTURE "9(8)T".
AREA IS PROJECT
ACCESS-CONTROL LOCK FOR RETRIEVAL IS "VERIFIED-INPUT"
ACCESS-CONTROL LOCK FOR UPDATE IS "OKAYED-OUTPUT".
RECORD IS PROJREC WITHIN PROJECT.
01 PROJECT-ID
PICTURE "X(10)".
01 PROJ-DESCR
PICTURE "X(40)".
01 BUDGET-TOTAL
PICTURE "9(9)V99".
01 MONTHLY-BUDGET
PICTURE "9(7)V99" OCCURS 12 TIMES.
01 SCHED-COMPLETE
PICTURE "XdO)".
01 RESPONSIBILITY
PICTURE "X(8)".
AREA IS DEVELOPMENT-PRODUCTS
ACCESS-CONTROL LOCK IS ''ACCESS(/)0K".
RECORD IS DEVREC WITHIN DEVELOPMENT-PRODUCTS.
01 PRODUCT-ID
PICTURE "XdO)".
01 PRODUCT-DESCR
PICTURE "X(20)".
01 CLASS
PICTURE "9(2)"
CHECK VALUE 0 THRU 99.
01 PRICE
TYPE DECIMAL FIXED 5,2.
01 EVAL-ID
TYPE CHARACTER 20 OCCURS 10 TIMES.
01 PROJECT-ID
PICTURE "XdO)".
01 NUM-TESTED
TYPE DECIMAL FIXED 4.
01 CUM-TEST-AVERAGE
TYPE FLOAT.
01 STATUS-CODE
PICTURE "A".
01 SECURITY-CODE
PICTURE "X(2)".
01 EST-COST
PICTURE "9(4)PPP".
01 DEV-COST-YTD
TYPE DECIMAL FIXED 9,2.
Figure 11-1. Sample Schema Named MANUFACTURING-DB (Sheet 2 of 4)

60485200 A

11-3

AREA IS TESTS
ACCESS-CONTROL LOCK FOR UPDATE IS "UP"
ACCESS-CONTROL LOCK FOR RETRIEVAL IS "DOWN".
RECORD IS TESTREC WITHIN TESTS.
TESTNO
TYPE DECIMAL FIXED.
TYPE CHARACTER 20.
TNAME
PRDCTNO
TYPE CHARACTER 10.
TESTER
TYPE DECIMAL FIXED 8.
TOTALCT
TYPE DECIMAL FIXED 4.
TYPE DECIMAL FIXED 3
N
CHECK VALUE 0 THRU 100.
PASPROB
TYPE FLOAT OCCURS 100 TIMES
CHECK VALUE 0.0 THRU 1.0.

i ^ ^ U

AREA NAME IS CDCSCAT
ACCESS-CONTROL LOCK IS "PERMISSION*GRANTED".
RECORD IS QUCATREC WITHIN CDCSCAT.
Q U C AT- K E Y P I C T U R E " X d O ) " .
Q U C AT - I T E M P I C T U R E " X ( 1 0 3 0 ) "
DATA CONTROL.
AREA NAME IS EMPLOYEE
KEY IS EMP-ID OF EMPREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE DEPT
DUPLICATES ARE INDEXED.
AREA NAME IS JOBDETAIL
KEY ID IS CONCATKEY < EMP-ID OF JOBREC
SEQ-NO >
DUPLICATES ARE NOT ALLOWED.
AREA NAME IS DEPARTMENTS
KEY IS DEPT-NO
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE MGR-ID
DUPLICATES ARE FIRST.

Z*3^.

AREA NAME IS PROJECT
KEY IS PROJECT-ID OF PROJREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE RESPONSIBILITY
DUPLICATES ARE ALLOWED.
AREA NAME IS DEVELOPMENT-PRODUCTS
KEY IS PRODUCT-ID OF DEVREC
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE PROJECT-ID OF DEVREC
DUPLICATES ARE ALLOWED
KEY IS ALTERNATE EVAL-ID
DUPLICATES ARE INDEXED.
AREA NAME IS TESTS
KEY IS TESTNO
DUPLICATES ARE NOT ALLOWED
KEY IS ALTERNATE TNAME
DUPLICATES ARE INDEXED
KEY IS ALTERNATE TESTER
DUPLICATES ARE FIRST
SEQUENCE IS ASCII.
AREA NAME IS CDCSCAT
KEY IS QUCAT-KEY OF QUCATREC
DUPLICATES ARE NOT ALLOWED
SEQUENCE IS DISPLAY.
Figure 11-1. Sample Schema Named MANUFACTURING-DB (Sheet 3 of 4)

11-4

60485200 A

CONSTRAINT NAME IS MGR-CONST
MGR-ID OF DEPTREC DEPENDS ON EMP-ID OF EMPREC.
CONSTRAINT NAME IS PROJ-CONST
PROJECT-ID OF DEVREC DEPENDS ON PROJECT-ID OF PROJREC.
RELATION NAME IS EMP-REL
JOIN WHERE EMP-ID OF JOBREC EQ EMP-ID OF EMPREC.
RELATION NAME IS TEST-REL
JOIN WHERE PRDCTNO OF TESTREC EQ PRODUCT-ID OF DEVREC.
RELATION NAME IS DPD-REL
JOIN WHERE MGR-ID OF DEPTREC EQ RESPONSIBILITY OF PROJREC
PROJECT-ID OF PROJREC EQ PROJECT-ID OF DEVREC.
Figure 11-1. Sample Schema Named MANUFACTURING-DB (Sheet 4 of 4)

Job statement
USER control statement
CHARGE control. statement
DEFINE,C5SSLIB.
ATTACH,MANUFAC.
DDL3,C5,SB=C5SSLIB,SC=MANUFAC.
—EOR—
TITLE DIVISION.
S
S C5SS-PR0DUCT-PERS0NNEL WITHIN MANUFACTURING-DB.
ALIAS DIVISION.
A
D REALM JOBDETAIL BECOMES WORK-FILE.
A
D RECORD JOBREC BECOMES WORK-REC.
A
D RECORD EMPREC BECOMES EMP-REC.
A
D DATA LOC-CODE BECOMES LOCATION.
REALM DIVISION.
R
D EMPLOYEE, WORK-FILE.
RECORD DIVISION.
01 EMP -REC.
03 EMP-ID
03 SALARY

03
03
03
03

03
03

03
03

EMP-LAST-NAME
EMP-INITIALS
DEPT
MAILING-ADDRESS.
05 ADDRESS-NUMBERS
05 ADDRESS-STREET
05 ADDRESS-CITY
05 ADDRESS-STATE-PROV
05 POSTAL-CODE
PHONE-NO
PHONE
05 AREA-CODE
05 PREFIX
05 DIGITS
JOB-CLASS
GRADE-LEVEL

PICTURE X(8).
PICTURE 9(6)V99
USAGE IS COMP-1.
PICTURE A(20).
PICTURE A(4).
PICTURE X(4).
PICTURE X(6).
PICTURE X(20).
PICTURE X(15).
PICTURE X(15).
PICTURE XdO).
PICTURE 9(10).
REDEFINES PHONE-NO.
PICTURE 999.
PICTURE 999.
PICTURE 9999.
PICTURE A.
PICTURE 9.

Figure 11-2. Sample COBOL Subschema Named C5SS-PR0DUCT-PERS0NNEL
and Subschema Library Creation (Sheet 1 of 2)

60485200 A

11-5

01 WORK-REC.
03 CONCATKEY.
05 EMP-ID
05 SEQ-NO
03 PRODUCT-ID
03 SECURITY-CODE
03 MONTHLY-COMPENSATION
05 REG-HOURS
05 REG-COMPENSATION
05 OT-HOURS
05 OT-COMPENSATION
03 HOURS-YTD

03 COMPENSATION-YTD
03 LOCATION

PICTURE X(8).
PICTURE X(4).
PICTURE XdO).
PICTURE X(2).
USAGE IS COMP-1
OCCURS 12 TIMES.
PICTURE 9(3)V99.
PICTURE 9(4)V99.
PICTURE 9(3)V99.
PICTURE 9(4)V99.
PICTURE 9(4)V99
USAGE IS COMP-1.
PICTURE 9(8)V99
USAGE IS COMP-1.
PICTURE X(4).

RELATION DIVISION.
R
N IS EMP-REL
RESTRICT WORK-REC WHERE SECURITY-CODE GE "B1".
Figure 11-2. Sample COBOL Subschema Named C5SS-PR0DUCT-PERS0NNEL
and Subschema Library Creation (Sheet 2 of 2)

The subschema includes realm definitions for schema
areas EMPLOYEE and JOBDETAIL. Area JOBDETAI is
assigned the alias realm name of WORK-FILE. This
subschema is a basic example illustrating the
manner in which items can be omitted, reordered,
given alias names, and redefined (by the REDEFINES
clause).
The subschema includes relation EMP-REL on which a
restriction is placed. When records are read by
use of the relation, only those records in which
the value of data item SECURITY-CODE is greater
than or equal to Bl are returned.

FORTRAN 5 SUBSCHEMA
Sample FORTRAN 5 subschema F5SS-PR0DUCT-EVALUATI0N
I i s s h o w n i n fi g u r e 11 - 3 . A f t e r c o m p i l a t i o n , t h e
subschema directory resides on the subschema
library F5SSLIB (the job creates the subschema
library).

T h e s u b s c h e m a i n c l u d e s d e fi n i t i o n s f o r t w o a r e a s
defined in the schema, areas DEVELOPMENT-PRODUCTS
and TESTS. Area TESTS was included in the sample
FORTRAN subschema shown previously. The two sam
ples show differences in defining character data in
FORTRAN 4 and FORTRAN 5 subschemas.
Many alias statements are included in this sub
schema. The area DEVELOPMENT-PRODUCTS is given an
alias realm name PRODUCT-FILE. Many schema data
names are given alias data Item names because the
data names in the schema exceed seven characters
and include hyphens and, therefore, cannot be used
in a FORTRAN program. The alias names specified in
the ALIAS statements for data items are names
acceptable to the FORTRAN compiler.
T h e s u b s c h e m a i n c l u d e s r e l a t i o n T E S T- R E L , w h i c h
joins two realms. When an application program uses
the relation in a DML READ statement, corresponding
record occurrences from both realms are returned to
t h e p r o g r a m . T h e r e s t r i c t i o n q u a l i fi e s t h e r e l a
tion and allows a record occurrence to be returned
from realm PRODUCT-FILE only if the value of STATUS
equals A.

^SSSSs.

11-6

60485200 E

Job statement
USER control statement
CHARGE control statement
DEFINE,F5SSLIB.
ATTACH,MANUFAC.
DDLF,F5,SB=F5SSLIB,SC=MANUFAC'.
—EOR—
SUBSCHEMA F5SS-PRODUCT-EVALUATION, SCHEMA=MANUFACTURING-DB
ALIAS (REALM) PRODUCT-FILE = DEVELOPMENT-PRODUCTS
ALIAS (RECORD) PRODREC = DEVREC
ALIAS (ITEM) PRODUCT = PRODUCT-ID
ALIAS (ITEM) EVALID = EVAL-ID
ALIAS (ITEM) PROJECT = PROJECT-ID
ALIAS (ITEM) NTESTED = NUM-TESTED
ALIAS (ITEM) AVG = CUM-TEST-AVERAGE
ALIAS (ITEM) STATUS = STATUS-CODE
REALM PRODUCT-FILE, TESTS
RECORD PRODREC
CHARACTER *10 PRODUCT
CHARACTER *2 CLASS
CHARACTER *20 EVALID(10)
CHARACTER *4 PROJECT
CHARACTER *1 STATUS
INTEGER PRICE, NTESTED
REAL AVG
RECORD TESTREC
INTEGER TESTNO
CHARACTER *20 TNAME
CHARACTER *10 PRDCTNO
INTEGER N, TOTALCT
REAL PASPROBdOO)
RELATION TEST-REL
RESTRICT PRODREC (STATUS .EQ. 'A' .OR. STATUS .EQ. 'R')
END
Figure 11-3. Sample FORTRAN 5 Subschema Named F5SS-PR0DUCT-EVALUATI0N
and Subschema Library Creation

60485200

E

11 - 7

QUERY UPDATE SUBSCHEMA
Sample
| fi g u r e
stream
to the

Query Update subschema QUPRODMGT is shown In
11 - 4 . T h e c o n t r o l s t a t e m e n t s i n t h e j o b
show that the subschema directory is added
subschema library QUSSLIB.

The subschema in c l u d e s r e a l m d e fi n i t i o n s f o r f o u r
areas defined in the schema: DEPARTMENTS (which is
given the alias realm name DEPTAREA), PROJECTS,
DEVELOPMENT-PRODUCTS (which is given the alias
realm name PRODAREA), and CDCSCAT (a catalog file
for use in CDCS catalog mode).

The subschema includes a three-area relation
DPD-REL. The relation is used by Query Update
(through CDCS) any time a query requires retrieval
from the three areas joined in the relation; there
f o r e , w i t h a s i n g l e q u e r y, t h e Q u e r y U p d a t e u s e r
can receive information about a department, the
projects under control of the department, and the
products involved in a particular project. A
restriction Is placed on the relation so that only
records from realm PRODAREA in which the value of
data name STATUS-CODE equals A are returned on a
r e l a t i o n a l q u e r y.

Job statement
USER control statement
CHARGE control statement
ATTACH,QUSSLIB/M=W.
ATTACH,MANUFAC.
DDL3,QC,SB =QUSSLIB,SC=MANUFAC.
—EOR—
TITLE DIVISION.
SS QUPRODMGT WITHIN MANUFACTURING-DB.
ALIAS DIVISION.
AD REALM DEVELOPMENT-PRODUCTS BECOMES PRODAREA.
AD RECORD DEVREC BECOMES PRODREC.
AD DATA CUM-TEST-AVERAGE BECOMES CUMULATIVE-AVERAGE.
AD REALM DEPARTMENTS BECOMES DEPTAREA.
REALM DIVISION.
RD DEPTAREA, PROJECT , PRODAREA, CDCSCAT.
RECORD DIVISION.
01 DEPTREC.
03 DEPT-NO
03 DEPT-NAME
03 MGR-ID
03 MGR-NAME
03 NUM-ITEM
03 ITEM
05 LOC-CODE
05 HEAD-COUNT
05 EXPENSES-YTD
05 BUDGET

01

PROJREC.
03 PROJECT-ID
03 PR0J-DESCR
03 BUDGET-TOTAL
03 RESPONSIBILITY

01

PRODREC.
03 PRODUCT-ID
03 CLASS
03 PRICE
03 PROJECT-ID
03 STATUS-CODE
03 DEV-C0ST-YTD

01 QUCATREC.

03 QUCAT-KEY
03 QUCAT-ITEM

PICTURE X(4).
PICTURE X(20).
PICTURE X(8).
PICTURE X(20).
PICTURE 9(3).
OCCURS 2 TO 25 TIMES
DEPENDING ON NUM-ITEM.
PICTURE X(4).
PICTURE Z(4).
PICTURE Z(8).99.
PICTURE Z(9).
PICTURE X(10).
PICTURE X(40).
PICTURE Z(9).99.
PICTURE X(8).
PICTURE XdO).
PICTURE Z9.
PICTURE Z(5).99
USAGE IS COMP-1.
PICTURE XdO).
PICTURE A.
PICTURE Z(8)9.99
USAGE IS COMP-1.
PICTURE XdO).
PICTURE X(1030).

RELATION DIVISION.
RN IS DPD-REL
RESTRICT PRODREC WHERE STATUS-CODE EQ "A".
..
Figure 11-4. Adding Sample Query Update Subschema Named QUPRODMGT
to the Subschema Library
11-8

60485200 E

SAMPLE MASTER DIRECTORY
CREATION RUN
The third phase of data base preparation is the
master directory creation. A sample master direc
tory creation run is shown in figure 11-5.
The control statements in the job stream show that
the schema directory and subschema directories must
be available to the DBMSTRD utility as it generates
t h e m a s t e r d i r e c t o r y fi l e . T h e m a s t e r d i r e c t o r y
must be stored as a permanent file, MSTRDIR in this
example.
The PERMIT control statement shown in the job
stream applies to NOS only. This control statement

Job statement
USER control statement
CHARGE control statement
DEFINE,MSTRDIR.
PERMIT,MSTRDIR,DBCNTLX=W.
ATTACH,MANUFAC.
ATTACH,C5SSLIB.
ATTACH,F4SSLIB.
ATTACH,QUSSLIB.
DBMSTRD,NMD=MSTRDIR,LD.
—EOR—

m a k e s t h e m a s t e r d i r e c t o r y fi l e a v a i l a b l e w i t h
write (W) permission to CDCS or any job that exe
cutes under the user number DBCNTLX.
The sample master directory provides all the infor
mation necessary for CDCS to monitor processing of
t h e m a n u f a c t u r i n g d a t a b a s e . I n f o r m a t i o n s p e c i fi e d
in the master directory includes references to the
s c h e m a a n d s u b s c h e m a s , s p e c i fi c a t i o n o f l o g a n d
r e c o v e r y fi l e s , s p e c i fi c a t i o n o f a d a t a b a s e p r o c e
d u r e l i b r a r y, a n d p e r m a n e n t fi l e i n f o r m a t i o n f o r
areas. The schema entry in the master directory
source input includes selection of a full set of
l o g a n d r e c o v e r y fi l e s a n d s p e c i fi c a t i o n o f j o b
control information. Only one data base version
(MASTER) is included in this creation run.

AREA NAME IS DEPARTMENTS
PFN IS "MDEPT" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
INDEX FILE ASSIGNED
PFN "MXDEPT" UN IS "CDCS23".

SCHEMA NAME IS MANUFACTURING-DB
FILE NAME IS MANUFAC
PROCEDURE LIBRARY
PFN IS "DB1PLIB" UN IS "CDCS23"
TRANSACTION RECOVERY FILE
PFN IS "DB1TRF" UN IS "CDCS23"
UNIT LIMIT IS 50
UPDATE LIMIT IS 15
RESTART IDENTIFIER FILE
PFN IS "DB1RIF" UN IS "CDCS23"
JOURNAL LOG FILE
PFN IS "DB1JLF" UN IS "CDCS23"
QUICK RECOVERY FILE
PFN IS "DB1QRF" UN IS "CDCS23"
JOB CONTROL INFORMATION
TAPE TYPE IS NT
DENSITY IS PE
UN IS "CDCS23"
CHARGE IS "1982CHG".
VERSION NAME IS MASTER
AREA NAME IS EMPLOYEE
PFN IS "MEMPL" UN IS "CDCS23"
PW IS "0KCDCS2"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXEMPL" UN IS "CDCS23".
AREA NAME IS JOBDETAIL
PFN IS "MJOBD" UN IS "CDCS23"
PW IS "0KCDCS2"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS.

AREA NAME IS PROJECT
PFN IS "MPROJ" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXPROJ" UN IS "CDCS23".
AREA NAME IS DEVELOPMENT-PRODUCTS
PFN IS "MDEVE" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
INDEX FILE ASSIGNED
PFN IS "MXDEVE" UN IS "CDCS23".
AREA IS TESTS
PFN IS "MTEST" UN IS "CDCS23"
LOG BEFORE IMAGE BLOCKS
BEFORE IMAGE RECORDS
AFTER IMAGE RECORDS
INDEX FILE ASSIGNED
PFN "MXTEST" UN IS "CDCS23".
AREA NAME IS CDCSCAT
PFN IS "MQCAT" UN IS "CDCS23".
SUBSCHEMA NAME IS C5SS-PR0DUCT-PERS0NNEL
FILE NAME IS C5SSLIB.
SUBSCHEMA NAME IS C5SS-PR0DUCT-MANAGEMENT
FILE NAME IS C5SSLIB.
SUBSCHEMA NAME IS F4SS-TESTING
FILE NAME IS F4SSLIB.
SUBSCHEMA NAME IS F4SS-PR0DUCT-MANAGEMENT
FILE NAME IS F4SSLIB.
SUBSCHEMA NAME IS QUCREA6
FILE NAME IS QUSSLIB.
SUBSCHEMA NAME IS QUPRODMGT
FILE NAME IS QUSSLIB.

Figure 11-5. Sample Master Directory Creation Run

60485200 E

11-9

SAMPLE MASTER DIRECTORY
MODIFICATION RUN
A possible fourth phase in data base preparation is
m o d i fi c a t i o n o f a m a s t e r d i r e c t o r y . A s a m p l e
m a s t e r d i r e c t o r y m o d i fi c a t i o n r u n i s s h o w n i n
| fi g u r e 11 - 6 .
T h e c o n t r o l s t a t e m e n t s i n t h e m o d i fi c a t i o n r u n
include an ATTACH of the schema directory file and
an ATTACH of the subschema library for a subschema
being added. The old master directory, residing on
file MSTRDIR, is also attached. The DBMSTRD con
trol statement specifies the OMD parameter (which
i n d i c a t e s t h e o l d m a s t e r d i r e c t o r y fi l e ) a n d t h e
NMD parameter (which indicates the new master
d i r e c t o r y fi l e ) . I n a m o d i fi c a t i o n r u . i , n o c h a n g e s
are made to the old master directory file; a new,
modified master directory is generated and written
to a new master directory file.
This modification run changes the master directory
as follows:
C h a n g e s p e r m a n e n t fi l e i n f o r m a t i o n f o r t h e
p r o c e d u r e l i b r a r y fi l e .
Changes permanent file information and logging
specifications for area TESTS (version MASTER).

Job statement
USER control statement
CHARGE control statement
DEFINE,NEWMSTR.
PERMIT,NEWMSTR,DBCNTLX=W.
ATTACH,MSTRDIR.
ATTACH,MANUFAC.
ATTACH,F5SSLIB.
DBMSTRD,OMD=MSTRDIR,NMD=NEWMSTR,LD.
PURGE,MSTRDIR.
—EOR—
MODIFY SCHEMA IS MANUFACTURING-DB
FILE NAME IS MANUFAC.
CHANGE PROCEDURE LIBRARY
PFN IS "NEWPLIB" UN IS "CDCS23"
PW IS "DMS170".
CHANGE AREA NAME IS TESTS
VERSION NAME IS MASTER
PFN IS "NEWFIL" UN IS "CDCS23"
PW IS "DMS170"
LOG BEFORE IMAGE BLOCKS
INDEX PFN IS "NEWFILX" UN IS "CDCS23"
PW IS "DMS170".
CHANGE AREA CDCSCAT
LOG BEFORE IMAGE BLOCKS.
ADD VERSION NAME IS TESTVRS
AREA NAME IS EMPLOYEE
SAME AS MASTER.

Changes logging specifications for area CDCSCAT
(version MASTER); however, no permanent file
information is changed.
Adds data base version TESTVRS.
Deletes a subschema.
Adds two subschemas.
Data base version TESTVERS includes information for
e a c h a r e a d e fi n e d i n t h e s c h e m a . P e r m a n e n t fi l e s
specified for this version can be unique or can be
shared with version MASTER, depending on require
ments for constraints (refer to section 6 for these
requirements). Logging options were not selected
because this is a test version, but they could have
been selected.

SAMPLE DBREC UTILITY
RUN
A fi n a l p h a s e o f d a t a b a s e p r e p a r a t i o n i s t h e
i n i t i a l i z a t i o n o f l o g a n d r e c o v e r y fi l e s b y t h e
D B R E C u t i l i t y. A s a m p l e D B R E C a l l o c a t i o n r u n i s
shown in figure 11-7. The files allocated by DBREC |
have been specified for the schema in the master
directory and must be allocated and available to
CDCS before the schema can be used.

AREA NAME IS JOBDETAIL
PFN IS "TJOBD" UN IS "CDCS23".
AREA NAME IS DEPARTMENTS
SAME AS MASTER.
AREA NAME IS PROJECT
PFN IS "TPROJ" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN "TXPROJ" UN IS "CDCS23".
AREA IS DEVELOPMENT-PRODUCTS
PFN IS "TDEVE" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN "TXDEVE" UN IS "CDCS23".
AREA IS TESTS
PFN IS "TTEST" UN IS "CDCS23"
INDEX FILE ASSIGNED
PFN "TXTEST" UN IS "CDCS23".
AREA NAME IS CDCSCAT
PFN IS "TQCAT" UN IS "CDCS23".
DELETE SUBSCHEMA NAME IS F4SS-PR0DUCT-MANAGEMENT.
ADD SUBSCHEMA NAME IS F5SS-PR0DUCT-MANAGEMENT
FILE NAME IS F5SSLIB.
ADD SUBSCHEMA NAME IS F5SS-PR0DUCT-EVALUATI0N
FILE NAME IS F5SSLIB.
END MODIFICATIONS.

Figure 11-6. Sample Master Directory Modification Run

11-10

60485200 E

Job for DBREC Utility Run
Job statement
USER control statement
CHARGE control statement
DEFINE,DB1QRF,DB1PLIB.
DEFINE,DB1TRF1,DB1RIF.
DEFINE,DB1JLF1,DB1JLF2.

RETURN,DB1QRF,DB1PLIB.
RETURN,DB1TRF1,DB1RIF.
RETURN,DB1JLF1,DB1JLF2.

PERMIT,DB1QRF,DBCNTLX=W.
PERMIT,DB1PLIB,DBCNTLX=W.
PERMIT,DB1TRF1,DBCNTLX=W.
PERMIT,DB1RIF,DBCNTLX=W.
PERMIT,DB1TRF1,DBCNTLX=W.
PERMIT,DB1JLF1,DBCNTLX=W.
PERMIT,DB1JLF2,DBCNTLX=W.
ATTACH,MSTRDIR.
DBREC.
—EOR—

SCHEMA NAME IS MANUFACTURING-DB
ALLOCATE
QUICK RECOVERY FILE IS DB1QRF SIZE IS 500 PRUS
JOURNAL LOG FILE SIZE IS 10000 PRUS
TRANSACTION RECOVERY FILE IS DB1TRF1
RESTART IDENTIFIER FILE IS DB1RIF

DBREC Utility Output
DBREC SOURCE LISTING

DBREC V2.3(82061)

SCHEMA NAME IS MANUFACTURING-DB
ALLOCATE
QUICK RECOVERY FILE IS DB1QRF SIZE IS 500 PRUS
JOURNAL LOG FILE SIZE IS 10000 PRUS
TRANSACTION RECOVERY FILE IS DB1TRF1
RESTART IDENTIFIER FILE IS DB1RIF
DBREC SYNTAX VALIDATION COMPLETE
0 ERRORS
DBREC EXECUTION LISTING

DBREC V2.3(82061)

BEGIN PROCESSING DIRECTIVES FOR SCHEMA MANUFACTURING-DB.
JOURNAL LOG FILE DB1JLF1 HAS BEEN ALLOCATED.
JOURNAL LOG FILE DB1JLF2 HAS BEEN ALLOCATED.
TRANSACTION RECOVERY FILE DB1TRF1 HAS BEEN ALLOCATED.
QUICK RECOVERY FILE DB1QRF HAS BEEN ALLOCATED.
RESTART IDENTIFIER FILE DB1RIF HAS BEEN ALLOCATED.
ALLOCATE DIRECTIVE EXECUTION COMPLETE.
DBREC EXECUTION COMPLETE 0 ERRORS
0 WARNINGS
REQUIRED
RUN TIME

53000B WORDS SCM
0.188 SECONDS

Figure 11-7. Sample DBREC Utility Run
The control statements shown in the job stream for
the DBREC utility run indicate that the master
d i r e c t o r y fi l e m u s t b e a t t a c h e d a n d t h e l o g a n d
r e c o v e r y fi l e s m u s t b e e s t a b l i s h e d a s p e r m a n e n t
fi l e s b e f o r e t h e u t i l i t y i s e x e c u t e d . D B R E C u s e s
p e r m a n e n t fi l e i n f o r m a t i o n p r o v i d e d i n t h e m a s t e r
d i r e c t o r y t o p r o c e s s t h e fi l e s .

60485200 E

T h e fi g u r e a l s o s h o w s t h e o u t p u t p r o v i d e d b y t h e
D B R E C u t i l i t y. T h e o u t p u t i n d i c a t e s t h e p e r m a n e n t
fi l e n a m e s o f t h e fi l e s t h a t w e r e a l l o c a t e d . T h e
o u t p u t a l s o s h o w s t h a t t w o j o u r n a l l o g fi l e s w e r e
allocated (the default allocation option for the
j o u r n a l l o g fi l e p r o c e s s i n g ) .

11-11

STANDARD CHARACTER SETS

Control Data operating systems offer the following
variations of a basic character set:
CDC 64-character set
CDC 63-character set
ASCII 64-character set
ASCII 63-character set
The set in use at a particular installation was
specified when the operating system was installed.
Depending on another installation option, the
system assumes an Input deck has been punched
either in 026 or in 029 mode (regardless of the
character set in use). Under NOS/BE, the alternate
m o d e c a n b e s p e c i fi e d b y a 2 6 o r 2 9 p u n c h e d i n
columns 79 and 80 of the job statement or any 7/8/9
card. The specified mode remains in effect through

the end of the job unless it is reset by specifica
tion of the alternate mode on a subsequent 7/8/9
card.
Under NOS, the alternate mode can be specified also
by a 26 or 29 punched in columns 79 and 80 of any
6/7/9 card, as described above for a 7/8/9 card.
In addition, 026 mode can be specified by a card
with 5/7/9 multipunched in column 1, and 029 mode
can be specified by a card with 5/7/9 multipunched
in column 1 and a 9 punched in column 2.
Graphic character representation appearing at a
terminal or printer depends on the installation
character set and the terminal type. Characters
shown in the CDC Graphic column of the standard
character set table (table A-l) are applicable to
BCD terminals; ASCII graphic characters are appli
cable to ASCII-CRT and ASCII-TTY terminals.
Standard collating sequences for the two printer
character sets are shown in tables A-2 and A-3.

0$**\

j0 g & l \

60485200 A

A-l

TABLE A-l. STANDARD CHARACTER SETS

CDC
Display
Code
(octal)
00T
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57
60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77

Graphic
(colon)n
A
B
C
D
E
F
G
H
I
J
K
L
M
N
0
P
Q
R
S
T
U
V

w
X
Y

z
0
1
2
3
4
5
6
7
8
9
+

External
BCD
Code

8-2

00
61
62
63
64
65
66
67
70
71
41
42
43
44
45
46
47
50
51
22
23
24
25
26
27
30
31
12
01
02
03
04
05
06
07
10
11
60
40
54
21
34
74
53
13
20
33
73
36
17
32
16
14
35
52
37
55
56
72
57
15
75
76
77

12-1
12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9

0-2
0-3
0-4
0-5
0-6
0-7
0-8
09
0
1
2
3
4
5
6
7
8
9
12
11

11-8-4
01
0-8-4
12-8-4
11-8-3

)
S

8-3

blank
, (comma)
. (period)

no punch
0-8-3
12-8-3
0-8-6

8-7

tt

0-8-2

8-6
8-4

0-8-5

110

>
<
>
—
1
(semicolon)

ASCII

Hollerith
Punch
(026)

0-8-7
11-8-5
11-8-6
12-0
11-8-7

8-5

12-8-5
12-8-6
12-8-7

Graphic
Subset
(colon) **
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V

w
X
Y

z

0
1
2
3
4
5
6
7
8
9
+

Punch
(029)

Code
(octal)

8-2

072
101
102
103
104
105
106
107
110
111
112
113
114
115
116
117
120
121
122
123
124
125
126
127
130
131
132
060
061
062
063
064
065
066
067
070
071
053
055
052
057
050
051
044
075
040
054
056
043
133
135
045
042
137
041
046
047
077
074
076
100
134
136
073

12-1
12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9

0-2
0-3
0-4
0-5
0-6
0-7
0-8
0-9
0
1
2
3
4
5
6
7
8
9
12-8-6

11
11-8-4

0-1

)

S

12-8-5
11-8-5
11-8-3

8-6
blank
(comma)
(period)

#

no punch
0-8-3
12-8-3

8-3

C
]

12-8-2
11-8-2
0-8-4

_ (underline)
I

0-8-5
12-8-7

%t t
" (quote)

8-7

&

12
8-5

?

0-8-7
12-8-4
0-8-6

' (apostrophe)

<
>

@
\

^ (circumflex)
; (semicolon)

8-4

0-8-2
11-8-7
11-8-6

/^S5!v

Twelve zero bits at the end of a 60-bit word in a zero byte record are an end of record mark rather than
two colons.
•"In installations using a 63-graphic set, display code 00 has no associated graphic or card code; display
code 63 is the colon (8-2 punch). The % graphic and related card codes do not exist and translations
yield a blank (55g).

A-2

60485200 A

TABLE A-2. CDC CHARACTER SET COLLATING SEQUENCE

/S^^V

Collating
Sequence
Decimal/Octal
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

00
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37

CDC
Graphic

Display
Code

blank

55
74
63 t
61
65
60
67
70
71
73
75
76
57
52
77
45
53
47
46
50
56
51
54
64
72
01
02
03
04
05
06
07

— I

External
BCD
20
15
16t
17
35
36
37
55
56
57
75
76
73
74
77
60
53
54
40
21
33
34
13
14
72
61
62
63
64
65
66
67

Collating
Sequence
Decimal/Octal
32 40
33 41
34 42
35 43
36 44
37 45
38 46
39 47
40 50
41 51
42 52
43 53
44 54
45 55
46 56
47 57
48 60
49 61
50 62
51 63
52 64
53 65
54 66
55 67
56 70
57 71
58 72
59 73
60 74
61 75
62 76
63 77

CDC
Graphic

Display
Code

External
BCD

10
11
66
12
13
14
15
16
17
20
21
22
62
23
24
25
26
27
30
31
32

70
71
52
41
42
43
44
45
46
47
50
51
32
22
23
24
25
26
27
30
31
nonet
12
01
02
03
04
05
06
07
10
11

oot
33
34
35
36
37
40
41
42
43
44

'In installations using the 63-graphie set, the % graphic docjs not exist. The : cjraphic is disp ay code 63,
External BCD code 16.

/$f^N

60485200 A

A-3

TABLE A-3. ASCII CHARACTER SET COLLATING SEQUENCE

Collating
Sequence
Decimal/Octal

00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

00
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37

ASCII
Graphic
Subset

Display
Code

ASCII
Code

blank
!

55
66
64

#
$
%
&

60
53
63t
67
70
51
52
47
45
56
46
57
50
33
34
35
36
37
40
41
42
43
44

20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38

oot

>
?

77
72
54
73
71

39
3A
3B
3C
3D
3E
3F

Collating
Sequence
Decimal/Octal

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57

60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77

ASCII
Graphic
Subset

<§>

A
B
C
D
E
F
G
H
I
J
K
L
M
N
0
P
Q
R
S
T
U
V

w
X
Y

z
[
\
]

Display
Code

ASCII
Code

74
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
61
75
62
76
65

40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F

tin installations using a 63-graphic set, the % graphic does not exist. The : graphic
is display code 63.
/*£^v

A-4

60485200 A

DIAGNOSTICS

Diagnostic messages issued by CYBER Database Con
trol System (CDCS), the data base utilities, and
the Data Description Language (DDL) compilers are
contained in this appendix.
Messages issued by CDCS include diagnostics for
schema and subschema errors, diagnostics for map
ping errors, diagnostics for relation processing
errors or conditions, and diagnostics for data base
procedure processing errors. Message* issued by
the data base utilities include diagnostics issued
for syntax errors and diagnostics issued for
execution-time errors. Messages issued by the DDL
compiler include diagnostics issued during compila
tion of a schema or a subschema, diagnostics issued
d u r i n g e x e c u t i o n o f t h e E X H I B I T u t i l i t y, a n d d i a g
nostics issued during subschema library maintenence
operations.
All messages in this appendix appear in the follow
ing order:

C C r i t i c a l e r r o r. T h e s y s t e m c o n t r o l p o i n t
is aborted and all user control point jobs
are aborted.
F F a t a l e r r o r. T h e r u n - u n i t i s a b o r t e d , w i t h
the execption of a FORTRAN or COBOL program
executing with the immediate return feature
enabled, an application program executing
t h r o u g h t h e Tr a n s a c t i o n F a c i l i t y ( TA F ) , o r
a Query Update application executing in
interactive mode. (In these cases the
program is terminated from CDCS process
ing. Control is returned to the program if
the immediate return feature is enabled.
C o n t r o l i s r e t u r n e d t o TA F i f t h e p r o g r a m
i s p r o c e s s i n g t h r o u g h TA F o r t o Q u e r y
Update if the application is executing in
interactive mode.)

Messages beginning with an alphabetic character
a p p e a r fi r s t .

N N o n f a t a l e r r o r. P r o c e s s i n g c o n t i n u e s .

Messages beginning with a number appear next.

I Informative message. Processing continues.

Messages beginning with a variable are listed
last.
/^*N

The severity level of the diagnostic messages
listed in table B-l can be of several types. The
types of messages and their meanings are as follows:

Within a message, variables appear in lowercase to
s i g n i f y t h a t t h e fi e l d i s r e p l a c e d b y a p p l i c a b l e
text when the message is issued.
The diagnostics appear in this appendix in tables
listed as follows:
B-l CDCS Diagnostics

The CDCS diagnostic messages listed in table B-l
are categorized several ways. The following para
graphs describe the messages in categories which
describe the destination of the message and the
type of message sent to that destination.
T h e fi r s t c a t e g o r y o f C D C S d i a g n o s t i c s l i s t e d i n
table B-l includes the unnumbered messages that are
sent to the CDCS dayfile. These messages are of
the following types:

B-2 DBMSTRD Master Directory Diagnostics

C Critical error

B-3 DBQRFA and DBQRFI Diagnostics

N Nonfatal error

B-4 DBRCN and DBRST Diagnostics

I Informative message

B-5 DBREC Diagnostics
B-6 DDL Schema Compilation and Exhibit
Diagnostics
B-7 DDL Subschema Compilation and Library
Maintenance Diagnostics for COBOL and
Query Update
B-8 DDLF Subschema Compilation and Library
Maintenance Diagnostics for FORTRAN

The second category of diagnostics includes the
unnumbered messages issued by CDCS when it is oper
ating as the CDCS Batch Test Facility (CDCSBTF).
These messages are sent to the CDCSBTF control
p o i n t d a y fi l e , w h i c h i s t h e u s e r c o n t r o l p o i n t
dayfile since CDCSBTF executes at the user control
point. These messages are of the following types:
F Fatal error
I Informative message

CDCS DIAGNOSTICS
All diagnostic messages that can be issued by CDCS
a r e l i s t e d i n t a b l e B - l . T h e g e n e r a l s i g n i fi c a n c e
of the message and the action to be taken by the
user accompany each message listed in the table. A
destination column designates the dayfile or output
file to which the message is written.

60485200 A

The third category of CDCS messages
unnumbered messages that are sent
c o n t r o l p o i n t d a y fi l e a n d t h e C D C S
These messages can be of the following

includes the
to the user
o u t p u t fi l e .
types:

F Fatal error
I Informative message

B-l

The fourth category of CDCS messages include the
unnumered messages that are sent to both the CDCS
c o n t r o l p o i n t d a y fi l e a n d t h e C D C S o u t p u t fi l e .
These messages are usually issued during system
recovery processing. They can also be issued at
other times (for example, during invoke processing
or when a transaction is reversed). These messages
can be of the following types:
N Nonfatal error
I Informative message
The fifth category of CDCS messages includes the
unnumbered messages that are sent to the user
control point dayfile only. These messages can be
of the following types:
F Fatal error
N Nonfatal error
I Informative message
The sixth category of messages include the unnum
bered messages that are sent to the CDCS output
file only. These error messages are usually accom
panied by a fatal error message sent to the CDCS
s y s t e m c o n t r o l p o i n t d a y fi l e . T h e s e m e s s a g e s c a n
be of the following type:
I Informative message
The seventh category of CDCS message includes the
messages that occur when the system operator
communicates with CDCS through the K (NOS) or the L
( N O S / B E ) L d i s p l a y. T h e s e i n f o r m a t i v e m e s s a g e s
that indicate activities triggered by operator
commands are sent to the CDCS system control point
dayfile. In some cases, the message returned is an
echo of the command entered by the operator. These
messages are of the following type:
I Informative message
The last category of CDCS diagnostic messages
includes the CDCS numbered execution-time messages
for user errors. Each octally numbered message is
accompanied by a conversion from the octal value of
the CDCS error code to the equivalent decimal

value. The decimal conversion of the error code
(found in the column headed Dec. E. C. of table
B-l) can be of assistance to a COBOL programmer
using the data base status block to obtain error
and status information because codes returned in
the status block of a COBOL program must be refer
enced by their decimal values. The error and
status codes returned in the status block of a
FORTRAN program can be referenced by either their
decimal or octal values. The octal value of codes
are returned by Query Update in a diagnostic mes
sage. The destination of each message depends on
the type. These messages can be of the following
types:
F F a t a l e r r o r. T h e m e s s a g e i s
C D C S o u t p u t fi l e , t h e d a t a
block if one exists, and the
p o i n t d a y fi l e . A m e s s a g e i s
ZZZZZEG file if the message
with a realm (area).

sent to the
base status
user control
sent to the
is associated

N N o n f a t a l e r r o r. T h e m e s s a g e i s s e n t t o t h e
CDCS output file and the data base status
block if one exists. The message is sent
t o t h e Z Z Z Z Z E G fi l e i f t h e m e s s a g e i s
associated with a realm (area).
T T r i v i a l e r r o r. T h e m e s s a g e i s s e n t t o t h e
data base status block if one exists. The
message is also sent to the ZZZZZEG file if
the message is associated with a realm
(area).
I Informative message. The message is sent
t o t h e C D C S o u t p u t fi l e . T h e m e s s a g e i s
sent to the ZZZZZEG file if the message is
associated with a realm (area).
Messages written by CDCS to the user's ZZZZZEG
e r r o r fi l e a r e k n o w n a s d a t a m a n a g e r m e s s a g e s .
When the ZZZZZEG file is processed, each data man
ager error message is preceded by the following
information:
DM ERROR ec ON LFN fn EXIT ADDRESS ad
T h e fi e l d s e c , f n , a n d a d a r e r e p l a c e d b y a p p l i
c a b l e t e x t t o d e s i g n a t e e r r o r c o d e , s c h e m a fi l e
name, and address, respectively.

TABLE B-l. CDCS DIAGNOSTICS
Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

ALL AREAS WERE
DOWN, SCHEMA DOWN

None of the areas in the
schema were in up status
at the completion of
system recovery. The
schema is set to down
status.

Correct the errors caus
ing the areas to be down.
Manually recover the
areas in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

F

AREA id VERSION vn
NOT UP. SCHEMA sn

The area id of version
vn (version MASTER if
vn does not appear) was
not in an up, idling, or
downing status during
processing for system
recovery or CDCS trans
action reversal. Schema
sn is printed out for
nonsystem recovery only.

If this error occurred
during system recovery,
manually recover the
area. If transaction
processing was in effect,
manually reverse the un
committed updates. Place
the area in up status.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

Type

B-2

'4as?\

60485200 A

TABLE B-l. CDCS DIAGNOSTICS (Contd)
Dec.
E.C.

Message

S i g n i fi c a n c e

Action

D e sti n a ti o n

I

AREA RECOVERY IS
COMPLETE. THE
AREA IS LEFT IN
DOWN STATUS. TO
REGAIN USE OF THE
AREA USE THE
-UP- COMMAND.

The database area that
suffered from an inter
nal malfunction has been
recovered. It has been
left in a "DOWN" status
to insure that the oc
currence of the malfunc
tion is noticed.

The console operator may
change the area to "UP"
status.

CDCS system
control point
d a y fi l e

F

ATTACH ERROR nnn
ON AREA id VERSION
vn - AREA DOWN.
SCHEMA sn

The attach error nnn
occurred during system
recovery processing or
invoke processing on
area id of version vn
(version MASTER if vn
does not appear).
Schema sn is printed out
for nonsystem recovery
o n l y.

If this error occurred
during system recovery,
manually recover the
area. Otherwise, check
t h a t fi l e i s n o t a t t a c h e d
elsewhere. For a nonPUBLIC file unavailable
on NOS, ensure that a
PERMIT control statement
specifying the user name
for CDCS or CDCSBTF exe
cution is in effect or
that the procedure to
initialize CDCS includes
a USER control statement
specifying the user name
for CDCS execution. Refer
to the applicable perma
n e n t fi l e e r r o r d i a g n o s
tic in volume 4 of the
NOS reference set, or in
the description of the
FDB macro in the NOS/BE
reference manual.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

F/N

ATTACH ERROR nnn
ON CDCS file

The operating system
attach error nnn
occurred during system
recovery or invoke proc
essing on one of the
following CDCS files:
the JOURNAL LOG FILE,
the PROCEDURE LIB FILE,
the QUICK RECOVERY FILE,
the RESTART IDENTIFIER
FILE, or the TRANSACTION
RECOVERY FILE. The
schema is set to error
s t a t u s u n l e s s t h e fi l e
i s b u s y.

If this error occurred
during system recovery.
manually recover the
areas in the schema be
fore placing the schema
in up status. If this
error occurred during
invoke processing, re
submit the application
program. Otherwise,
c h e c k t h a t fi l e I s n o t
attached elsewhere.
For a non-PUBLIC file
unavailable on NOS,
ensure that a PERMIT
control statement speci
fying the user name for
CDCS or CDCSBTF execution
is in effect or that the
procedure to initialize
CDCS includes a USER con
trol statement specifying
the user name for CDCS
execution. Refer to the
a p p l i c a b l e p e r m a n e n t fi l e
error diagnostic in vol
ume 4 of the NOS refer
ence set, or in the
description of the FDB
macro in the NOS/BE
reference manual.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

Type

y$jW*\

60485200 E

B-3

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

Ac tion

S i g n i fi c a n c e

Destination

BL SET TO bbbbbb

In the absence of a BL
parameter a value of
bbbbb has been assigned.

None.

CDCS system
control point
d a y fi l e

BOTH VSN AND SET
NAME MUST BE
GIVEN

In either the CDCS con
trol statement or the
d i r e c t i v e fi l e , i f V S N
is specified set name
m u s t b e s p e c i fi e d . I f
set name is specified
VSN must be specified.

Specify both VSN and set
name in the CDCS control
statement or the direc
t i v e fi l e .

CDCS system
control point
d a y fi l e

CANNOT GET num
WORDS CM FOR jn

The 6-digit number in
dicates the number of
words of memory that
cannot be obtained to
process the run-unit
request. Under NOS/BE,
jn is the 7-character
job name; under NOS,
jn is the 4-character
sequence number of the
system-assigned job
name.

If several messages of
this type appear, the
data administrator should
adjust the CDCS field
length. If only one job
i s a ff e c t e d , r e r u n t h e
job.

CDCS system
control point
d a y fi l e

CDCS ABORT

Errors occurred while
processing the CDCS
control statement or the
CDCS directive file.

Correct the control
statement or the direc
t i v e fi l e .

CDCS system
control point
d a y fi l e

CDCS ABORT,
INVALID MASTER
DIRECTORY

A master directory
created and maintained
by a previous version of
CDCS is not compatible
with CDCS 2.3.

Recreate the master di
rectory by reintroducing
a l l p r e v i o u s s p e c i fi c a
tions and by using re
compiled schemas and
subschemas. Schemas
and subschemas must be
compiled with DDL 3.1
or DDL 3.2 for use with
CDCS 2.3.

CDCS system
control point
d a y fi l e

CDCS ABORT, NO
SCHEMA ENTRIES
IN MASTER DIREC
TORY

Information for at least
one schema must be in
cluded in master
d i r e c t o r y.

Check that information
for the schema has not
been deleted from the
m a s t e r d i r e c t o r y. I f
deleted, add information
for the schema in a
master directory run.

CDCS system
control point
d a y fi l e

CDCS ABORTEDRECOVERY FOR ALL
SCHEMAS IMPOSSIBLE

All schemas are in error
status after the CDCS
system recovery phase.

Correct the schema errors
and reinitiate CDCS
execution.

CDCS system
control point
d a y fi l e

CDCS CHARGED
xxxxxx.xxx CP
yyyyyy.yyy IO

CDCS accounting charged
xxxxxx.xxx seconds of
central processor time
and yyyyyy.yyy seconds
of I/O time to user
jobs.

None.

CDCS system
control point
d a y fi l e

CDCS DOWN COMPLETE

CDCS has been shut down
by the system operator.
No new invokes to CDCS
are allowed.

None.

CDCS system
control point
d a y fi l e

/**®\

B-4

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

/3f^*s

/§im£\

60485200 E

Dec.
E.C.

S i g n i fi c a n c e

Action

Destination

CDCS ERRORS

The CDCS control state
ment or the directive
fi l e c o n t a i n s e r r o r s .
This message is followed
by a list of the spe
c i fi c e r r o r s .

Correct the control
statement or the direc
t i v e fi l e e r r o r s . R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

CDCS FUNCTION
CODE UNKNOWN
DB$$SIM 1

This is an internal
e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

CDCSBTF
control point
d a y fi l e

CDCS IDLE COMPLETE

CDCS has been shut down
by the system operator.
No new invokes to CDCS
are allowed.

None.

CDCS system
control point
d a y fi l e

CDCS ILLEGAL
REQUEST, DOUBLE
INVOKE

More than one invoke
was issued by the COBOL
program. This is an
i n t e r n a l e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

User control
p o i n t d a y fi l e
CDCS output
fi l e

CDCS ILLEGAL
REQUEST, ILLEGAL
FUNCTION CODE

CDCS cannot process the
request issued because
it is an unrecognizable
function code. This is
a n i n t e r n a l e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

User control
p o i n t d a y fi l e
CDCS output
fi l e

CDCS ILLEGAL
REQUEST, NOT
INVOKED

CDCS cannot process the
user program request
because CDCS invocation
has not yet occurred.
This is an internal
e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

User control
p o i n t d a y fi l e
CDCS output
fi l e

Message

B-4.1/B-4.2 |

TABLE B-l. CDCS DIAGNOSTICS (Contd)

/^S*\

r

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

F

CDCS ILLEGAL
REQUEST, TWO
OUTSTANDING
REQUESTS

CDCS received another
request from a user pro
gram before the previous
request was satisfied.
This is an internal
e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

User control
p o i n t d a y fi l e
CDCS output
fi l e

I

CDCS INITIALIZA
TION COMPLETE

CDCS is available at
a system control point
and is ready to start
accepting requests from
user programs.

None.

CDCS system
control point
d a y fi l e

I

CDCS INTERFACE
TERMINATED

CDCS termination proc
essing has occurred.

None.

User control
p o i n t d a y fi l e
CDCS output
fi l e

C

CDCS INTERNAL
ERROR — mdn

A CDCS internal error
occurred in mdn; the
first seven characters
are the module name and
the last three charac
ters designate the loca
tion in the module where
the error occurred.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or operat ional probiems.

CDCS system
control point
d a y fi l e

I

CDCS INVOKED
BY user-id

CDCS invocation has
occurred by the job
i d e n t i fi e d b y u s e r - i d .
The user-id was passed
when CDCS was invoked.

None.

User control
p o i n t d a y fi l e
CDCS output
fi l e

I

CDCS JOB ABORT OR
ENDED BY SYSTEM

CDCS or the operating
system aborted the job,
or the job terminated
without CDCS termination
processing.

Determine cause of abort
from other messages
issued to the dayfiles.

User control
p o i n t d a y fi l e
CDCS output
fi l e

N

CDCS JOURNAL LOG
FILE NOT AVAILABLE

No journal log file in
new or in use status can
be found during system
recovery or invoke proc
essing. The schema is
set to error status.

Analyze the reason for
t h e j o u r n a l l o g fi l e
being unavailable. If
this error occurred dur
ing system recovery,
manually recover the
areas in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

F

CDCS NOT ACTIVE
AT SYSTEM CONTROL
POINT

A job issued a request
to CDCS when CDCS was
not active at a system
control point.

Check that CDCS is active
at a system control point
before resubmitting the
application program.

User control
point
d a y fi l e

I

CDCS RECOVERY
COMPLETED

The CDCS system recovery
phase is complete.

None.

CDCS system
control point
d a y fi l e

I

CDCS RECOVERY
STARTED

The CDCS system recovery
phase is started.

None.

CDCS system
control point
d a y fi l e

I

CDCS REPRIEVE
PROCESSING DONE

CDCS processing for the
abnormal termination of
a job has been com
p l e t e d . A l l fi l e s
attached by CDCS have
been returned.

None.

CDCS system
control point
d a y fi l e
CDCS output
fi l e

60485200 A

B-5

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

S i g n i fi c a n c e

Message

Action

Destination

F

CDCS REQUEST NOT
IN FL

The job is aborted; the
request cannot be proc
essed by CDCS because
of an invalid central
memory address in the
request.

Follow site-defined pro
cedures for reporting
software errors or opera
tional problems.

User control
p o i n t d a y fi l e
CDCS output
fi l e

I

CDCS SCP STATUS
TERMINATED

CDCS has been terminated
and is no longer at a
system control point.

None.

CDCS system
control point
d a y fi l e

I

CDCS USED
aaaaaa.aaa CP
SECONDS
bbbbbb.bbb IO
SECONDS

CDCS actually used
aaaaaa.aaa central
processor seconds and
bbbbbb.bbb I/O seconds.

None.

CDCS system
control point
d a y fi l e

I

CDCS xx.yy
PERCENT CPU
USAGE

CDCS CPU utilization is
defined as the ratio of
the total CP time used
to the real time elapsed
while CDCS was active
(that is, from the time
CDCS was initialized
until the time CDCS was
terminated).

None.

CDCS system
control point
d a y fi l e

F

CDCSBTF ABORTED,
2 TRANSFER
ADDRESSES ON USER
LOAD FILE fn

The user's load file fn
has multiple transfer
addresses because two
main programs are in the
same file.

Change the load file so
that it has only one main
program.

CDCSBTF
control point
d a y fi l e

F

CDCSBTF DEADLOCK,
JOB ABORTED

CDCSBTF has determined
that the user job and
CDCS are both waiting
for a particular event
to occur, but that event
is not occurring.
CDCSBTF is aborted.

Correct the deadlock and
resubmit the job.

CDCSBTF
control point
d a y fi l e

I

CDCSBTF TERMINATED
BEFORE ALL USERS
COMPLETED

A CDCSBTF user program
has placed END in RA+1
without referencing the
external procedure SYS=.

Review each user program
to be sure that it uses
the normal termination
statement provided by the
language. For COMPASS,
use the ENDRUN macro.

CDCSBTF
control point
d a y fi l e

F

CDCSBTF
TERMINATED, LOADER
ERROR nnnnn ON
USER LOAD FILE fn

A fatal loader error
nnnnn occurred during
the loading of user file

Refer to the error mes
sage In the CYBER Loader
reference manual for the
appropriate action to
c o r r e c t t h e e r r o r.

CDCSBTF
control point
d a y fi l e

F

CDCSBTF
TERMINATED, NO
PROGRAMS

No file name parameter
was specified in the
CDCSBTF control state
ment.

Specify the file name of
the relocatable binary
program as the parameter
on the CDCSBTF control
statement and resubmit
the job.

CDCSBTF
control point
d a y fi l e

N

CIO ERROR nnn
DURING ROLLOUT

CIO encountered error
nnn while rolling out
part of the CDCS field
length.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

CDCS system
control point
d a y fi l e

B-6

fn.

60485200 B

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

I

Dec.
E.C.

Message

CIO ERROR nnn ON
CDCS JOURNAL LOG
FILE SCHEMA sn

S i g n i fi c a n c e

CIO encountered error
number nnn while per
forming an operation on
the CDCS journal log
file for the schema
named sn. Some or all
of the log records
might have been lost.
The CIO error causes
the following events
to occur:
A memory dump is taken
of the FET and of the
I-O buffer at the time
o f t h e e r r o r.

Action

Destination

To determine the disposi
ti o n o f th e j o u rn a l l o g
file, refer to the CDCS
initiated job that uses
DBREC to dump the journal
l o g fi l e . I t m i g h t b e
necessary to purge the
j o u r n a l l o g fi l e a n d r e
run DBREC to preallocate
a new copy of this file.
If this occurred during
CDCS system recovery,
manual recovery of the
schema might be needed.

CDCS output
fi l e

Purge the existing quick
recovery file and rerun
DBREC to initialize a new
c o p y o f t h i s fi l e b e f o r e
reinitiating CDCS. If
this occurred during CDCS
system recovery, manually
recover the schema.

CDCS output
fi l e

Requests in progress
at the time of the
error are aborted with
error message 474.
CDCS switches to an
a l t e r n a t e l o g fi l e i f
one is available.

I

zf^S

CIO ERROR nnn ON
QUICK RECOVERY
FILESCHEMA sn

CIO encountered error
number nnn while per
forming an operation on
the quick recovery file
for the schema named sn.
The CIO error causes
the following events to
occur:
A memory dump of the
FET and a memory dump
of the I-O buffer at
the time of the error.
Requests in progress
at the time of the
error are aborted with
error message 474.
CDCS sets the schema
to error status and
does not allow further
access to it.

60485200 A

B-7

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

I

Dec.
E.C.

Destination

Message

S i g n i fi c a n c e

Action

CIO ERROR nnn ON
TRANSACTION RE
COVERY FILESCHEMA sn

CIO encountered error
number nnn while per
forming an operation on
the transaction recovery
file for the schema
named sn. The CIO error
causes the following
events to occur:

PUrge the existing trans
action recovery file and
rerun DBREC to initialize
a new copy of this file
before reinitiating CDCS*
I f a r e s t a r t i d e n t i fi e r
file exists for schema
sn, it should also be
initialized. Manually
recover the areas affect
ed by any uncommitted
transactions* If this
occurred during CDCS sys
tem recovery, manually
recover the schema.

CDCS output
fi l e

A memory dump of the
FET and a memory dump
of the I-O buffer at
the time of the error.
Requests in progress
at the time of the
error are aborted with
error message 474.
CDCS sets the schema
to error status and
does not allow further
access to it.

B-8

F

CLTC ERROR

An internal error has
occurred in clearing the
long term connect.

Follow site-defined pro
cedures for reporting
software errors or opera
tional problems.

CDCSBTF
control point
d a y fi l e

I

CONTROL CARD
PARAMETER xxxxx

The CDCS control state
ment parameter xxxxx is
i n e r r o r.

Correct the control
s t a t e m e n t e r r o r. R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

I

CP SECONDS
CHARGED BY CDCS
xxxxxx.xxx

Central processor time
of xxxxxx.xxx was used
by CDCS at the system
control point for proc
essing requests for the
particular user job.

The user job should be
charged for xxxxxx.xxx
seconds of central proc
essor time.

User control
p o i n t d a y fi l e

I

CRM ERROR nnn ON
CDCS RESTART
IDENTIFIER FILESCHEMA sn

The indicated CRM error
nnn occurred while per
forming an operation on
t h e r e s t a r t i d e n t i fi e r
fi l e . I f e r r o r 4 4 6
occurred, the transa c t i o n r e c o v e r y fi l e
might have been reini
tialized without also
reinitializing the re
s t a r t i d e n t i fi e r fi l e .

Correct the CRM error.
I f n e c e s s a r y, r e i n i
tialize the restart
i d e n t i fi e r fi l e .

CDCS output
fi l e

C

CRM ERROR nnn
WHILE ACCESSING
MASTER DIRECTORY

The CRM error nnn
occurred while reading
the master directory.

Refer to the applicable
CRM error diagnostic and
correct as noted in the
CYBER Record Manager
Basic Access Methods
reference manual.

CDCS system
control point
d a y fi l e

I

DBREC JOB REQUEST

A j o u r n a l l o g fi l e i s
full. CDCS attempts to
create a DBREC job to
dump the log file to
t ape.

None.

CDCS system
control point
d a y fi l e

ytfSS^v

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

I

Dec.
E.C.

Message

DBREC JOB SUB
MITTED JOBNAME =

jn

/fzmrs.

Action

S i g n i fi c a n c e

Destination

A j o u r n a l l o g fi l e i s
full. CDCS has sub
mitted a DBREC job with
the job name jn to dump
the full journal log
fi l e t o t a p e .

None.

CDCS system
control point
d a y fi l e

I

DIR FILE PARAMETER
xxxxx

The CDCS directive file
parameter xxxxx is in
e r r o r.

Correct the directive
fi l e e r r o r a n d r e i n i t i
alize CDCS.

CDCS system
control point
d a y fi l e

I

DOWN,CDCS

The system operator has
entered a DOWN,CDCS
command.

None.

CDCS system
control point
d a y fi l e

I

DOWN COMPLETE

The area or schema
specified in a DOWN
command by the system
operator has been given
a down status.

None.

CDCS system
control point
d a y fi l e

I

DOWN IN PROGRESS

The area or schema
specified in a DOWN
command by the system
operator is being shut
down.

None.

CDCS system
control point
d a y fi l e

I

DUMP CDCS JOURNAL
LOG NAME = pfn

CDCS is in the process
of creating a DBREC job
to dump the journal log
fi l e p f n t o t a p e .

None.

CDCS system
control point
d a y fi l e

N

DUPLICATE
PARAMETER

A parameter was speci
fied more than once on
the CDCS control state
m e n t o r d i r e c t i v e fi l e .

Correct the control
statement or the direc
t i v e fi l e s o t h a t t h e
p a r a m e t e r i s s p e c i fi e d
only once. Reinitialize
CDCS.

CDCS system
control point
d a y fi l e

I

END CDCSBTF RUN

CDCSBTF processing has
terminated.

None.

CDCSBTF
control point
d a y fi l e

N

EQUAL SIGN MUST BE
PRESENT

In either the CDCS con
trol statement or the
d i r e c t i v e fi l e , a p a r a m
eter requiring an equal
sign was specified with
out an equal sign.

Correct the CDCS control
statement or the direc
t i v e fi l e a n d r e i n i t i a l
ize CDCS.

CDCS system
control point
d a y fi l e

60485200 B

B-9

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

EQUAL SIGN NOT
ALLOWED

In either the CDCS con
trol statement or the
d i r e c t i v e fi l e , a p a r a m
eter that must not have
an equal sign was speci
fied with an equal sign.

Correct the CDCS control
statement or the direc
t i v e fi l e . R e i n i t i a l i z e
CDCS.

CDCS system
control point
d a y fi l e

C

ERROR DURING
ROLL IN—CDCS
ABORTED

An error occurred while
rolling in the CDCS
field length that was
previously rolled out
for system recovery.

Follow site-defined pro
cedures for reporting
software errors or opera
tional problems.

CDCS system
control point
d a y fi l e

C

ERROR DURING
ROLL OUT—CDCS
ABORTED

An error occurred while
rolling out that part of
the CDCS field length
that is unnecessary for
system recovery.

Follow site-defined pro
cedures for reporting
software errors or opera
tional problems.

CDCS system
control point
d a y fi l e

F

ERROR FLAG n

The CDCS error flag
has been set for user n.

Correct the error condi
tion and return.

CDCSBTF
control point
d a y fi l e

N

ERROR OR AREA id
VERSION sn

During quick recovery
fi l e a p p l i c a t i o n p r o c
essing for system recov
ery, an error occurred
on area id.

Correct the error and
manually recover the
area.

CDCS system
control point
d a y fi l e

I

ERROR nn WHILE
REQUESTING A
QUEUE DEVICE

During an attempt to
route the CDCS OUTPUT
fi l e t o t h e p r i n t e r, t h e
NOS/BE REQUEST call re
turned error code nn.
Consult the NOS/BE
Reference Manual for a
description of the
error code.

Immediate action is not
required.

CDCS system
control point
d a y fi l e

The OUTPUT file is not
routed to a printer, but
no information is lost
f r o m t h e fi l e . C o n t i n u e d
writing to the OUTPUT
fi l e i s n o t a f f e c t e d .

I

ERROR nn WHILE
ROUTING A PRINT
FILE

During an attempt to
route the CDCS OUTPUT
fi l e t o t h e p r i n t e r, t h e
ROUTE call returned
error code nn. Consult
the appropriate operat
ing system reference
manual for a description
of the error code.

y^^v

Immedite action is not
required.
If the problem persists
noti fy the data
a d m i n i s t r a t o r.

CDCS system
control point
d a y fi l e

The OUTPUT file is not
routed to a printer, but
no information is lost
f r o m t h e fi l e . C o n t i n u e d
writing to the OUTPUT
fi l e i s n o t a f f e c t e d .

B-10

/^l*^\

If the problem persists
Notify the data
a d m i n i s t r a t o r.

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

F

FATAL CDCS
ERROR — RUN-UNIT
ABORTED

A fatal error occurred
during CDCS processing.

Correct the error and
resubmit the application
program.

User control
p o i n t d a y fi l e

F

FC COMPLETE

An SCP function was re
quested with the com
plete bit set. This is
a n i n t e r n a l e r r o r.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

CDCSBTF
control point
d a y fi l e

N

FDL LOAD ERROR nnn
ON AREA id
VERSION vn - AREA
DOWN. SCHEMA sn

The FDL load error nnn
occurred on the area id
during processing for
system recovery or CDCS
transaction reversal.
The area is set to error
status. The schema sn
is printed out for a
nonsystem recovery error
o n l y.

Correct the error and
manually recover the
area.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

I

FIELD LENGTH DUMP
IS ON THE OUTPUT
FILE

A dump of the CDCS field
length has been written
t o t h e o u t p u t fi l e .

None.

CDCS system
control point
d a y fi l e

N

FIRST TWO CHAR
ACTERS MUST BE
LETTERS

If the DT parameter is
specified on the CDCS
control statement or the
d i r e c t i v e fi l e , t h e
fi r s t t w o c h a r a c t e r s
must be letters of the
alphabet.

Correct the CDCS control
statement or directive
fi l e a n d r e i n i t i a l i z e
CDCS.

CDCS system
control point
d a y fi l e

I

IDLE,CDCS

The system operator has
entered an IDLE,CDCS
command.

None.

CDCS system
control point
d a y fi l e

I

IDLE COMPLETE

The number of users of
the area or schema
specified in an IDLE
conmand by the system
operator has reached
zero. The area or
schema is given a down
status.

None.

CDCS system
control point
d a y fi l e

I

IDLE IN PROGRESS

The area or schema
specified in an IDLE
command by the system
operator is being shut
down. All active jobs
using the area or schema
are allowed to complete
processing; all new jobs
issuing invokes using
the area or schema are
aborted.

None.

CDCS system
control point
d a y fi l e

I

INITIAL LOAD
FL = iiiiii

Following CDCS initial
ization the system
c o n t r o l p o i n t fi e l d
length is iiiiii.

None.

CDCS system
control point
d a y fi l e

60485200 E

B-ll

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

F

INSUFFICIENT
MEMORY FOR CDCS
type

CMM overflow occurred
during the following
type of processing:
QUICK RECOVERY FILE
APPLICATION, ROLL
FORWARD, or ROLL BACK.
This processing (and
all further recovery of
the schema if in system
recovery mode) is ter
minated. The schema is
se t to e rro r sta tu s.

Manually recover all
areas in the schema.
Increase the CDCS field
length limit.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

I

INTERNAL DOWN
COMPLETE

As a result of internal
problems, CDCS has shut
down the area or schema
specified in the pre
ceding THE AREA ID/NAME
IS or THE SCHEMA ID/NAME
IS message. An internal
down of a schema occurs
when the schema log
files are down. An in
ternal down of an area
occurs as a result of a
CRM error that is clas
sified by CDCS as a
class 1 error.

None.

CDCS system
control point
d a y fi l e

N

INTERNAL ERROR DB$MABT

An internal error has
occurred while proc
essing an operator
command•

Follow site-defined pro
cedures for reporting
software errors or
operational problems.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

N

INVALID AREA
IDENTIFIER id ON
CDCS QUICK
RECOVERY FILE

The area identifier id
found on the CDCS quick
r e c o v e r y fi l e d u r i n g
system recovery is not
found in the master di
rectory. The schema is
set to error status.

Check that information
f o r t h e a r e a i d e n t i fi e d
by id is present in the
master directory. Manu
ally recover the areas
in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

N

INVALID CHARACTER

An invalid character
appears in one of the
parameters in the CDCS
control statement or
d i r e c t i v e fi l e *

Correct the CDCS control
statement or the direc
tive and reinitialize
CDCS.

CDCS system
control point
d a y fi l e

N

INVALID DATA ON
CDCS TRANSACTION
FILE

Invalid data was found
on the CDCS transaction
r e c o v e r y fi l e d u r i n g
processing for system
recovery or transaction
reversal. The temporary
updates made within the
CDCS transaction remain
in effect. The schema
is set to error status.

Analyze the invalid data
on the CDCS transaction
r e c o v e r y fi l e . M a n u a l l y
reverse the updates made
within any uncommitted
transactions. If this
error occurred during
system recovery, manually
recover the areas in the
schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

| B-12

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

INVALID VERSION
NAME vn

The version name vn was
not found in the master
directory during proc
essing for system recov
ery or CDCS transaction
reversal. Processing is
terminated for the
schema; the schema is
se t to e rro r sta tu s.

Check that the version
name vn is a valid ver
sion name in the master
d i r e c t o r y. M a n u a l l y
reverse the updates made
within any uncommitted
CDCS transactions. If
this error occurred
during system recovery,
manually recover the
areas in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

I

10 SECONDS CHARGED
BY CDCS yyyyyy.yyy

Channel time of
yyyyyy.yyy WaS USed by
CDCS at the system con
trol point for proc
essing requests for the
particular user job.

The user j ob should be
charged for yyyyyy.yyy
seconds of channel time.

User control
p o i n t d a y fi l e

F

I/O (CIO) ERROR
nnn ON CDCS file

The indicated CIO error
nnn occurred during
processing for system
recovery or CDCS trans
action reversal on one
o f t h e f o l l o w i n g fi l e s :
the JOURNAL LOG FILE,
the QUICK RECOVERY FILE,
or the TRANSACTION
RECOVERY FILE. The
schema is set to error
status.

Correct the CIO error.
If this error occurred
during system recovery,
manually reverse the
updates made within the
uncommitted CDCS trans
action. If this error
occurred during trans
action reversal proc
e s s i n g , m a n u a l l y fi n i s h
reversing any uncommitted
transactions.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

F

I/O (CRM) ERROR
nnn ON AREA id
VERSION vn - AREA
DOWN. SCHEMA sn

The CYBER Record Manager
I/O error nnn occurred
on the area during proc
essing for system re
covery or CDCS trans
action reversal. The
area is set to error
status. The schema name
is printed out for a
nonsystem recovery error
o n l y.

Correct the error, and
manually recover the
area.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

N

I/O (CRM) ERROR
nnn ON CDCS
RESTART IDENTIFIER
FILE

The CYBER Record Manager
error nnn occurred on
t h e r e s t a r t i d e n t i fi e r
file during system re
covery. The schema is
se t to e rro r sta tu s.

Correct the CRM error.
Manually recover the
areas in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

F

JOB UNKNOWN TO
SYSTEM

The CDCS request being
processed is for a job
that is no longer in the
system.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

CDCS output
fi l e

60485200 E

B-l 3

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

JOURNAL LOG FILE
pfname FULL

The journal log file
whose permanent file
name is pfname has been
released to be dumped to
tape by DBREC. When
b o t h j o u r n a l l o g fi l e s
are in this state, jobs
that use the schema
associated with these
fi l e s a r e d e l a y e d u n t i l
a j o u r n a l l o g fi l e i s
available.

I f b o t h j o u r n a l l o g fi l e s
for the schema are in
this state, determine if
the CDCS-initiated DBREC
jobs to dump the log
fi l e s a r e e x e c u t i n g . I f
they are executing, give
them priority so they can
complete the dump. If
they are not executing,
manually dump or replace
the j ournal log files.

CDCS system
control point
d a y fi l e

N

LAST RECOVERY
POINT NOT FOUND

During system recovery,
a matching recovery
point record cannot be
found in the journal log
file to match the recov
ery point in the journal
l o g fi l e h e a d e r. T h e
schema is set to error
status.

Analyze the journal log
fi l e . I f t h i s e r r o r
occurred during system
recovery, manually re
cover the areas in the
schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

N

LFN IS REQUIRED

No local file name was
specified on the CDCSBTF
control statement.

Add the local file name
to the CDCSBTF control
statement and resubmit
the j ob.

CDCSBTF
control point
d a y fi l e

N

MASTER DIRECTORY
ALREADY ATTACHED

The master directory
fi l e s p e c i fi e d o n t h e
CDCS control statement
is already attached at
the system control
point.

Either attach the master
prior to the CDCS call or
specify the master direc
tory attach information
on the CDCS control
statement or directive
fi l e .

CDCS system
control point
d a y fi l e

Type

,«™fe?"X

C

MASTER DIRECTORY
MUST BE A PERMA
NENT FILE

The master directory is
not a permanent file, or
there is not a permanent
file named MSTRDIR at
the CDCS control point.

The data administrator
must make the master di
rectory permanent after
running the DBMSTRD util
ity, or must attach the
master directory with the
local file name MSTRDIR.
The master directory can
be attached in the con
trol stream, or the mas
ter directory attach
parameters can be sup
plied via the CDCS con
trol statement. (The
latter option is
preferred.)

CDCS system
control point
d a y fi l e

N

MASTER DIRECTORY
NOT AVAILABLE

During CDCS initializa
tion, an error occurred
while attempting to
attach the master direc
t o r y s p e c i fi e d i n t h e
CDCS control statement
o r d i r e c t i v e fi l e .

Check that the master
s p e c i fi e d i s a v a l i d
p e r m a n e n t fi l e , t h a t t h e
correct permissions have
been specified, and that
the master directory is
not attached elsewhere.
Reinitialize CDCS.

CDCS system
control point
d a y fi l e

| B-14

'f^-K

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

Action

S i g n i fi c a n c e

Destination

I

MESSAGE FOR USER
nn =

Any normal user control
point dayfile message
produced by CDCSBTF
is preceded by this
message.

None.

CDCSBTF
control point
d a y fi l e

N

MFL MUST BE
GREATER THAN BL

In the CDCS control
statement or directive
fi l e , t h e v a l u e s p e c i
fied for the MFL param
eter must be greater
than the value specified
for the BL parameter.

Correct the error and
reinitialize CDCS.

CDCS system
control point
d a y fi l e

N

MUST BEGIN WITH
LETTER

An alphanumeric value
was specified that did
not begin with a letter
in the CDCS control
statement or directive
fi l e .

Correct the error and
reinitialize CDCS.

CDCS system
control point
d a y fi l e

N

NO TERMINATOR ON
CONTROL CARD

A terminator was not
s p e c i fi e d i n t h e c o n t r o l
CDCS statement.

Specify either a period
or a right parenthesis as
the last character in the
CDCS control statement.

CDCS system
control point

N

NOT ALLOWED ON
FILE

A parameter was speci
fied in the CDCS direc
t i v e fi l e t h a t c a n o n l y
be specified in the CDCS
control statement.

Move the incorrectly
specified parameter from
t h e d i r e c t i v e fi l e t o t h e
CDCS control statement.

CDCS system
control point
d a y fi l e

I

OUTPUT FILE
ROUTED TO A
PRINTER

A portion of the CDCS
listing has been re
leased for printing.

None.

CDCS system
control point
d a y fi l e

I

PF WAIT ON AREA an
(vn)

Another job has exclu
sive file access for the
area an of version vn
(version MASTER if vn
does not appear). The
job trying to access the
area must wait until
control has been relin
quished and CDCS can
a t t a c h t h e fi l e .

None.

User control
p o i n t d a y fi l e
CDCS output
fi l e

/*f#s>\

yffsfcN,

60485200 E

B-l 5

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

| B-16

Dec.
E.C.

S i g n i fi c a n c e

Action

Destination

PFM ERROR nnn
ATTACHING pfn

The permanent file error
nnn occurred while try
i n g t o a t t a c h fi l e p f n .

Check that file is not
attached elsewhere. For
a non-PUBLIC file un
available on NOS, ensure
that a PERMIT control
statement specifying the
user name for CDCS or
CDCSBTF execution is in
effect or that the pro
cedure to initialize CDCS
includes a USER control
statement specifying the
user name for CDCS exe
cution. Refer to the
a p p l i c a b l e p e r m a n e n t fi l e
error diagnostic in vol
ume 4 of the NOS refer
ence set, or in the
description of the FDB
macro in the NOS/BE
reference manual.

CDCS system
control point
d a y fi l e

RECOVERY COMPLETED
FOR SCHEMA sn

The system recovery
phase for schema sn has
completed successfully.

None.

CDCS system
control point
d a y fi l e

RECOVERY IMPOSSI
BLE FOR SCHEMA sn

The schema sn is in
error status after the
system recovery phase.

Correct the schema
errors. Manually recover
the areas in the schema
before placing the schema
in up status.

CDCS system
control point
d a y fi l e

RECOVERY STARTED
FOR SCHEMA sn

The system recovery
phase for schema sn has
started.

None.

CDCS system
control point
d a y fi l e

RUN UNIT ABORT,
CDCS CMM OVERFLOW

The run-unit is aborted
because not enough
memory is available to
load the CDCS modules
required.

CDCS field length
requirements and usage
should be examined by the
data administrator and
adjusted if necessary.

User control
p o i n t d a y fi l e
CDCS output
fi l e

RUN-UNIT TERMI
NATED BEFORE CDCS
COMMIT OR DROP
REQUEST - DROP
ASSUMED

The run-unit aborted
within a CDCS begin/
commit sequence. The
drop function is auto
matically performed.

None.

User control
p o i n t d a y fi l e
CDCS output
fi l e

SCHEMA ID MISMATCH
ON CDCS file

During system recovery,
the schema id specified
in the header of either
the QUICK RECOVERY FILE
or the TRANSACTION
RECOVERY FILE does not
match the corresponding
schema id specified in
the master directory.
The schema is set to
error status.

Analyze the master direc
tory and system file to
locate the cause of the
mismatch. Manually re
cover the areas in the
schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

Message

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

SCHEMA NOT UP CDCS TRANSACTION
ROLL BACK NOT
COMPLETE SCHEMA sn

The schema is not in an
up, idling or downing
status during processing
for system recovery or
CDCS transaction rever
sal. The temporary up
dates made within the
transaction remain in
effect. Schema sn is
printed out for nonsystem recovery only.

Manually reverse the
updates made within the
uncommitted transaction.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

I

SCHEMA sn DBREC
JOB REQUEST

A j o u r n a l l o g fi l e
schema sn is full.
attempts to create
DBREC j ob to dump
l o g fi l e t o t a p e .

None.

CDCS system
control point
d a y fi l e

F

SLTC ERROR

An internal error has
occurred in setting the
long term connect.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

CDCSBTF
control point
d a y fi l e

I

SMALL BLOCK
BOUNDARY ADVANCED
TO OR BEYOND
ssssss nnnn TIMES

During CDCS execution
the small block boundary
has been advanced into
the range of the small
block increment begin
ning at ssssss on nnnn
d i ff e r e n t o c c a s i o n s .

None

CDCS output
fi l e

I

TERM

The system operator has
entered a TERM command.

None.

CDCS system
control point
d a y fi l e

I

TERMINATE ENCOUN
TERED BEFORE CDCS
COMMIT OR DROP
REQUEST - DROP
ASSUMED

The application program
issued a terminate with
in a CDCS begin/commit
sequence. CDCS auto
matically performs the
drop function to reverse
uncommitted updates.

None.

User control
p o i n t d a y fi l e
CDCS output
fi l e

I

THE AREA ID/NAME
IS id/name

CDCS has changed the
s t a t u s o f t h e s p e c i fi e d
area as a result of an
operator command or an
internal down. This
message precedes all
messages relating to the
status of the area. The
affected area is speci
fied by name or identi
fication where id Is a
1 - t o 4 - d i g i t i d e n t i fi
cation in the form ZZZ9
and name is a 1- to 30character name in the
form X(30).

None.

CDCS system
control point
d a y fi l e

Type

60485200 E

for
CDCS
a
the

B-l 6.1

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

B-l6.2

Dec.
E.C.

Significance

Action

Destination

THE CDCS file IS
EMPTY - MUST BE
ALLOCATED

One of the following
files was found to be
empty during system re
covery: the JOURNAL LOG
FILE, the QUICK RECOVERY
FILE, or the TRANSACTION
RECOVERY FILE. The
schema is set to error
status.

Rerun DBREC to allocate
t h e i n d i c a t e d fi l e . M a n
ually recover the areas
in the schema.

CDCS output
fi l e
CDCS system
control point
d a y fi l e

THE SCHEMA/ID NAME
IS id/name

CDCS has changed the
status of the specified
schema as a result of an
operator command or an
internal down. This
message precedes all
messages relating to the
status of the schema.
The affected schema is
specified by name or
i d e n t i fi c a t i o n w h e r e i d
is a 1- to 4-digit iden
t i fi c a t i o n i n t h e f o r m
ZZZ9, and name is a 1to 30-character name in
the form X(30) .

None.

CDCS system
control point
d a y fi l e

THIRD CHARACTER
MUST BE NUMERIC

When the DT parameter is
specified on the CDCS
control statement or
CDCS directive file, the
third character must be
a number between 0
and 9.

Correct the CDCS control
statement or the CDCS
d i r e c t i v e fi l e . R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

Message

60485200 E

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

N

TOO MANY
CHARACTERS

The number of characters
in a parameter value was
greater than the maximum
number allowed in the
CDCS control statement
or the CDCS directive
fi l e .

Correct the CDCS control
statement or the CDCS
d i r e c t i v e fi l e . R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

N

TOO MANY PASSWORDS

More than five passwords
for the master directory
were specified in the
CDCS control statement
or the CDCS directive
fi l e .

Correct the CDCS control
statement or the CDCS
d i r e c t i v e fi l e . R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

N

UN OR ID MUST BE
GIVEN WITH MDPFN

The master directory
name was specified with
out also specifying the
UN or ID parameters in
the CDCS control state
ment or CDCS directive
fi l e .

Correct the CDCS control
statement or the CDCS
d i r e c t i v e fi l e t o s p e c i f y
the UN or ID parameter.
Reinitialize CDCS.

CDCS system
control point
d a y fi l e

N

UNABLE TO CREATE
DBREC JOB - NO
JOB/ATTACH DATA

Either the job control
information was not
specified in the master
d i r e c t o r y, o r t h e a t t a c h
data for the master
directory was not speci
fied in the CDCS control
statement or the CDCS
d i r e c t i v e fi l e .

Modify the master direc
tory to include the job
control information. Add
the master directory
attach data to the CDCS
control statement or to
the CDCS directive file.
Manually dump and reallo
cate the full journal log
fi l e .

CDCS system
control point
d a y fi l e

N

UNABLE TO SUBMIT
DBREC JOB - I/O
ERROR nnn

The I/O error nnn
occurred on either the
REQUEST statement (NOS/
BE only) or the ROUTE
statement of the DBREC
job that CDCS was trying
to submit.

Correct the I/O error.
Manually dump and reallo
cate the full journal log
fi l e .

CDCS system
control point
d a y fi l e

N

UNKNOWN PARAMETER

An invalid parameter was
specified in the CDCS
control statement or the
CDCS directive file.

Correct the CDCS control
statement or the CDCS
d i r e c t i v e fi l e . R e i n i
tialize CDCS.

CDCS system
control point
d a y fi l e

I

UP,CDCS

The system operator has
entered an UP,CDCS com
mand. Subsequent invoke
calls to CDCS will be
allowed.

None.

CDCS system
control point
d a y fi l e

I

UP COMPLETE

The system operator has
removed the down status
of an area or schema or
terminated the effects
of an IDLE command for
an area or schema. Sub
sequent invokes using
the area or schema will
be allowed.

None.

CDCS system
control point
d a y fi l e

/*"P&S

60485200 A

B-l 7

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

Message

Action

S i g n i fi c a n c e

Destination

I

UP IN PROGRESS

The area or schema is
being restarted by the
system operator follow
ing a previous DOWN or
IDLE command.

None.

CDCS system
control point
d a y fi l e

N

VALUE TOO LARGE

The value specified for
the BL parameter was 1
larger than the maximum
allowed (377777 octal)
in the CDCS control
statement or the CDCS
d i r e c t i v e fi l e .

Specify a smaller value
for the BL parameter.
Reinitialize CDCS.

CDCS system
control point
d a y fi l e

I

VERSION AFFECTED
IS vn

The status of version vn
has changed as a result
of an operator command.
This message precedes
all messages relating
to the status of the
version.

None.

CDCS system
control point
d a y fi l e

I

WAITING FOR CDCS

A user is trying to
access CDCS when it is
not active.

Contact the data adminis
trator to initiate CDCS
at a system control
point.

User control
p o i n t d a y fi l e

600 - CHECKSUM
MISMATCH SUBSCHEMA

The checksum of the
subschema ssn used to
compile the applications
program does not match
the checksum of the
subschema used at master
directory run time.

Recompile and rerun
program using correct
subschema.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

384

ssn

N

385

601 - VIOLATION OF
CONSTRAINT en ON
op OF RECORD rn

An attempt was made to
perform the operation op
(WRITE, DELETE, or RE
WRITE) on the record rn;
the operation would have
violated constraint en.

Notify the data
a d m i n i s t r a t o r.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

N

386

602 - CRM ERROR
nnn ON AREA an
(vn) IN CONSTRAINT
PROCESSING

A CRM error nnn occurred
while performing an up
date operation on the
area an of version vn
(version MASTER if vn
does not appear), which
is involved in a con
straint.

Correct the CRM error and
resubmit the job.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

B-18

60485200 A

TABLE B-l. CDCS DIAGNOSTICS (Contd)

r~

Type

Dec.
E.C.

N

387

N

S i g n i fi c a n c e

Action

603 - LOCKED
RECORD/AREAREQUEST NOT
PROCESSED

A TAF or interactive
Query Update job has
made a request to lock
an area or to read a
record in an area opened
for input/output proccessing when the partic
ular area or record in
the area is locked by
another user job. CDCS
unlocks all the locks
held by the TAF or
interactive Query Update
job and returns control
to TAF or Query Update.
If the TAF user is in
CDCS transaction mode,
the CDCS transaction
is dropped.

The TAF user should in
clude appropriate code in
the application program
to handle this diagnos
tic. Query Update issues
the user a diagnostic and
gives the user a choice
about continuing proc
essing.

Data base
status block
CDCS output
fi l e

388

604 - PF WAIT ON
AREA an (vn)

Another job has exclu
sive file access to area
an of version vn (ver
sion MASTER if vn does
not appear) when a TAF
or interactive Query
Update job requested
access to the area.
CDCS returns control to
TAF or Query Update.
The TAF or Query Update
job must wait for access
until the other job re
turns the area file so
that CDCS can attach the
fi l e .

TAF aborts the user job.
Query Update issues the
user a diagnostic and
gives the user a choice
about continuing proc
essing.

Data base
status block
CDCS output
fi l e

N

389

605 - No message

CDCS is not active at a
system control point.

Notify the data
a d m i n i s t r a t o r.

Data base
status block

F

390

606 - VERSION vn
NOT IN SCHEMA sn

An invoke or version
change operation speci
fied a version name vn
that cannot be found in
the master directory for
the schema sn.

Recompile and rerun the
application program,
using a correct version
name for the schema sn.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

N

391

607 - AREA an (vn)
IS NOT OPEN FOR
I-O, op IS NOT
ALLOWED

The operation op (RE
WRITE, or DELETE) is not
allowed when the area an
of version vn (version
MASTER when vn does not
appear) has not been
opened for input/output
processing.

Ensure that the updating
program includes a state
ment that opens the area
for both update and re
trieval operations (that
is, input/output process
ing) before the statement
specifying the operation
op.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

60485200 A

Message

Destination

B-19

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

N

392

F

S i g n i fi c a n c e

Action

Destination

610 - FOR AREA an
(vn), KEY OF PRIOR
READ MUST MATCH
KEY ON op

The key of the record
being written does not
match the key of the
record previously read
from the area an of ver
sion vn (version MASTER
if vn does not appear).
The value of a data item
that is a key cannot be
modified; instead, the
record containing the
old key value must be
deleted and a record
containing the new key
value must be written.

Resubmit the job speci
fying the statements to
delete the old record and
to write the new record.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

393

611 - SCHEMA sn
NOT IN MASTER
DIRECTORY

The schema name sn used
at execution time does
not match the name of
a schema for which in
formation exists in the
master directory.

Check that information
for the schema has not
been deleted from the
m a s t e r d i r e c t o r y. I f
deleted, add information
for the schema in a mas
ter directory run.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

394

612 - RESTART
ID xxxxxxxxxx
DOES NOT MATCH
ID PREVIOUSLY
ASSIGNED BY CDCS

T h e r e s t a r t i d e n t i fi e r
specified in a DB$ASK
or FINDTRAN request
does not match the re
s t a r t i d e n t i fi e r t h a t
CDCS assigned to the
run-unit earlier in a
DB$GTID/ASSIGNID or
DB$ASK/FINDTRAN request.

Verify the value of the
r e s t a r t i d e n t i fi e r a n d
resubmit the request.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

395

613 - AREA an NOT
CLOSED BEFORE
VERSION CHANGE

A version change opera
tion was requested, but
the area an was still
open and had not been
closed by the applica
tion program.

Recompile and rerun the
application program, in
cluding the appropriate
changes to the status of
the open area before
issuing the version
change request.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

396

614 - SUBPROG
SCHEMA/SUBSCHEMA
NOT IDENTICAL TO
MAIN PROGRAM

The subschema specified
in the SUB-SCHEMA clause
in the COBOL subprogram
or in the SUBSCHEMA
statement in the FORTRAN
subprogram is not iden
tical to the one speci
fied in the main program.

Correct the SUB-SCHEMA
clause in the COBOL sub
program and recompile, or
correct the SUBSCHEMA
statement in the FORTRAN
subprogram and resubmit
the program to the FOR
TRAN DML preprocessor.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

N

397

615 - LOCK MUST BE
SET BEFORE READ ON
AREA an (vn)

The request for a lock
on area an of version vn
(version MASTER if vn
does not appear) was
executed after a read
was executed in the
application program.
When an area is open for
input/output processing,
an area lock (if speci
fied) must be executed
before a read is per
formed on the area.

Resubmit the job speci
fying an area lock before
specifying a read request
if the area is open for
input/output processing.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

B-20

Message

60485200 A

/P*v
TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

F

Message

S i g n i fi c a n c e

Action

Destination

398

616 - OUTSTANDING
FATAL ERROR ON
AREA an (vn)

A fatal error occurred
on area an of version vn
(version MASTER if vn
does not appear) prior
to the current request
for input/output proc
essing; CDCS denies the
current request because
of the previous error.

Check the data base
status block, the user
c o n t r o l p o i n t d a y fi l e , o r
other status variables
for information about the
f a t a l e r r o r. C o r r e c t t h e
error and resubmit the
job.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

399

617 - NO VERSION
CURRENTLY ATTACHED

A previous version
change request resulted
in a nonfatal error.
The current request is
not allowed since no
fi l e s a r e a t t a c h e d .

Correct the version
change request error.
Recompile and rerun the
application program.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

400

620 - CDCS
TRANSACTION UPDATE
NOT IN EFFECT

For a FORTRAN program
an attempt was made to
issue a BEGINTRAN, a
COMMITTRAN, a DROPTRAN,
or a FINDTRAN request
for schema sn, when the
master directory does
not specify a transac
t i o n r e c o v e r y fi l e f o r
this schema.

Modify the master di
rectory to include the
t r a n s a c t i o n r e c o v e r y fi l e
clause.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

sn

For a COBOL program an
attempt was made to
issue a DB$BEG, a
DB$CMT, a DB$DR0P, or
a DB$ASK request for
schema sn, when the mas
ter directory for schema
sn does not specify a
transaction recovery
file for this schema.

r
F

401

621 - CDCS
TRANSACTION
IDENTIFIER NONBLANK

A blank CDCS transaction
identifier was used in a
BEGINTRAN request for a
FORTRAN program or in a
DB$BEG request in a
COBOL program.

Recompile and rerun the
application program,
using a non-blank trans
a c t i o n i d e n t i fi e r i n t h e
BEGINTRAN or DB$BEG
request.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

N

402

622 - MAXIMUM
NUMBER CDCS BEGIN/
COMMIT SEQUENCES
EXCEEDED

The maximum number of
outstanding CDCS trans
actions for all users of
the schema has been
exceeded.

Reissue the BEGINTRAN or
DB$BEG request periodi
c a l l y. T h e m a s t e r d i
rectory transaction
unit limit might need
increasing.

Data base
status block
CDCS output
fi l e

F

403

623 - NO OUT
STANDING CDCS
BEGIN TRANSACTION
REQUEST

Either a commit request
or a drop request was
attempted without pre
viously issuing a begin
request.

Correct and recompile the
application program.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

60485200 A

B-21

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

F

405

625 - REQUEST rq
NOT ALLOWED IN
CDCS BEGIN/COMMIT
SEQUENCE

The request rq was
attempted within a CDCS
begin/commit sequence.

Correct the program to
issue the request outside
of the begin/commit
sequence.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

406

626 - ILLEGAL AREA
NAME

The area name used by
the application program
does not match the name
of an area for which
information exists in
the master directory.

Change the program to
supply the correct area
name.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

I

407

627 - No message

A null record occurrence
was encountered on a
fi l e d u r i n g r e l a t i o n
processing.

Check the condition
during processing if the
application program is
interested in recording
null record occurances.

Data base
status block
C.DMRST ob
ject routine
in COBOL or
variable
DBSTAT or
DBSnnnn in
FORTRAN

F

408

630 - ILLEGAL LOCK
MODE

The lock mode specified
in the lock request is
an invalid lock mode;
valid lock modes are:
exclusive and protected.

Change the program to
supply either the value
EXCLUSIVE or PROTECTED.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

409

631 - NO CDCS
RESTART IDENTIFIER
FILE DEFINED

An attempt was made to
either request a restart
i d e n t i fi e r o r fi n d t h e
last committed transac
tion for a schema which
does not have a restart
i d e n t i fi e r s p e c i fi e d
within the master
d i r e c t o r y.

Either remove the request
from the application pro
gram, or define the re
s t a r t i d e n t i fi e r fi l e
within the master
d i r e c t o r y.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

I

410

632 - No message

A control break was
encountered on a file
during relation proc
essing.

Check the condition dur
ing processing if the
application program is
interested in recording
control break informa
tion.

Data base
status block
C.DMRST ob
ject routine
in COBOL or
variable
DBSTAT or
DBSnnnn in
FORTRAN

N

411

633 - RESTART
IDENTIFIER ALREADY
ASSIGNED BY CDCS

An attempt is made to
request a restart iden
t i fi e r a f t e r a r e s t a r t
i d e n t i fi e r h a s a l r e a d y
been assigned.

Correct and recompile the
application program.

Data base
status block
CDCS output
fi l e

F

412

634 - MAXIMUM
CDCS BEGIN/COMMIT
UPDATE COUNT
EXCEEDED

The maximum number of
updates allowed within
a CDCS begin/commit
sequence has been
exceeded.

Change the application
program to issue fewer
updates in a begin/commit
sequence or increase the
update count limit in the
m a s t e r d i r e c t o r y.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

B-22

Message

S i g n i fi c a n c e

Action

Destination

60485200 A

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

F

Action

Destination

Message

S i g n i fi c a n c e

413

635 - SYSTEM FILE
NOT AVAILABLE FOR
SCHEMA sn

One of the following
CDCS system files is not
available: the journal
l o g fi l e , t h e t r a n s a c
t i o n r e c o v e r y fi l e , t h e
r e s t a r t i d e n t i fi e r fi l e ,
t h e q u i c k r e c o v e r y fi l e ,
or the procedure library
fi l e .

V e r i f y t h a t t h e fi l e
in question has been
initialized by DBREC.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

414

636 - AREA an (vn)
UNUSABLE DURING
ROLL-BACK

An area error occurred
applying a record to the
area an version vn (ver
sion MASTER if vn does
not appear) during proc
essing to reverse a CDCS
transaction. The tempo
rary updates made within
the transaction remain
in effect.

Correct the problem
causing the error and
m a n u a l l y fi n i s h r e v e r s i n g
the updates made within
the CDCS transaction.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

415

637 - RUN ABORT,
SCHEMA sn DOWN

The schema sn needed by
the application program
cannot be accessed be
cause the schema sn has
been marked down by the
s y s t e m o p e r a t o r. T h i s
message occurs during
active processing using
this schema.

Resubmit the job when the
schema is brought up.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

416

640 - RUN ABORT,
CDCS DOWN

CDCS is terminated;
issued to active appli
cation programs.

Resubmit the job when
CDCS is brought up again
at a system control
point.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

417

641 - SUBSCHEMA
ssn NOT IN MASTER
DIRECTORY

The subschema ssn used
at execution time does
not match the name of a
subschema for which in
formation exists in the
m a s t e r d i r e c t o r y.

Check that information
for the subschema is
present in the master
d i r e c t o r y. I f i t i s n o t
present, add information
for the subschema in a
master directory run.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

418

642 - CDCS JOURNAL
LOG FILES
UNAVAILABLE
SCHEMA sn

The CDCS journal log
fi l e s s p e c i fi e d f o r t h e
schema sn have not been
attached at CDCS ini
tialization time, are
down, or cannot be
accessed for some other
reason.

Check that journal log
fi l e s a r e n o t i n e r r o r
status or are being
dumped to tape by a
DBREC job.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

419

643 - SCHEMA sn
NOT AVAILABLE

The schema sn needed by
the application program
cannot be accessed. The
message occurs at invo
cation time.

Resubmit the job when the
schema is brought up
again.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

60485200 B

B-2 3

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

F

420

644 - CDCS
UNAVAILABLE—AN
INVOKE IS NOT
ALLOWED

F

421

F

Action

Destination

The system operator is
terminating, idling, or
downing CDCS. CDCS no
longer accepts requests
from new run-units.

Resubmit job when CDCS is
brought up again at a
system control point.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

645 - ILLEGAL AREA
ORDINAL

An illegal value was
received from the
application program.

F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

422

646 - RESTART
IDENTIFIER
xxxxxxxxxx

T h e r e s t a r t i d e n t i fi e r
specified in a DB$ASK or
FINDTRAN request is in
use by another run-unit.
T h i s r e s t a r t i d e n t i fi e r
can no longer be used in
the request.

Verify and correct the
o l d r e s t a r t i d e n t i fi e r .
If this does not correct
the problem, consult the
d a t a a d m i n i s t r a t o r.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

423

647 - PFM ERROR ec
ON AREA an (vn)

The permanent file
error ec occurred while
attaching the area an
of version vn (version
MASTER if vn does not
appear).

For a non-PUBLIC file
unavailable on NOS,
ensure that a PERMIT con
trol statement specifying
the user name for CDCS or
CDCSBTF execution is in
effect or that the pro
cedure to initialize CDCS
includes a USER control
statement specifying the
user name for CDCS exe
cution. Refer to the
applicable permanent file
error diagnostic in vol
ume 4 of the NOS refer
ence set, or in the
description of the FDB
macro in the NOS/BE
reference manual.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

F

424

650 - PFM ERROR ec
ON AREA an (vn)
INDEX FILE

The permanent file
error ec occurred while
a t t a c h i n g t h e i n d e x fi l e
for the area an of ver
sion vn (version MASTER
if vn does not appear).

For a non-PUBLIC file
unavailable on NOS,
ensure that a PERMIT con
trol statement specifying
the user name for CDCS or
CDCSBTF execution is in
effect or that the pro
cedure to initialize CDCS
includes a USER control
statement specifying the
user name for CDCS exe
cution. Refer to the
a p p l i c a b l e p e r m a n e n t fi l e
error diagnostic in vol
ume 4 of the NOS refer
ence set, or in the
description of the FDB
macro in the NOS/BE
reference manual.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

B-24

Message

S i g n i fi c a n c e

60485200 C

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

60485200 C

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

425

651 - AREA an (vn)
DOWN

The area an of version
vn (version MASTER if vn
does not appear) cannot
be used because of phys
ical storage failure, a
fatal CRM error during
area processing, or be
cause the operator gives
the area a down status.
The area can be brought
up again by issuing the
operator command UP for
the area or by reini
tializing CDCS.

Notify the data
a d m i n i s t r a t o r.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

426

652 - AREA an (vn)
ALREADY OPEN

An open was attempted on
area an of version vn
(version MASTER if vn
does not appear). This
area has already been
opened.

Correct and recompile the
application program.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

B-24.1/B-24.2

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

T/N

427

60485200 A

Message

S i g n i fi c a n c e

Action

Destination

653 - CRM ERROR
nnn DURING op ON
AREA an (vn)

The indicated CRM error
nnn occurred while per
forming the operation op
on the area an of ver
sion vn (version MASTER
if vn does not appear).
I f t h e fi l e i s s t r u c
turally bad, CDCS marks
the area down and does
not allow further access
to it.

Refer to the ZZZZZEG file
and applicable CRM error
diagnostic and correct as
noted in the CRM Advanced
Access Methods reference
m a n u a l . I f t h e fi l e i s
structurally bad, recon
s t r u c t t h e fi l e a n d g i v e
it an up status in order
to allow access to the
area.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

428

654 - AREA an (vn)
NOT OPEN

The indicated area an
of version vn (version
MASTER if vn does not
appear) has not been
opened.

Correct and recompile the
application program.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

429

655 - NO PROCEDURE
LIBRARY SCHEMA sn

No data base procedure
library has been defined
in the master directory
for the indicated schema
sn. Data base proce
dures are specified in
the schema definition.

Modify the master di
rectory to include the
procedure library speci
fi c a t i o n .

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

430

656 - INSUFFICIENT
MEMORY FOR
ROLLBACK
SCHEMA sn

A CYBER Memory Manager
(CMM) overflow condition
occurred during process
ing to reverse a CDCS
transaction. The tempo
rary updates made within
the transaction remain
in effect. The schema
sn is set to error
status.

Manually reverse the
updates made within any
uncommitted transaction.
Increase the memory limit
for CDCS.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

431

657 - INCORRECT
RECORD TYPE DURING
op, AREA an (vn)

The DDL record type
specified on the opera
tion op does not match
the record type deter
mined by the RECORD CODE
criteria for the area
an of version vn (ver
sion MASTER If vn does
not appear).

Check that record code
is correct for record
name given in the I/O
statement.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

432

660 - KEY MAPPING
ERROR DURING op,
AREA an (vn)

An illegal key value
occurs during the oper
ation op on the area
an of version vn (ver
sion MASTER if vn does
not appear). This could
be a conversion error.

Correct the key value.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

433

661 - FDL ERROR ec
ON DBPROC pn

The indicated FDL error
ec occurred while load
ing the indicated data
base procedure pn.

Check that the data base
procedure is in capsule
form and has been prop
erly put in a procedure
l i b r a r y. R e f e r t o t h e
applicable FDL error code
and correct as noted in
the CYBER Loader refer
ence manual.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

B-25

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

B-26

Dec.
E.C.

Message

S i g n i fi c a n c e

Action

Destination

434

662 - ILLEGAL
RECORD ORDINAL

An illegal value was
received from the appli
cation program.

Recompile program.
F o l l o w s i t e - d e fi n e d p r o
cedures for reporting
software errors or opera
tional problems.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

435

663 - DEADLOCK ON
AREA an (vn)

CDCS has unlocked all
locks held by the
program.

Provide appropriate code
to handle recovery from
a deadlock.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

436

664 - ILLEGAL
REQUEST ON AREA
an (vn), READ
OR FILE LOCK
REQUIRED BEFORE op

The CDCS locking mecha
nism requires that the
indicated operation op
(REWRITE or DELETE) be
preceded by a READ
statement or a file
lock to lock the record
for area an version vn
(version MASTER if vn
does not appear).

Issue a READ statement
in the program or lock
the entire area using
either the C.LOK or the
DB$LKAR routine in COBOL
or the DML LOCK state
ment in FORTRAN.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

437

665 - PRIVACY
BREACH ATTEMPT

The correct access con
trol key to gain access
to a given area was not
supplied.

A USE FOR ACCESS CONTROL
procedure must be coded
in the COBOL program, a
DML PRIVACY statement
must be coded in the
FORTRAN program, or an
ACCESS directive must be
entered to Query Update
to supply the correct
privacy key.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

438

666 - ERROR IN
RELATION DATA NAME
DEFINITION

The RESTRICT clause in
the subschema references
an improperly defined
data name in the appli
cation program.

Correct data name and
recompile the application
program. If problem
persists, follow sitedefined procedures for
reporting software errors
or operational problems.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

439

667 - BAD RECTYPE
CODE VALUE

The record type supplied
by the VALUE option does
not match one of the
values expected by CDCS.

Correct the RECORD CODE
information in the schema
or the value stored in
the record in the appli
cation program.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

440

670 - CANNOT
CHANGE REC TYPE ON
op, AREA an (vn)

The record type of the
data base record, as
determined by the RECORD
CODE criteria, cannot be
modified during the in
dicated operation op for
the area an of version
vn (version MASTER if vn
does not appear).

Check that the record
code on the operation is
the same as the original.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

60485200 A

TABLE B-l. CDCS DIAGNOSTICS (Contd)

0^~\

Type

Dec.
E.C.

F

441

671 - ILLEGAL
RELATION ORDINAL

N

442

N

Action

Destination

An illegal value was
received from the appli
cation program.

Recompile program. If
problem persists, follow
site-defined procedures
for reporting software
errors or operational
problems.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

672 - BAD RECTYPE
FROM DBPROC pn

The record type supplied
by the indicated data
base procedure pn does
not match one of the
values expected by CDCS.

Correct the data base
procedure or the value
stored in the record.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

443

673 - op ABORT BY
DBPROC pn

Data base procedure pn
specified the indicated
operation op should be
aborted. Error might be
intentional.

Check that data base
procedure is being used
c o r r e c t l y.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

F

444

674 - RUN UNIT
ABORT (DURING op)
BY DBPROC pn

Data base procedure pn
s p e c i fi e d t h a t t h e
application program
should be aborted during
the indicated operation
op. DURING op does not
appear if the data base
procedure was called on
an error.

Check that data base
procedure is being used
c o r r e c t l y.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

N

445

675 - RECORD
MAPPING ERROR
DURING op ON
RECORD rn

A record mapping error
occurred on the indi
cated record rn during
the specified operation
op. The value of an
item could not be con
verted or a data valida
tion error occurred on
that item (data stored
into the item does not
satisfy requirements in
the CHECK clause). No
data is transferred to
or from the program
working storage area.
The subschema ordinal
of the item in error is
returned in the auxil
iary status word of the
data base status block.

Correct the value of the
item to be converted.

Data base
status block
ZZZZZEG error
fi l e
CDCS output
fi l e

F

446

676 - BAD RETURN
CODE FROM DBPROC
pn

The indicated data base
procedure pn supplied a
return code other than
0, 1, or 3.

Change the procedure to
return a valid return
code.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

60485200 A

Message

S i g n i fi c a n c e

B-27

TABLE B-l. CDCS DIAGNOSTICS (Contd)

Type

Dec.
E.C.

F

447

677 - DBPROC pn
NOT DEFINED FOR
SCHEMA sn

F

472

F

N

Action

Destination

The indicated data base
procedure pn cannot be
found in the data base
procedure library for
the schema sn.

Check that data base pro
cedure is in the correct
library and that the li
brary has been specified
in the master directory
entry for the particular
schema.

Data base
status block
ZZZZZEG error
fi l e
User control
p o i n t d a y fi l e
CDCS output
fi l e

730 - CDCS
TRANSACTION
RECOVERY FILE
I/O ERROR
DURING ROLL
BACK, - SCHEMA
DOWN

An error occurred read
ing the CDCS transaction
r e c o v e r y fi l e w h i l e
processing to reverse a
CDCS transaction. The
temporary updates made
within the transaction
r e m a i n i n e ff e c t . T h e
schema is set to error
status.

Correct the problem caus
ing the I/O error. Man
ually reverse the updates
made within the uncom
mitted transaction.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

474

732 - CDCS SYSTEM
FILE I-O ERROR

The requested function
was not performed be
cause of a CIO or CRM
error on one of the CDCS
l o g g i n g fi l e s .

Notify the data adminis
trator who has specific
information about the
e r r o r.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

475

733 - INQUIRE
TRANSACTION
RESTART IDENTIFIER
ridname UNKNOWN
TO CDCS

An attempt was made to
find the CDCS trans
a c t i o n i d e n t i fi e r a s s o
ciated with the restart
i d e n t i fi e r o f a j o b t h a t
has terminated normally.
Because the job termi
nated normally, the re
s t a r t i d e n t i fi e r c a n n o t
be found.

Assume the user job that
was using the restart
i d e n t i fi e r h a s t e r m i n a t e d
n o r m a l l y.

Data base
status block
User control
p o i n t d a y fi l e
CDCS output
fi l e

I

num CMM OVERFLOW
CALLS MADE

The 6-digit number num
indicates the number of
CMM overflow calls that
occurred during CDCS
processing. A large
number indicates exces
sive overhead.

Usually none. If an ex
cessive number occurred,
the data administrator
should consider increas
ing the maximum field
length for CDCS.

CDCS system
control point
d a y fi l e

I

num MAXIMUM SCM
WORDS USED

The 6-digit number num
indicates the maximum
number of central memory
words used by CDCS.

None.

CDCS system
control point
d a y fi l e

Message

S i g n i fi c a n c e

/*:*si\

/»**^Sv

^ ^ 5 \

B-28

60485200 A

DBMSTRD UTILITY DIAGNOSTICS
The DBMSTRD utility diagnostic messages, listed in
table B-2, are issued for syntax errors detected
when reading the master directory input, for execu
tion errors that cause the utility to abort, and
for errors detected during the CST builder phase.
In the following paragraphs, the DBMSTRD messages
are discussed in categories that describe the type
of message that is issued during a master directory
creation run.
T h e fi r s t c a t e g o r y i s t h e u n n u m b e r e d d i a g n o s t i c
messages beginning with an alphabetic character
which are issued for fatal errors that cause the
DBMSTRD run to abort. These messages are written
t o t h e o u t p u t fi l e a n d t h e d a y fi l e . T h e f o l l o w i n g
termination message also is written on the output
fi l e a n d t h e d a y fi l e :
**** PROGRAM ABORT ****
The second category is the numbered diagnostic
messages issued for syntax errors in the input
fi l e . S y n t a x m e s s a g e s a r e w r i t t e n t o t h e o u t p u t
file and can be identified by a error code between
100 and 200.

The last category is the diagnostic messages that
are issued if errors occur while the DBMSTRD
utility is building the condensed schema/subschema
(CST builder) table. These messages are written to
t h e o u t p u t fi l e .
The DBMSTRD CST builder messages can be distin
guished from the other DBMSTRD messages, listed in
t a b l e B - 2 , i n t h i s w a y. A D B M S T R D C S T b u i l d e r
message either begins with the word WARNING or
begins with an error code between 7000 and 7999.
A generalized error message precedes a CST builder
diagnostic when it is issued. The format of the
g e n e r a l i z e d e r r o r m e s s a g e i s s h o w n i n fi g u r e B - l .
Format notations for brackets and braces are
explained in the notations section earlier in this
m a n u a l . T h e l o w e r c a s e v a r i a b l e s i n t h e fi g u r e
denote the following: subschema name (ssn), schema
name (sn), a number (num), a data base element name
in the subschema (nm), and the module name (mdn).
If a DBMSTRD CST builder message that is fatal to
master directory processing at the schema level is
issued, the following message is written to the
o u t p u t fi l e :
***** FATAL SCHEMA ERROR, UNABLE TO
CONTINUE PROCESSING FOR THIS SCHEMA

(SUBSCHEMA )
CST BUILDER ERROR FATAL TO)
must enclose the list of
data names composing the
concatenated key.

Correct the format of the
KEY IDENTIFIER clause,
and recompile.

333

DATA-NAMES MUST BE CON
SECUTIVE AND CONTIGUOUS
(NO PADDING)

Data names in the KEY must
follow each other consecu
tively in the record de
scription.

Correct the format of
the KEY clause, and
recompile.

334

kkkkkk IS UNDEFINED

The stated data item used as
part of the concatenated key
must be defined.

Define the data item in
the data description
entry, and recompile.

335

kkkkkk IS A REPEATING ITEM
NOT ALLOWED

The stated data item used as
part of the concatenated key
cannot be a repeating data
item.

Change the data item, and
recompile.

B-76

60485200 A

TABLE B-6. DDL SCHEMA DIAGNOSTICS (Contd)
Error
Code

Message

S i g n i fi c a n c e

Action

336

AT LEAST ONE DATA-NAME MUST BE
SPECIFIED FOR A CONCATENATED
KEY

When a concatenated key is
specified, at least one data
name is required.

Insert at least one data
name in the KEY IDENTI
FIER clause, and recom
pile.

337

MORE THAN 64 DATA-NAMES NOT
ALLOWED IN A CONCATENATED KEY

A maximum of 64 contiguous
elementary data items are
allowed in the KEY clause
for the concatenated key.

Correct the format of the
KEY IDENTIFIER clause,
and recompile.

338

KEYS MUST BE DEFINED IN FIRST
RECORD TYPE WITHIN THE AREA

Keys for an area with
multiple record types must
b e d e fi n e d i n t h e fi r s t
record type in the area.

Rearrange the order of
the records in the area,
and recompile.

340

COMPRESSION PREVIOUSLY
SPECIFIED FOR THIS AREA

Only one COMPRESSION clause
is allowed in an area
control statement.

Eliminate the additional
COMPRESSION clause, and
recompile.

341

DECOMPRESSION PREVIOUSLY
SPECIFIED FOR THIS AREA

Only one DECOMPRESSION
clause is allowed in an area
control statement.

Eliminate the additional
DECOMPRESSION clause, and
recompile.

342

SYSTEM OR DATA-BASE-PROCEDURE
MUST BE USED FOR BOTH USAGE
MODES

In the COMPRESSION/
DECOMPRESSION specification
for an area, either the
SYSTEM or PROCEDURE option
can be specified; both
SYSTEM and PROCEDURE cannot
be used in an area.

Correct the COMPRESSION
or DECOMPRESSION clause,
and recompile.

343

COMPRESSION OR DECOMPRESSION
CLAUSE MISSING

If either a COMPRESSION or
DECOMPRESSION clause is
specified, the other must be
s p e c i fi e d a l s o .

Add the missing
COMPRESSION or DECOM
PRESSION clause, and re
compile .

344

SYSTEM OR DATA-BASE-PROCEDURE
NOT SPECIFIED

When COMPRESSION OR DECOM
PRESSION is specified,
either SYSTEM or PROCEDURE
procedure-name must be spec
i fi e d .

Correct the COMPRESSION
and DECOMPRESSION
clauses, and recompile.

345

COMPRESSION/DECOMPRESSION
CLAUSE NOT CONTIGUOUS

A DECOMPRESSION clause must
immediately follow a
COMPRESSION clause, or vice
versa.

Correct the syntax error,
and recompile.

346

INVALID TYPE OPTION - SKIPPING TO PERIOD

In the TYPE clause, the
keywords used to specify the
type option are incompatible
or duplicates exist.

Correct the TYPE clause,
and recompile.

400

ALL OR ENTRY NAME EXPECTED,
NOT SPECIFIED

Either the word ALL or a
valid entry name was not
found when one was expected.

Check the syntax, and
make the necessary cor
rections.

400

INVALID/NON-UNIQUE RELATION
NAME

A relation name specified in
the RELATION NAME clause can
be used only once in the
schema.

Substitute a unique name
for the relation, and
recompile.

401

RELATION NAME LONGER THAN 30
CHARACTERS NAME TRUNCATED

A relation name cannot be
longer than 30 characters.
Any characters following the
fi r s t 3 0 a r e t r u n c a t e d .

Reduce the number of
characters in the rela
tion name, or take no
action.

60485200 A

Type

B-77

TABLE B-6. DDL SCHEMA DIAGNOSTICS (Contd)
Error
Code

Type

Message

S i g n i fi c a n c e

Action

401

UNKNOWN ENTRY NAME

The specified name could not
be found in the directory of
entry names.

Check the specified name
used, and make the appro
priate correction.

402

RESERVED WORD JOIN MISSING

The reserved word JOIN is
required in the JOIN clause
format.

Correct the format of
the JOIN clause, and
recompile.

402

MISSING KEYWORD IN EXHIBIT
SYNTAX

One of the keywords, AREA,
RECORD ITEM, ALL-ENTRIES, or
RELATION, was not specified
in the EXHIBIT directive.

Correct the EXHIBIT di
rective, and recompile
the schema.

403

INVALID/MISSING SCHEMA NAME

Either the schema name was
not a legal file name, or it
was omitted. Schema name is
required.

Correct the schema name
entry, and recompile.

403

kkkkkk DBI IS INVALID/
UNDEFINED

T h e s p e c i fi e d i d e n t i fi e r i s
undefined and/or invalid.

Check the rules for the
j o i n i d e n t i fi e r, m a k e t h e
appropriate changes so
that the data item is
valid and is defined, and
recompile.

404

RELATION ENTRIES MISSING IN
SCHEMA

When the keyword RELATION
was specified in the EXHIBIT
CLAUSE, NO RELATION ENTRIES
could be found in the
schema.

Check to see that the
correct schema is being
used. Make any necessary
corrections to the rela
t i o n e n t r y.

404

kkkkkk DBI SUBSCRIPTS IN ERROR

T h e s p e c i fi e d i d e n t i fi e r
subscripts are in error.

Check the rules for sub
scripting, correct the
format of the JOIN
clause, and recompile.

405

CONSTRAINTS ENTRY MISSING IN
SCHEMA

When the keyword constraints
was specified in the EXHIBIT
clause, no constraint en
tries could be found in the
schema.

Check to see that the
correct schema is being
used. Make any necessary
corrections to the con
s t r a i n t e n t r y.

405

SUBSCRIPT ANY CANNOT BE USED
FOR SOURCE DBIS

The subscript ANY cannot be
u s e d f o r s o u r c e i d e n t i fi e r s .

Correct the format of the
JOIN clause, and recom
pile.

406

kkkkkk DBI SIZE EXCEEDS THE
MAXIMUM OF 255 CHARACTERS

The identifier must not
specify a data item that is
more than 255 characters
long.

Change the data item used
a s t h e i d e n t i fi e r t o o n e
having the appropriate
number of characters, and
recompile.

407

SOURCE AND TARGET DBI PICTURE/
TYPE CHARACTERISTICS MUST BE
IDENTICAL

T h e i d e n t i fi e r s t o t h e l e f t
and to the right of a rela
tional operator must have
identical characteristics in
t h e p i c t u r e s p e c i fi c a t i o n o r
in the TYPE specification.

Change the PICTURE or
TYPE clause so that both
i d e n t i fi e r s h a v e i d e n
tical characteristics.

408

SOURCE AND TARGET DBIS DIFFER
IN SIZE

Source and target identi
fiers must be the same size.

Change the size of the
data item(s) in the PIC
TURE or TYPE clause so
that both are the same
size.

B-78

60485200 A

TABLE B-6. DDL SCHEMA DIAGNOSTICS (Contd)
Error
Code

Message

S i g n i fi c a n c e

409

SUBSCRIPT ANY ON A TARGET DBI
CAN BE SPECIFIED ONLY FOR
ALTERNATE KEYS

The subscript ANY on a
t a r g e t i d e n t i fi e r c a n b e
s p e c i fi e d o n l y f o r a l t e r n a t e
keys.

Check the rules for sub
scripting, make the
appropriate change, and
recompile.

410

FILE CANNOT BE JOINED TO
ITSELF (RECURSION)

An area (file) cannot be
joined to itself in a
relation.

Correct the structure of
the relation, and recom
pile.

411

ILLEGAL PATH-CYCLING OR
DISCONTINUITY

See requirements for JOIN
c l a u s e i d e n t i fi e r s .

Correct the format of the
JOIN clause, and recom
pile.

412

RANK EXCEEDS MAXIMUM OF 64
FILES

The number of files being
joined in a relation has ex
ceeded the limit.

Reduce the number of
fi l e s j o i n e d i n t h e r e l a
tion so that the maximum
is not exceeded, and
recompile.

413

kkkkkk DBI BELONGS TO AREA
WITH MULTIPLE RECORDS — NOT
ALLOWED IN A RELATION PATH

T h e s p e c i fi e d i d e n t i fi e r
cannot belong to an area
with multiple record
descriptions.

Check the rules for
structuring a relation.

414

RESERVED WORD EQ MISSING

The reserved word EQ is
required between each pair
o f i d e n t i fi e r s i n c l u d e d i n
the JOIN clause.

Correct the format of the
JOIN clause, and recom
pile.

415

UNABLE TO COMPLETE ENTRY ENTRY WILL BE IGNORED SEARCHING FOR A PERIOD

A period is required to ter
m i n a t e t h e r e l a t i o n e n t r y.

Insert the period, and
recompile.

416

ILLEGAL PATH - SOURCE DBI MUST
BE IN SAME AREA AS PREVIOUS
TARGET DBI

E a c h s o u r c e i d e n t i fi e r
(except the first) must be
in the same area as the
p r e v i o u s t a r g e t i d e n t i fi e r
in the JOIN clause.

Check the rules for
structuring a relation,
c o r r e c t t h e i d e n t i fi e r s ,
and recompile.

500

INVALID CONSTRAINT NAME

A constraint name can con
tain 1 to 30 alphabetic and
numeric characters and
hyphens.

Change the constraint
name so that it is valid,
and recompile.

501

CONSTRAINT NAME NOT UNIQUE

A constraint name specified
in the CONSTRAINT NAME
clause duplicates another
constraint name or an area
name.

Sustitute a unique name
for the constraint, and
recompile.

502

CONSTRAINT DATA ITEM NOT A
PRIMARY OR ALTERNATE KEY

The data name used in a con
straint entry must be desig
nated as a primary or alter
nate key in a KEY clause.

Correct the KEY clause or
the data name in the con
straint entry, and recom
pile.

503

CONSTRAINT DATA ITEMS DIFFER
IN CHARACTERISTICS

The data names in the
DEPENDS ON clause must be
defined with identical TYPE
or PICTURE clauses.

Change the TYPE or PIC
TURE clauses so that the
data names have identical
characteristics, and re
compile .

504

RESERVED WORD DEPENDS MISSING

The word DEPENDS must appear
between two data names in
t h e c o n s t r a i n t e n t r y.

Insert the word DEPENDS
i n t h e c o n s t r a i n t e n t r y,
and recompile.

j0^\

Type

Action

/gPN.

60485200 A

B-79

TABLE B-6. DDL SCHEMA DIAGNOSTICS (Contd)
Error
Code

Type

Message

S i g n i fi c a n c e

Action

505

CYCLE DETECTED IN CONSTRAINTS

A series of constraints
makes a cycle.

Change the constraint
entry that makes a cycle,
and recompile.

506

CONSTRAINT DATA ITEM (PARENT)
CANNOT HAVE DUPLICATE VALUES

Data-name-2 in the con
straint entry must be an
item designated as an alter
nate or primary key with no
duplicates allowed.

Make an appropriate
change in the constraint
entry or KEY clause, and
recompile.

507

CONSTRAINT NAME LONGLR THAN
30 CHARACTERS - NAME TRUNCATED

The maximum length for a
constraint name is 30
characters. Characters
following the first 30 are
truncated.

Reduce the number of
characters in the con
straint name, or take
no action.

508

DBI IN ABOVE CONSTRAINT CANNOT
DEPEND ON ITSELF

The same data item has been
specified as data-name-1 and
data-name-2 in a constraint
entry; different items must
be specified.

Correct the constraint
entry, and recompile.

991

KEY CHARACTERISTICS NOT THE
SAME IN ALL RECORD TYPES FOR
AREA aaaaaaa

In an area with multiple
record types, key items do
not appear in the same
position or are not the same
size and class in each
record type.

Correct the key items,
and recompile.

992

DATA CONTROL ENTRY FOR AREA
aaaaaaa MISSING

A data control entry is re
quired for each area in the
data base.

Include a data control
entry in the source
program for that area,
and recompile.

993

RECORD CODE VALUE IS NOT EQUAL
TO CHECK VALUE LITERAL OF
CORRESPONDING ITEM FOR REC
rrrrrrrrrr, IN AREA aaaaaaa

The data item used for a
record code value is defined
in the record description
entry with a CHECK IS VALUE
clause. The literal speci
fied in the CHECK clause
must be the same as the lit
eral specified in the RECORD
CODE VALUE clause.

Correct the CHECK IS
VALUE clause, and recom
pile.

994

REC rrrrrrrrrr IN AREA aaaaaaa
DOES NOT CONTAIN ITEM CORRES
PONDING TO DATANAME IN LOCA
TION, SIZE, AND CLASS

The designated record does
not contain a data item
corresponding to the data
name specified in a RECORD
CODE clause. Each record
type in the area must have a
data item in the same posi
tion with the same size and
class.

Restructure the record(s)
so that the data name
specified in the RECORD
CODE clause has the same
position and size
throughout the area.

LITERALS SPECIFIED ON LINE
nnnnnn ARE NOT IN ASCENDING
ORDER

Nonnumeric literals in the
CHECK IS VALUE clause must
be specified in ascending
order according to the col
lating sequence specified
for the area in which the
data item is contained.

Correct the format of the
CHECK IS VALUE clause,
and recompile.

995

B-80

E

60485200 A

TABLE B-6. DDL SCHEMA DIAGNOSTICS (Contd)
Error
Code

Action

Message

S i g n i fi c a n c e

996

VARIABLE DIMENSION GROUP OR
GROUP CONTROL ITEM INCONSIS
TENT ACROSS RECORD TYPES FOR
AREA aaaaaaa

A variable occurrence data
item must be defined for
each DDL record type in the
area. The data item must be
at the same location in each
record type and must be the
same length for one occur
rence of the data item. The
data item that controls the
number of occurrences must
also be in the same location
and have the same length and
type in each record type.

Make the necessary cor
rection, and recompile.

997

FILE CARD VALUES FOR HL, TL,
CP, CL, MNR, OR MRL OVER
WRITTEN BY SCHEMA VALUES FOR
AREA aaaaaaa

One of the values specified
in an area FILE control
statement has been over
written by values computed
during syntax analysis of
the area. The values that
can be overwritten include
header length, trailer
length, character position
and character length for
CYBER Record Manager T-type
records, minimum record
length, and maximum record
length.

No action, or change
the parameter(s) in the
FILE control statement.

998

VARIABLE DIMENSION GROUP
WITH RECORD TYPE NOT T,
AREA aaaaaaa

The specified area contains
a record type with a vari
able occurrence data item
and the FILE control state
ment does not specify a
CYBER Record Manager record
type of T (trailer count).

Change the FILE control
statement, and recompile.

60485200 A

Type

B-81

DDL SUBSCHEMA COMPILATION
AND LIBRARY MAINTENANCE
DIAGNOSTICS FOR COBOL
AND QUERY UPDATE
The DDL diagnostic messages that can be issued
either during compilation of a COBOL or Query Up
date subschema source program or during library
maintenance operations are listed in table B-7.

The library maintenance messages begin with an
a l p h a b e t i c c h a r a c t e r. T h e s u b s c h e m a c o m p i l a t i o n
messages begin with an error code between 100 to
449 (these error codes are enclosed in asterisks
and written to the source listing directly pre
ceding" the message). These messages do not neces
sarily indicate termination of DDL compilation;
unless otherwise stated compilation continues but a
subschema is not created.

TABLE B-7. DDL SUBSCHEMA COMPILATION AND LIBRARY MAINTENANCE
DIAGNOSTICS FOR COBOL AND QUERY UPDATE
Error
Code

S i g n i fi c a n c e

Action

DID NOT LOCATE
aaaaaa —
PURGE NOT POSSIBLE

The subschema name specified for the purge
could not be located in the subschema
l i b r a r y.

Specify the correct
subschema name and
recompile.

DID NOT LOCATE SUB-SCHEMA
TO BE REPLACED NEW SUB
SCHEMA HAS BEEN ADDED

The subschema to be replaced in the library
could not be located; the current subschema
has been added to the library.

Specify correct li
brary or subschema
name and recompile.

EMPTY INPUT FILE PURGE
NOT POSSIBLE

The names of the subschemas to be purged
must be in the Input file.

Make appropriate cor
rections to the input
file and recompile.

EMPTY SUB-SCHEMA FILE, DDL
ABORTED

While executing an audit, collect, or purge
of a subschema library, DDL found it empty
and terminated execution.

Specify the correct
library and recom
pile.

ILL-FORMATTED LIBRARY—NOT
UPDATABLE, DDL ABORTED

The subschema library contains an error and
cannot be updated. DDL terminates.

Check for empty li
b r a r y o r fi l e t h a t i s
n o t a l i b r a r y. C o r
rect the error and
recompile.

OLD SUB-SCHEMA FILE BAD,
SUB-SCHEMA LENGTH IS ZERO

During
pacting
that a
length
in the

Specify the correct
subschema library and
recompile.

SUB-SCHEMA WITH THE SAME
NAME AS THE NEW SUB-SCHEMA
ALREADY EXISTS—FILE NOT
UPDATED

The current subschema could not be added to
the library since the library contains a
subschema with the same name.

Change the subschema
name and recompile.

WARNING EMPTY SUB-SCHEMA
FILE

The subschema library contains no sub
schemas. The subschemas could have been
purged prior to this compilation. The new
subschema is added to the library and is
the only subschema in the library.

If subschemas have
been purged, create a
n e w l i b r a r y.

100

EMPTY INPUT FILE

The input file is empty and the compilation
is terminated.

Create a new file and
recompile.

101

TITLE DIVISION DECLARATION
INCORRECT

Reserved word TITLE or DIVISION is either
misspelled or missing. Compilation is
aborted.

Correct the error and
recompile.

103

SUB-SCHEMA DECLARATION IS
INCORRECT

A reserved word in the SS clause is either
misspelled or missing. Compilation is
aborted.

Correct the error and
recompile.

104

INVALID SCHEMA NAME

The schema name is either the same as a
reserved word or does not conform to the
naming conventions. Compilation is
aborted.

Correct the error and
recompile.

B-82

Message

execution of the facility for com
the subschema library, DDL found
subschema in the old library had a
of zero, which indicates an error
fi l e .

60485200 A

TABLE B-7. DDL SUBSCHEMA COMPILATION AND LIBRARY MAINTENANCE
DIAGNOSTICS FOR COBOL AND QUERY UPDATE (Contd)
Error
Code

Message

S i g n i fi c a n c e

Action

105

ALIAS DIVISION DECLARATION
IS INCORRECT

Reserved word DIVISION is either misspelled
or missing.

Correct the error and
recompile.

106

AD DECLARATION IS INCORRECT

A reserved word in the Alias Division is
misspelled.

Correct the error and
recompile.

107

INVALID NAME IN ALIAS
DIVISION

The specified name does not conform to the
naming conventions.

Correct the error and
recompile.

108

RESERVED WORD -BECOMES- IS
MISSING

Reserved word BECOMES is not included in
the AD clause.

Correct the error and
recompile.

109

DUPLICATE ALIAS NAME

Assigned alias names must be unique.

Correct the error and
recompile.

110

ALIAS-NAME-1 UNKNOWN

The name immediately following AD does not
exist in the schema.

Correct the error and
recompile.

111

INVALID QUALIFIER NAME

The specified qualifier name is either the
same as a reserved word or does not conform
to the naming conventions.

Correct the error and
recompile.

112

REALM DIVISION NOT
SPECIFIED, DEFAULTED TO
-ALL-

The Realm Division statement could not be
located; all the areas in the schema are
copied to the subschema. Compilation is
aborted.

Insert the Realm
Division statement
and recompile.

113

REALM DIVISION TITLE IS
INCORRECT

Reserved word DIVISION is either missing or
misspelled.

Correct the error and
recompile.

114

REALM DESCRIPTION IS
INCORRECT, DEFAULTED TO
-ALL-

Reserved word RD is misspelled or missing;
the clause is ignored. All the areas in
the schema are copied to the subschema.

Correct the error and
recompile.

115

INVALID REALM NAME

The specified name is either the same as a
reserved word or does not conform to the
naming conventions. All the areas in the
schema are copied to the subschema.

Correct the error and
recompile.

116

DUPLICATE REALM NAME

All realm names must be unique.

Correct the error and
recompile.

117

RECORD DIVISION TITLE IS
INCORRECT

Reserved words RECORD and DIVISION are
either missing or misspelled.

Correct the error and
recompile.

118

LEVEL NUMBER NOT SPECIFIED,
DEFAULTED TO -01-

No level number was specified after the
RECORD DIVISION statement; therefore, the
current entry is assumed to be a record
entry and the level number is defaulted
to 01.

Correct the error and
recompile.

119

FIRST ENTRY IN RECORD
DIVISION IS NOT A RECORD
ENTRY, UNABLE TO CONTINUECOMPILATION ABORTED

The first entry specified after the RECORD
DIVISION statement is expected to be a
r e c o r d e n t r y. C o m p i l a t i o n i s t e r m i n a t e d
on the subschema missing this entry.

Correct the error and
compile the uncompiled subschema.

120

INVALID RECORD NAME

The specified record name is either the
same as a reserved word or does not conform
to the naming conventions.

Correct the error and
recompile.

121

DUPLICATE RECORD NAME

All record names must be unique.

Correct the error and
recompile.

60485200 A

B-83

TABLE B-7. DDL SUBSCHEMA COMPILATION AND LIBRARY MAINTENANCE
DIAGNOSTICS FOR COBOL AND QUERY UPDATE (Contd)
r*5S»t!\

Error
Code

Message

S i g n i fi c a n c e

Action

122

CANNOT LOCATE OWNER REALM
IN THE SCHEMA

The schema area in which this record is
defined is not defined in the subschema
Realm Divsion.

Correct the error and
recompile.

123

INVALID LEVEL NUMBER

The level number is not an integer value.

Correct the error and
recompile.

124

INVALID DATA-NAME

The specified item name is either a
reserved word or does not conform to the
naming conventions.

Correct the error and
recompile.

125

DATA-NAME NOT UNIQUE

The specified item name is not unique
within its dominant item.

Correct the error and
recompile.

126

VALUE OF LEVEL NUMBER IS
LESS THAN THE FIRST ITEM
DEFINED IN THE RECORD

Level numbers cannot be lower than the
first level number specified in the record.

Correct the error and
recompile.

127

PICTURE LITERAL GREATER
THAN 30 CHARACTERS, RIGHT
MOST CHARACTERS TRUNCATED

A picture literal cannot be greater than 30
characters; the rightmost characters are
truncated.

Correct the error and
recompile.

128

INVALID USAGE TYPE,
DEFAULTED TO -DISPLAY-

The specified usage type is either missing
or misspelled.

Correct the error and
recompile.

129

USAGE DOES NOT AGREE WITH
THE USAGE IN THE GROUP ITEM

The usage specified at the elementary item
level differs from the usage specified at
the group level. The usage at the group
level overrides the elementary item usage.

Change usage to cor
r e c t s p e c i fi c a t i o n .

130

INVALID OCCURRENCE VALUE

The specified occurrence value is not an
integer value.

Correct the error and
recompile.

131

THE SECOND OCCURRENCE VALUE
IS LESS THAN THE FIRST
OCCURRENCE

The second occurrence value must not be
less than the first occurrence value.

Correct the error and
recompile.

133

DEPENDING ON DATA-NAME IS
INVALID

The specified DEPENDING ON name is either
misspelled or does not conform to the
naming conventions.

Correct the error and
recompile.

134

DEPENDING ON DATA-NAME IS
UNDEFINED IN CURRENT RECORD

The DEPENDING ON name must be defined in
the same record and appear prior to the
item entry that is referencing it.

Correct the error and
recompile.

135

A VARIABLE-OCCURRENCE DATA
ITEM IS NOT ALLOWED TO BE A
SUBORDINATE OF A DATA ITEM
WITH AN OCCURS CLAUSE

The specified DEPENDING ON name must not be
subordinate to a repeating group.

Correct the error and
recompile.

136

USAGE TYPE OF THE DEPENDING
ON NAME IS INVALID

Usage type of the DEPENDING ON name must
not be DISPLAY or COMP-2.

Correct the error and
recompile.

137

INVALID KEY NAME

The specified key name is either the same
as a reserved word or does not conform to
the naming conventions.

Correct the error and
recompile.

138

INVALID IDEX NAME

The specified index name is either the same
as a reserved word or does not conform to
the naming conventions.

Correct the error and
recompile.

139

INDEX NAME IS NOT UNIQUE

Index names must be unique within the sub
schema.

Correct the error and
recompile.

B-84

60485200 A

/f^5^V

TABLE B-7. DDL SUBSCHEMA COMPILATION AND LIBRARY MAINTENANCE
DIAGNOSTICS FOR COBOL AND QUERY UPDATE (Contd)
Error
Code

Message

S i g n i fi c a n c e

Action

140

LEVEL NUMBER IS OUT OF
RANGE, HAS BEEN READJUSTED
TO AN -02- LEVEL

Valid level numbers are 1 through 49, 66,
and 88; 88 level numbers are not valid for
Query Update subschemas.

If assumed level not
acceptable, change to
correct level and
recompile.

141

DATA DESCRIPTION ENTRY WAS
NOT TERMINATED WITH A
PERIOD

A data description entry must be terminated
with a period.

Correct the error and
recompile.

142

ALIAS ENTRY TYPE NOT
SPECIFIED

Alias entry type REALM, RECORD, or DATA was
n o t s p e c i fi e d ; t h e c u r r e n t a l i a s e n t r y i s
ignored.

Specify entry type and
recompile.

143

DATA IS THE ONLY ENTRY TYPE
THAT CAN BE QUALIFIED

Record and realm names must be unique;
therefore, there is no need to qualify
them.

Correct the error and
recompile.

144

UNKNOWN QUALIFIER NAME

The qualifier entry could not be located;
the alias clause is ignored.

Correct the error and
recompile.

145

parameter INVALID IN THE
FOLLOWING CLAUSE

The indicated parameter is invalid.

Correct the error and
recompile.

146

TITLE DIVISION NOT
SPECIFIED - COMPILATION
ABORTED

The Title Divsion is a required entry in
the DDL source program. Compilation is
terminated on the subschema missing this
e n t r y.

Correct the error and
compile the uncompiled subschema.

147

SS - KEYWORD MISSING

Reserved word SS in the subschema declara
tion is missing.

Correct the error and
recompile.

148

INVALID SCHEMA OR SUB
SCHEMA NAME

The specified schema or subschema name is
either the same as a reserved word or does
not conform to the naming conventions.

Correct the error and
recompile.

149

WITHIN - KEYWORD MISSING

Reserved word WITHIN is not included in the
SS clause.

Correct the error and
recompile.

150

UNABLE TO COMPLETE ENTRY ENTRY WILL BE IGNORED SEARCHING FOR A PERIOD

Improper coding conventions have been used.

Check entry for miss
ing period, correct
the error, and recom
pile.

151

PERIOD FOUND

A terminating period has been located for
the previous entry.

Check previous entry
for missing period;
correct the error and
recompile.

152

TITLE DIVISION TITLE IS
INCORRECT

Reserved word DIVISION is either missing or
misspelled.

Correct the error and
recompile.

153

UNKNOWN SOURCE WORD

The item entry could not be located.

Correct the error and
recompile.

154

UNDEFINED KEY

The record key defined in the schema does
not appear in the subschema.

Define the appropri
ate key and recompile.

155

SCHEMA NAME SPECIFIED IN
THE SUB-SCHEMA DOES NOT
MATCH THE SCHEMA NAME IN
THE SCHEMA

The schema name specified in the Title
Division must be the same as the name
specified in the schema declaration in the
schema.

Correct the error and
recompile.

60485200 A

B-85

/-]

3-23

[OCCURS integer-2 TIMES]

3-23

[OCCURS integer-1 TO integer-2 TIMES DEPENDING ON data-name-1]

3-23

|* f PICTURE

I S p i c t u r e - s p e c i fi c a t i o n

[tPI£

3-24

[REDEFINES data-name-1]

3-28

f ( SYNCHRONIZED \fLEET l"|

3-28

|t

SYNC

f

|

RIGHT

|j

3-28

COMPUTATIONAL
COMP
COMPUTATIONAL-1
COMP-1
COMPUTATIONAL-2
USAGE IS / COMP-2
DISPLAY
INDEX
DOUBLE
LOGICAL
COMPLEX

FORMAT 2
66 data-name-1 RENAMES data-name

3-30

-2[{SuGH}data-name"3]

E-6

60485200 A

yf"*"^\

COBOL/Query Update Subschema - FORTRAN Subschema
RELATION DIVISION
RELATION DIVISION.
3-30

RN IS relation-name

3-30

RESTRICT record-name
EQ

N£

WHERE [N0T][(] identifier-1

NE
GR
GT
LS
LT

i d e n t i fi e r - 2 )
literal-1 > [)_]
data-name-1 )

G£
GE
LQ
LE

AND
O R \ [ N O T ] K ] i d e n t i fi e r - 3
XOR

EQ
NQ
NE
GR
GT
LS
LT
GQ
GE

i d e int ti ififieerr--44 )
l i t esr a
r al -l - 2 > D ]
data»-name-2 )

LE

FORTRAN SUBSCHEMA SYNTAX
SUBSCHEMA statement
[ALIAS statement] ...
{REALM statement} ...
RECORD statement \

«{ type

statement]} . . . / • • •

[RESTRICTstatement
statement]
[RELATION

•J-

END statement

SUBSCHEMA STATEMENT
SUBSCHEMA subschema-name, SCHEMA = schema-name

4-9 |

ALIAS STATEMENT
(REALM)
ALIAS { (RECORD) \ new-name-1 = old-name-1 [, new-name-2 = old-name-2]
(ITEM)

60485200 E

4-9 |

E-7

FORTRAN Subschema
REALM STATEMENT
4-10

' trealm-name-1 [, realm-name-2] ... f

RECORD STATEMENT
4-10

| RECORD record-name

TYPE STATEMENT - FORTRAN 5
CHARACTER [*default-length [,]] item-name-1 [*len-l] [, item-name-2 [*len-2]]
i / BOOLEAN
'l REAL
■ \ ) INTEGER
1 \ LOGICAL
/ (COMPLEX
DOUBLE PRECISION

4-11

item-name-1 [, item-name-2] ...

/*ffi£*jv

RELATION STATEMENT
4-12

| RELATION relation-name

RESTRICT STATEMENT
| RESTRICT record-name-1 (logical-expression-1) [, record-name-2 (logical-expression-2)]

4-12

Format of logical expression:
.EQ.

tr-]«

!gt! ( (db-item-2

] db-item-1 *( '*' *[ >
[ n [)]
non-db-item-2 I

END STATEMENT
| END

E-8

4-13

60485200 E

Master Directory

MASTER DIRECTORY SYNTAX
Master directory syntax is shown in two subsections, syntax for a creation run and syntax for modification
run. The syntax is ordered according to the general format for each run. Subentries that are referenced in
the format appear following the last subentry (the subschema subentry) of the creation run.

SYNTAX FOR A CREATION RUN
General format for the creation run appears below,
{creation entry} ...
where the skeleton of a creation entry is as follows:
schema subentry
master version subentry
[alternate version subentry] ...
{subschema subentry} ...

Schema Subentry
SCHEMA NAME IS schema-name
FILE NAME IS lfn

8-3

PROCEDURE LIBRARY
permanent file information subentry

8-4

TRANSACTION RECOVERY FILE
permanent file information subentry
[UNIT LIMIT IS integer-1]
[UPDATE LIMIT IS integer-21

8-4

RESTART IDENTIFIER FILE
permanent file information subentry

8-4

JOURNAL LOG FILE
permanent file information subentry

8-4

QUICK RECOVERY FILE
permanent file information subentry_

8-4.1 |

JOB CONTROL INFORMATION

8-4.1 |

TYPE IS
TAPE

[UN IS literal-1]
[PW IS literal-2]
[FAMILY NAME IS family-name]
r(ACCOUNT| Te .... , ,1

hCHARGE-j- IS "f "1-3J

60485200 E

E-9

Master Directory
Master Version Subentry
8-5

[VERSION NAME IS MASTER]
{area subentry} ...

Alternate Version Subentry
8-8

VERSION NAME IS version-name
{ • }
AREA NAME IS area-name SAME AS MASTER.
area subentry

Subschema Subentry
8-8

SUBSCHEMA NAME IS subschema-name
FILE NAME IS lfn.

Area Subentry
8-6
8-6

AREA NAME IS area-name
PFN IS literal-1

11} I S

literal-2 [PW IS literal-3 [literal-4]...]

FAMILY NAME IS family-name-1
PACK NAME IS pack-name-1
SET NAME IS set-name-1 VSN IS literal-5

BEFORE IMAGE RECORDS

LOG

AFTER IMAGE RECORDS
BEFORE IMAGE BLOCKS

[DEVICE TYPE IS dt-1]

OFF
ON
OFF
ON
OFF

8-7

ON
8-7

INDEX FILE ASSIGNED PFN IS literal-6
i||llS literal-7 [PW IS literal-8 [literal-9]...]
FAMILY NAME IS family-name-2
PACK NAME IS pack-name-2
SET NAME IS set-name-2 VSN IS literal-10

[DEVICE TYPE IS dt-2]

Permanent File Information Subentry
PFN IS literal-1 i^| I IS literal-2 [PW IS literal-3 [literal-4]...]
FAMILY NAME IS family-name
PACK NAME IS pack-name
SET NAME IS set-name VSN IS literal-5

E-10

8-1

[DEVICE TYPE IS dt]

60485200 A

Master Directory

SYNTAX FOR MODIFICATION RUN
General format for the modification run appears below. Syntax for these entries reference syntax shown for the
creation run.
add schema entry
delete schema entry
modify schema entry

Add Schema Entry
ADD

SCHEMAS.

8-9

{creation entry} ...

Delete Schema Entry
DELETE
{SCHEMA NAME IS schema-name.} ...

SCHEMAS.

8-9

Modify Schema Entry
MODIFY
SCHEMA
[FILE NAME IS lfn-1].
f

NAME

IS

CHANGE
PROCEDURE
permanent file information subentry

schema-name

LIBRARY

I

8-9

8-10

8-10

CHANGE TRANSACTION RECOVERY FILE
[permanent file information subentry]
[UNIT LIMIT IS integer-1]
[UPDATE LIMIT IS integer-2]

8-11
file
subentry.J
[ C H Apermanent
N G E R E S TA
RTinformation
IDENTIFIER
FILE "I
8-12
[CHA
permanent
N G E J Ofile
URN
information
A L L O G subentry.J
FILE |
8-12

[" CHANGE QUICK RECOVERY FILE 1
I p e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y. J

60485200

A

E-ll

Master Directory
8-12

CHANGE JOB CONTROL INFORMATION
TYPE IS {|}
LO
HI

TAPE

DENSITY IS ( ||
PE
GE
[UN IS literal-1]
[PW IS literal-2]
[FAMILY NAME IS family-name]
ACCOUNT \
IS literal
11 CHARGE {

*]

CHANGE AREA NAME IS area-name

8-13

fvERSION NAME (version-name
IS {FASTER J |1J
[SAME AS MASTER]
permanent file information subentry
BEFORE IMAGE RECORDS

LOG

AFTER IMAGE RECORDS
BEFORE IMAGE BLOCKS

OFF
ON
OFF
ON
OFF

ON

INDEX FILE ASSIGNED
permanent file information subentry

[DELETE VERSION NAME IS version-name.] ...
ADD VERSION NAME IS version-name

8-15
8-15

{ • >
AREA NAME IS area-name SAME AS MASTER.
area subentry
SUBSCHEMA NAME IS subschema-name("ADD SUB!
I F I L E NAME IS lfn-2.
■] •■■

8-15

[DELETE SUBSCHEMA NAME IS subschema-name-2.]

8-15

( MODIFICATIONS

END
■^JHoBT

E-12

}•

8-10

60485200 A

DBREC - DBRCN and DBRST

DBREC SYNTAX
SCHEMA NAME IS schema-name-1

9-6

DUMP
JOURNAL LOG FILE NAME IS log-file-name-1 [.]
ALLOCATE
JOURNAL LOG FILE [NAME IS log-file-name-2] SIZE is integer-1 PRUS
QUICK RECOVERY FILE NAME IS qrf-name-1 SIZE IS integer-2 PRUS
TRANSACTION RECOVERY FILE NAME IS trf-name
RESTART IDENTIFIER FILE NAME IS rif-name

[.]

DBRCN AND DBRST SYNTAX
SCHEMA NAME IS schema-name.

9-11

SELECT FOR RECOVERY
AREA NAME IS area-name
VERSION NAME IS version-name
JOB NAME IS job-name
/§Ss>\

RUN-UNIT IS run-unit-id
BEGIN AT "RECOVERY
TIME *««*-t*"
POINT integer
END AT

60485200 A

TIME date-time
RECOVERY POINT integer

E-13

0*%\

FUTURE SYSTEM MIGRATION GUIDELINES
/•pfev

This appendix contains programming practices recom
mended by CDC for users of the software described
in this manual. When possible, application pro
grams based on this software should be designed and
coded in conformance with these recommendations.
Tw o f o r m s o f g u i d e l i n e s a r e g i v e n . T h e g e n e r a l
guidelines minimize application program dependence
o n t h e s p e c i fi c c h a r a c t e r i s t i c s o f a h a r d w a r e
system. The feature use guidelines ensure the
easiest migration of an application program to
future hardware or software systems.

ADVANCED ACCESS METHODS
The Advanced Access Methods (AAM) offer several
features within which choices must be made. The
following paragraphs indicate preferred usage.

Access Methods
The recommended access methods are indexed sequen
tial (IS), direct access (DA), and multiple-index
processor (MIP).

GENERAL GUIDELINES

Record Types

Programmers should observe the following practices
to avoid hardware dependency:

The recommended record types are either F for fixed
length type records, or W for variable length
records. Record length for W records is indicated
in the control word; the length must be supplied by
the user in the RL FIT field on a put operation and
is returned to the user in RL on a get operation.

Avoid programming hardcoded constants. Manipu
lation of data should never depend on the
o c c u r r e n c e o f a t y p e o f d a t a i n a fi x e d m u l
tiple such as 6, 10, or 60.
Do not manipulate data based on the binary
representation of that data. Characters should
be manipulated as characters, rather than as
octal display-coded values or as 6-bit binary
digits. Numbers should be manipulated as
numeric d a ta o f a k n o w n ty p e , r a th e r th a n a s
binary patterns within a central memory word.
Do not identify or classify information based
o n t h e l o c a t i o n o f a s p e c i fi c v a l u e w i t h i n a
specific set of central memory word bits.
Avoid COMPASS in application programs. COMPASS
and other machine-dependent languages can
complicate migration to future hardware or
software systems. Migration is restricted by
c o n t i n u e d u s e o f C O M PA S S f o r s t a n d - a l o n e
programs, by COMPASS subroutines embedded in
programs using higher-level languages, and by
COMPASS owncode routines used with CDC standard
p r o d u c t s . C O M PA S S s h o u l d o n l y b e u s e d t o
create part or all of an application program
when the function cannot be performed in a
higher-level language or when execution
e f fi c i e n c y i s m o r e i m p o r t a n t t h a n a n y o t h e r
consideration.

FORTRAN Usage
The following machine-independent coding practices
are encouraged for a FORTRAN programmer using AAM:
Initialize the FIT by FILExx calls or by the
FILE control statement.
Modify the FIT with STOREF calls.
Use the FORTRAN 5 CHARACTER data type when
w o r k i n g w i t h c h a r a c t e r fi e l d s r a t h e r t h a n o c t a l
values of display code characters; specify
l e n g t h s o f fi e l d s , r e c o r d s , a n d s o f o r t h , i n
characters rather than words.

DMS-170
DMS-170 offers several features among which choices
must be made. The following paragraphs indicate
preferred usage of CDCS, DDL, and of Query Update
in support of CDCS.

Multiple Record Descriptions

FEATURE USE GUIDELINES
The recommendations in the remainder of this appen
dix ensure the easiest migration of an application
program for use on future hardware or software
systems. These recommendations are based on known
or anticipated changes in the hardware or software
system, or comply with proposed new industry stan
dards or proposed changes to existing industry
standards.

60485200 A

Do not include multiple record descriptions on
s i n g l e fi l e .

Repeating Groups
Avoid the use of the OCCURS clause, repeating
groups, or arrays within records; as an alterna
tive, the repeating data can be normalized into
s e p a r a t e r e c o r d s o n a d i f f e r e n t fi l e . I f r e p e a t i n g

F-l

d a t a m u s t b e u s e d , l i m i t u s a g e t o fi x e d l e n g t h
groups (no OCCURS DEPENDING ON clause) and to
simple (unnested) OCCURS clauses.

Alternate Keys on Repeating Groups
A v o i d t h e s p e c i fi c a t i o n o f a l t e r n a t e k e y s o n
repeating groups. The data can be normalized as
indicated under Repeating Groups.

REDEFINES Clause
Use the REDEFINES clause only for alphanumeric-toa l p h a n u m e r i c r e d e fi n i t i o n s , w h e r e t h e t e r m a l p h a
numeric has the meaning assigned by COBOL to data.
In general, avoid the use of REDEFINES where use is
based on a knowledge of the internal representation
o f d a t a ( fl o a t i n g - p o i n t l a y o u t , n u m b e r o f c h a r
acters per word, and so forth).

Query Update Syntax
Collating Sequence
Use the default collating sequence or the ASCII
collating sequence.

Use the new directives INVOKE, STORE, MODIFY, and
R E M O V E , i n s t e a d o f t h e d i r e c t i v e s U S E , I N S E RT,
UPDATE, and DELETE.

*3®K

^SiSSA

F-2

60485200 A

FIELD LENGTH REQUIREMENTS

T h i s a p p e n d i x d i s c u s s e s fi e l d l e n g t h r e q u i r e m e n t s
for the following:

Constraint processing
Data base procedure processing

Schema generation
Data base version processing
Subschema generation
CYBER Database Control System (CDCS) execution
Data base utilitites execution

Logging to the log and recovery files
Operator console displays
Relation processing

Additional information concerning CDCS memory
requests and job aborts is also given.

FIELD LENGTH REQUIREMENTS
FOR SCHEMA GENERATION
The minimum field length required for generating a
schema is approximately 50000 octal. For complex
s o u r c e I n p u t , a d d i t i o n a l fi e l d l e n g t h o f a p p r o x i
mately 12 octal words is required for each data
item contained in the record description entries.

FIELD LENGTH REQUIREMENTS
FOR SUBSCHEMA GENERATION
The minimum field length required for generating a
minimum FORTRAN, COBOL, or Query Update subschema
is 50000 octal; a minimum subschema contains one
realm, one record, and one item.
Field length requirements for a larger subschema
can be estimated by increasing the field length by
12 octal words for each additional element in the
subschema; an element is a realm, record, item, or
relation.

FIELD LENGTH REQUIREMENTS
FOR CDCS EXECUTION
CDCS resides at a system control point. After CDCS
i s i n i ti a te d a s a n a c t i v e s y s t e m c o n t r o l p o i n t , t h e
r e m a i n d e r o f t h e fi e l d l e n g t h r e p r e s e n t s m a n a g e d
memory under the control of Common Memory Manager
(CMM). An applications program using CDCS resides
at a user control point.

User-requested accounting
1/0 buffers, various internal tables generated by
CDCS, CDCS overlay capsules, mapping capsules,
Advanced Access Methods (AAM) code capsules, and
data base procedures are maintained in managed
memory. The sizes of the buffers and tables are a
function primarily of the maximum data record size,
fi l e b l o c k s i z e , a n d t h e c o m p l e x i t y o f i n d i v i d u a l
schemas and subschemas. The following are guide
lines for determining a suitable CDCS execution
fi e l d l e n g t h :
1/0 buffers
A m i n i m u m o f 2 o r 4 b u f f e r s p e r fi l e ,
d e p e n d i n g o n w h e t h e r o r n o t a n i n d e x fi l e
exists. (Buffer size is determined by the
m a x i m u m b l o c k l e n g t h ( M B L ) s p e c i fi c a t i o n
w h e n t h e fi l e w a s c r e a t e d . ) I n a d d i t i o n ,
2 0 0 o c t a l w o r d s a r e n e e d e d for the FSTT,
and 100 octal words for each user of the
fi l e .
Pooled buffer space
T h e b u ff e r s p a c e t h a t c a n b e a l l o c a t e d b y
AAM. The BL parameter on the CDCS control
s t a t e m e n t d e t e r m i n e s t h e b u ff e r s p a c e t h a t
can be allocated by AAM. A value for the
BL parameter can be specified to reduce the
space that would be allocated by default.
Specifying a value of less than 40000 octal
is not usually recommended because specify
ing a lower value can cause degradation in
the performance of CDCS processing.
Tables per user

A basic load for CDCS execution requires sufficient
space for the CDCS code and overlay capsules when
in use, plus adequate space for buffers, tables,
mapping capsules, and data base procedures as
i n d i c a t e d i n t h e e s t i m a t e s b e l o w. T h e s p a c e
required for CDCS code can be determined from the
load map g e n e r a t e d d u r i n g C D C S i n s t a l l a t i o n . T h e
load map also shows the space required for each
CDCS overlay capsule (OVCAP).
The code for many optional CDCS features is con
tained in overlay capsules. When a feature is
used, the space for the corresponding overylay
capsules must be included in the space for CDCS.
Overlay capsules are used for the following
features:

60485200 A

Determined from the number of concurrent
users, the size of the CST table, and the
d e g r e e o f s h a r i n g o f C S T- r e l a t e d d a t a .
G e n e r a l l y, t h e a d d i t i o n a l s p a c e p e r u s e r
above the CST is less than the CST size,
except when the CST size is less than 200
octal words.
AAM/BAM basic routines
16000 octal words.
AAM IS
6000 octal words.

G-l

AAM DA
3000 octal words.

CDCS MEMORY MANAGEMENT
PARAMETER GUIDELINES

AAM AK
5000 octal words.
AAM MIP
6000 octal words.
Mapping capsules
Determined from the Data Description Lan
guage (DDL) subschema output or from CST
statistics in the DBMSTRD output listing.
Data base procedures
Determined from capsule load map.
CST tables
Reported by the DBMSTRD utility.
A factor to be considered in deriving CDCS memory
requirements is the degree to which sharing of
subschemas for a given data base occurs. When
users are sharing the same subschema, CDCS links
all users to a single copy of the tables for that
subschema*
When CDCS makes a memory request that cannot be
s a t i s fi e d , v a r i o u s p r o c e d u r e s a r e e x e c u t e d t o
a t t e m p t t o f r e e u p s u f fi c i e n t s p a c e s o t h a t t h e
r e q u e s t c a n b e s a t i s fi e d . F o r e x a m p l e , d a t a b a s e
procedures are unloaded and user tables are swapped
out. Other modules (for example, AAM) also release
unneeded blocks of memory through their own memory
o v e r fl o w p r o c e d u r e s . I f a d e q u a t e m e m o r y i s s t i l l
not available, the user's job might be aborted.
If space cannot be obtained, a user's job might be
aborted under the following circumstances:
Invocation of CDCS. Space is required for
subschema and other tables.
Execution of a large data base procedure or
mapping capsule. Space Is required to load the
capsule.
Some overflow conditions are not recoverable, even
after all possible memory is released. In these
cases, CDCS and all jobs using CDCS are aborted.
This situation indicates that CDCS requires more
fi e l d l e n g t h t o p e r f o r m i t s b a s i c f u n c t i o n s . T h e
maximum field length parameter on the CDCS control
statement must be increased.
CDCS should normally be allowed to request suffi
cient memory to process requests from the maximum
number of concurrent user programs that can be in
memory at one time. If CDCS is constrained to a
s m a l l e r a m o u n t o f m e m o r y, c o n fl i c t s r e s u l t a n d
occasionally jobs are aborted.
When CDCS is executing at a system control point
and has no user requests to process, it rolls out
i t s fi e l d l e n g t h t o a n R M S s w a p fi l e , l e a v i n g a
fi e l d l e n g t h o f a p p r o x i m a t e l y 7 0 0 o c t a l w o r d s a t
the control point. When a new user request or a
request for the system L display is received, CDCS
rolls itself back into memory.

CDCS provides several control statement parameters
that are aids in controlling the growth of the CDCS
fi e l d l e n g t h . T h e r e a r e n o e x a c t f o r m u l a s f o r t h e
best use of these parameters, but the following
steps and guidelines will help achieve some initial
estimates for these parameters.
First, review the available parameters that are
provided for permanently loading CRM capsules and
CDCS overlay capsules. When any of these are
expected to be used on a regular basis, it is much
more efficient to load them only once during CDCS
initialization, than to permit them to be loaded
and unloaded repeatedly during CDCS execution.
This also avoids one of the possible sources of
memory fragmentation.
The next step is to select the value of the MFL
p a r a m e t e r. T h i s v a l u e i s o f t e n s e l e c t e d a s a
compromise between the minimum CDCS requirements
and the maximum that the installation can permit
CDCS to use within the environment of that ma
c h i n e . A l a r g e r M F L w i l l p e r m i t a m o r e e f fi c i e n t
execution of CDCS. A small MFL will require
f r e q u e n t e x e c u t i o n o f m e m o r y o v e r fl o w p r o c e d u r e s
and occasionally cause jobs or even CDCS to be
a b o r t e d f o r l a c k o f s u f fi c i e n t c e n t r a l m e m o r y. T h e
preceding paragraph contains some basis for
estimating a minimum requirement.
A value that should be known while selecting these
parameter values is the initial load FL of CDCS.
T h i s v a l u e i s g i v e n b y t h e d a y fi l e m e s s a g e
"INITIAL LOAD FL" that is written to the CDCS dayfi l e i m m e d i a t e l y f o l l o w i n g C D C S i n i t i a l i z a t i o n . B e
sure that the CRM and CAP parameters are the same
as are to be used in future CDCS executions.

/tf^^S

0^^\

To s e l e c t a v a l u e f o r t h e B L p a r a m e t e r, t a k e t h e
difference between the MFL parameter and the in
itial load FL. This is the memory available for
CDCS tables, mapping capsules, database procedures,
CRM tables and I-O buffers. Half of this available
memory should be made available for the I-O buf
fers. That is a value that is a reasonable esti
mate for the BL parameter. If the BL parameter is
n o t s p e c i fi e d , C D C S w i l l s e l e c t a v a l u e t h a t i s
slightly larger than this calculation.
I n c r e a s i n g B L i n c r e a s e s C D C S e f fi c i e n c y, b u t C R M
may use an unwarrented amount of central memory
buffer space. Decreasing BL will cause CRM to
fl u s h i t s b u f f e r s m o r e f r e q u e n t l y , r e s u l t i n g i n
more I/O.
SBL and SBI are parameters that are available to
help to combat the memory fragmentation that occurs
within CDCS. A small block is defined as any me
mory block of less than 240 octal words. Both CDCS
and the Record Manager assign many memory blocks
t h a t f a l l w i t h i n t h e s m a l l b l o c k c a t e g o r y. A s a
general rule, these small blocks are assigned at a
fixed location and cannot be released or moved by
any of the memory overflow procedures.
There are provisions for releasing most of the
larger blocks. If the large blocks are released
but leave small blocks that were nested among them,
then the resulting memory is fragmented.
^*j?Siij*#§5v

• G-2

60485200 E

It is possible to establish a boundary beyond which
CMM does not assign any small blocks. When the
small blocks are prevented from entering an area
reserved for large blocks, the large blocks can be
exchanged with each other more freely. When the
SBI (small block boundary increment) is specified,
the boundary is originally established at the
i n i t i a l l o a d fi e l d l e n g t h p l u s t w o i n c r e m e n t s .
When it is not possible to assign a small block
w i t h i n t h e s m a l l b l o c k b o u n d a r y, C M M c a l l s t h e
memory overflow procedures that are defined by CDCS
and by CRM. These memory overflow routines will
first attempt to make memory available by releasing
memory that is held. The releasable memory blocks
c o n s i s t o f c a p s u l e s , o v e r l a y c a p s u l e s , I - O b u ff e r s
and the RSB and CST tables. Each of these releas
able memory blocks usually fall into t.ie the large
block category but may have been assigned within
the small block boundary.
If releasing memory blocks does not make memory
a v a i l a b l e w i t h i n t h e s m a l l b l o c k b o u n d a r y, t h e
boundary is advanced by one increment. If the
memory is not available within the enlarged bound
a r y, t h e b o u n d a r y i s a d v a n c e d j u s t t e m p o r a r i l y t o
i n c l u d e t h e f u l l fi e l d l e n g t h . T h e n a f t e r t h e
block has been assigned the boundary is restored to
its previously enlarged value.
When the large blocks that have been released are
r e a s s i g n e d , t h e y w i l l n o t fi n d a n y a v a i l a b l e s p a c e
within the s m a l l b l o c k b o u n d a r y a n d w i l l b e r e a s
signed beyond the boundary. There, where the im
mobile small blocks will not interfere, the large
blocks will exchange with each other more freely.
The small block boundary is reduced by 100 octal
each time that a CDCS area is closed.

w i l l b e a s s i g n e d b e y o n d t h e S B L i f a l l o v e r fl o w
procedures have failed to make space available
w i t h i n t h e l i m i t . H o w e v e r, w h e n t h e y a r e b e i n g
assigned beyond the limit, all of the memory over
flow procedures will be tried before assigning each
small block.
The SBL parameter can be used as a more flexible
substitute for the MFL parameter to control the
a d v a n c e o f t h e fi e l d l e n g t h . B e f o r e e s t a b l i s h i n g
an SBL value it would be valuable to first specify
only an SBI and observe the small block boundary
summary messages that are written to the CDCS
o u t p u t fi l e w h e n C D C S i s t e r m i n a t e d . T h i s w i l l
provide a better idea of what a reasonable limit is.

USE A UNIFORM CRM BLOCK SIZE
Another important consideration for reducing memory
f r a g m e n t a t i o n i s t o a t t e m p t t o d e fi n e t h e m e m o r y
blocks of uniform size so that they will easily
i n t e r c h a n g e w i t h e a c h o t h e r. W h e n s p e c i f y i n g t h e
M B L f o r e a c h o f t h e d a t a b a s e fi l e s , c o n s i d e r t h a t
C R M w i l l o f t e n b e r e l e a s i n g a b l o c k f r o m o n e fi l e
t o a l l o c a t e a b l o c k f r o m a n o t h e r fi l e . T h i s w o r k s
best if the blocks are the same size. When it is
n e c e s s a r y t o d e fi n e b l o c k s o f d i f f e r e n t s i z e s , s e
lect just two or three uniform sizes to which all
files can conform.

FIELD LENGTH REQUIREMENTS
FOR THE DATA BASE UTILITIES
T h e m i n i m u m e x e c u t i o n fi e l d l e n g t h s f o r j o b s e x e
cuting the data base utilities are the following:
DBRCN 70000 octal words

It is recommended that SBI be set to a value in the
range of 2000 to 14000. Selection of a smaller
v a l u e w i l l c a u s e t h e C M M o v e r fl o w r o u t i n e s t o b e
executed more frequently. This can help to contain
the CDCS FL but incurs a large overhead.
The SBL parameter specifies an upper limit beyond
which the small block boundary will not be ad
v a n c e d . I f S B L i s s p e c i fi e d w i t h o u t s p e c i f y i n g
S B I , t h e b o u n d a r y i s fi x e d a t S B L . S m a l l b l o c k s

60485200 E

DBRST 70000 octal words
DBMSTRD 45000 octal words
D B Q R FA 2 0 0 0 0 o c t a l w o r d s
DBQRFI 5000 octal words
DBREC 50000 octal words

G-3*

DATA CONVERSION RULES

The data conversion rules that apply to CDCS record
mapping described in section 5 are covered in this
appendix. Conversion sequences that can cause
alteration of data without conversion diagnostics
are noted following the conversion rules.
Valid conversions are listed with source and target
d a t a c l a s s c o d e s , e x p e c t e d s o u r c e fi e l d c o n t e n t s ,
conversion operation performed, and error condi
tions. Information that applies to a set of con
v e r s i o n r u l e s i s i d e n t i fi e d b y t h e s o u r c e d a t a
class and an X denoting all target data classes
(for example, 3-X) and precedes the set to which it
p e r t a i n s . A s p e c i fi c c o n v e r s i o n i s r e f e r e n c e d b y
giving the source and target data classes separated
by a hyphen. CDCS diagnostic messages noted for
error conditions are contained in appendix B.
The data classes and their respective codes are as
follows:
Code

Meaning

0

Display alphanumeric

1

Display alphabetic

3

Display integer

4

D i s p l a y fi x e d p o i n t

10

Coded binary integer

13

Coded floating point normalized

14

Coded double precision

15

Coded complex

J$0&\

CONVERSION RULES
Source Data Class: 0
Target Data Class: 0
Source Field: Must contain display code alpha
numeric characters.
O p e r a t i o n : S o u r c e fi e l d i s m o v e d t o t h e t a r g e t
fi e l d , a n d l e f t - j u s t i fi e d w i t h b l a n k fi l l t o t h e
r i g h t . I f r i g h t - j u s t i fi c a t i o n i s s p e c i fi e d f o r t h e
s o u r c e fi e l d , l e a d i n g b l a n k s a r e s h i f t e d o f f l e f t
c i r c u l a r b e f o r e t h e m o v e . I f r i g h t - j u s t i fi c a t i o n
i s s p e c i fi e d f o r t h e t a r g e t fi e l d , t r a i l i n g b l a n k s
a r e s h i f t e d o ff r i g h t c i r c u l a r a f t e r t h e m o v e .
E r r o r C o n d i t i o n : Tr u n c a t i o n o f a n o n b l a n k c h a r
acter terminates the conversion with diagnostic 432
(660 octal) or 445 (675 octal).

60485200 A

Source Data Class: 0
Target Data Class: 1
Source Field: Same as 0-0.
Operation: Same as 0-0.
Error Condition: Same as 0-0, except that if a
character other than a blank or an alphabetic char
acter is present, conversion is terminated with
diagnostic 432 (660 octal) or 445 (675 octal).
Source Data Class: 0
Target Data Class: 3
Source Field: Must contain display code alphanu
meric characters. Any of the following can be
present:
Optional leading blanks
Option sign (display code + or -)
Optional intervening blanks (one contiguous
s t r i n g o f b l a n k s b e f o r e t h e fi r s t n u m e r i c
character)
Numeric display code characters of which the
last character can be sign overpunch (char
acters <, A through R, orv)
Optional trailing blanks
O p e r a t i o n : S o u r c e fi e l d i s s h i f t e d r i g h t u n t i l t h e
rightmost character is display code numeric. Sign
overpunch is converted to display code numeric.
S o u r c e fi e l d c h a r a c t e r s a r e m o v e d r i g h t - j u s t i fi e d
t o t h e t a r g e t fi e l d . B l a n k s a r e c o n v e r t e d t o d i s
play code zeros. The sign character is not counted
i n t h e t a r g e t fi e l d l e n g t h . I f t h e s o u r c e fi e l d
c o n t a i n s n o n u m e r i c c h a r a c t e r s , t h e t a r g e t fi e l d i s
fi l l e d w i t h d i s p l a y c o d e z e r o s . I f t h e s i g n o v e r p u n c h i s s p e c i fi e d i n t h e t a r g e t p i c t u r e , t h e s i g n
is provided according to the overpunch sign or the
e x p l i c i t s i g n i n t h e s o u r c e fi e l d .
Error Condition: Any departure from the source
fi e l d r u l e s r e s u l t s i n t e r m i n a t i o n o f t h e c o n v e r
sion with diagnostic 432 (660 octal) or 445 (675
o c t a l ) . I f s i g n i fi c a n t d i g i t s a r e l o s t , c o n v e r s i o n
is terminated with diagnostic 432 (660 octal) or
445 (675 octal).
Source Data Class: 1
Target Data Class: 0
Source Field: Must contain display code blanks or
alphabetic characters.
Operation: Same as 0-0.
Error Condition: Same as 0-1.

H-l

Source Data Class: 1

Source Data Class: 3

Target Data Class: 1

Target Data Class: 10

Source Field: Same as 1-0.

Source Field: See 3-X.

Operation: Same as 1-0.

Operation: Display code characters are converted
t o a s c a l e d b i n a r y i n t e g e r. I f t h e s o u r c e i t e m i s
negative, the entire 60-bit word is complemented.

Error Condition: Same as 1-0.
Source Data Class: 3
Target Data Class: X
(Applies to all 3-X conversions.)
Source Field: Must contain display code numeric
characters, except for the sign overpunch if it is
specified in the source item picture description.
Operation: Sign overpunch is
replaced by numeric equivalent.

interpreted and

E r r o r C o n d i t i o n : I f t h e s o u r c e fi e l d c o n t a i n s
illegal characters, conversion terminates with
diagnostic 432 (660 octal) or 445 (675 octal).

Error Condition: If a binary integer of more than
48 bits is generated, conversion terminates with
diagnostic 432 (660 octal) or 445 (675 octal).
Source Data Class: 3
Target Data Class: 13
Source Field: See 3-X.
Operation: Display code characters are converted
t o a b i n a r y i n t e g e r, t h e n t o a n o r m a l i z e d fl o a t i n g
point representation, and complemented if negative.
Error Condition: See 3-X.

Source Data Class: 3

Source Data Class: 3

Target Data Class: 0

Target Data Class: 14

Source Field: See 3-X.

Source Field: See 3-X.

O p e r a t i o n : S o u r c e fi e l d i s m o v e d a n d l e f t - j u s t i fi e d
w i t h b l a n k fi l l t o t h e r i g h t , u n l e s s r i g h t j u s t i fi c a t i o n i s s p e c i fi e d f o r t h e t a r g e t , i n w h i c h
c a s e t h e s o u r c e fi e l d i s m o v e d a n d r i g h t - j u s t i fi e d
w i t h b l a n k fi l l t o t h e l e f t .

Operation: Display code characters are converted
t o a b i n a r y i n t e g e r, t h e n t o a n o r m a l i z e d fl o a t i n g
point representation, complemented if negative, and
s t o r e d i n t h e m o s t s i g n i fi c a n t p a r t . T h e l e a s t
s i g n i fi c a n t p a r t i s s e t t o z e r o .

E r r o r C o n d i t i o n : I f a l l s i g n fi c a n t d i g i t s c a n n o t
b e a c c o m m o d a t e d i n t h e t a r g e t fi e l d , c o n v e r s i o n
terminates with diagnostic 432 (660 octal) or 445
(675 octal). See 3-X also.

Error Condition: See 3-X.

Source Data Class: 3
Target Data Class: 3
Source Field: See 3-X.
Operation: Display code numeric characters are
m o v e d a n d r i g h t - j u s t i fi e d w i t h d i s p l a y c o d e z e r o
fi l l t o t h e l e f t . T h e s i g n o v e r p u n c h i s s u p p l i e d
i n t h e a p p r o p r i a t e p o s i t i o n i f s p e c i fi e d i n t h e
target item picture.
E r r o r C o n d i t i o n : I f a l l s i g n fi c a n t d i g i t s c a n n o t
b e a c c o m m o d a t e d i n t h e t a r g e t fi e l d , c o n v e r s i o n
terminates with diagnostic 432 (660 octal) or 445
(675 octal). See 3-X also.

Source Data Class: 4
Target Data Class: X
(Applies to all 4-X conversions.)
Source Field: Must contain display code numeric
characters, except for the sign overpunch and/or
e x p l i c i t d e c i m a l i f e i t h e r o r b o t h a r e s p e c i fi e d i n
the source item picture description.
Operation: Sign overpunch is interpreted and
replaced by numeric equivalent.
Error Condition: See 3-X.
Source Data Class: 4
Target Data Class: 3
Source Field: See 4-X.

Source Data Class: 3
Target Data Class: 4
Source Field: See 3-X.
Operation: Same as 3-3, except that the explicit
d e c i m a l i s s u p p l i e d i f i t i s s p e c i fi e d i n t h e
t a r g e t p i c t u r e . T h e t a r g e t fi e l d r e c e i v e s d i s p l a y
c o d e z e r o fi l l t o t h e r i g h t o f t h e d e c i m a l p o s i t i o n
before execution of the move operation described in
3-3.

O p e r a t i o n : T h e i n t e g e r p a r t o f t h e s o u r c e fi e l d i s
m o v e d r i g h t - j u s t i fi e d , w i t h d i s p l a y c o d e z e r o fi l l
t o t h e l e f t . R o u n d i n g o c c u r s o n t h e l e a s t s i g n i fi
cant digit according to the value of the fractional
p a r t o f t h e s o u r c e fi e l d . A s i g n o v e r p u n c h i s
s u p p l i e d i f i t i s s p e c i fi e d i n t h e t a r g e t i t e m
picture.
E r r o r C o n d i t i o n : I f a l l s i g n i fi c a n t d i g i t s o f t h e
integer part of the source field cannot be accomo
d a t e d i n t h e t a r g e t fi e l d , ' c o n v e r s i o n t e r m i n a t e s
with diagnostic 432 (660 octal) or 445 (675 octal).

Error Condition: See 3-X and 3-3.

H-2

60485200 A

i*P*V

10

Source Data Class: 4

Source Data Class:

Target Data Class: 4

Target Data Class: X
(Applies to all 10-X conversions.)

Source Field: See 4-X.
Operation: The explicit decimal is removed, moved,
or supplied as required by the source and target
item picture descriptions. Characters are moved
a n d j u s t i fi e d o n t h e d e c i m a l p o s i t i o n , w i t h d i s p l a y
c o d e z e r o fi l l t o t h e l e f t a n d r i g h t . R o u n d i n g , i f
r e q u i r e d , o c c u r s o n t h e l e a s t s i g n i fi c a n t d i g i t . A
s i g n o v e r p u n c h i s s u p p l i e d i f i t i s s p e c i fi e d i n
the target item picture.
E r r o r C o n d i t i o n : I f a l l s i g n i fi c a n t d i g i t s o f t h e
integer part of the source field cannot be accomo
d a t e d i n t h e t a r g e t fi e l d , c o n v e r s i o n t e r m i n a t e s
with diagnostic 432 (660 octal) or 445 (675 octal).

Source Data Class: 4
Target Data Class: 10
Source Field: See 4-X.
Operation: Display code characters are converted
to a binary integer; this binary integer is
rounded, complemented if the source item is nega
tive, and scaled.
Error Condition: If an integer of more than 48
digits is generated, conversion terminates with
diagnostic 432 (660 octal) or 445 (675 octal).

Source Data Class: 4
Target Data Class: 13
Source Field: See 4-X.
Operation: Display code characters are converted
t o a b i n a r y i n t e g e r, t h e n t o a n o r m a l i z e d fl o a t i n g
point representation scaled by the source decimal
positions, and complemented if negative.
Error Condit i o n : N o n e .

Source Data Class: 4
Target Data Class: 14

S o u r c e F i e l d : M u s t b e a 4 8 - b i t b i n a r y i n t e g e r,
r i g h t - j u s t i fi e d i n a f u l l w o r d . T h e h i g h o r d e r
bits are all zero for a positive number or 7777
octal for a negative number.
Operation: If the source value is negative, it is
complemented before conversion.
Source Data Class: 10
Target Data Class: 3
Source Field: See 10-X.
Operation: The coded arithmetic value is converted
to display code numeric characters, which are
s t o r e d i n t h e t a r g e t fi e l d r i g h t - j u s t i fi e d w i t h
d i s p l a y c o d e z e r o fi l l t o t h e l e f t . A s i g n o v e r p u n c h i s s u p p l i e d i f i t i s s p e c i fi e d i n t h e t a r g e t
item picture.
E r r o r C o n d i t i o n : I f a l l s i g n i fi c a n t d i g i t s o f t h e
integer part of the source field cannot be accommo
d a t e d i n t h e t a r g e t fi e l d , c o n v e r s i o n t e r m i n a t e s
with diagnostic 432 (660 octal) or 445 (675 octal).
Source Data Class:

10

Target Data Class: 4
Source Field: See 10-X.
Operation: Same as 10-3, except the coded arithme
t i c v a l u e i s c o n v e r t e d t o a n i n t e g e r and fractional
p a rts a re co n ve rte d to d i sp l a y co d e numeric char
acter strings. The value is stored in the target
fi e l d j u s t i fi e d o n t h e d e c i m a l p o s i t i o n . C D C S
s u p p l i e s a d e c i m a l p o i n t i f s p e c i fi e d i n t h e t a r g e t
item picture and rounding or display code zero fill
in the fractional part as required.
Error Condition: Same as 10-3.
Source Data Class: 10
Target Data Class: 10
Source Field: See 10-X.
O p e r a t i o n : T h e s o u r c e fi e l d i s s c a l e d a n d p a c k e d ,
based on the decimal positions in the source and
target items.
Error Condition: None.

Source Field: See 4-X.
Source Data Class: 10
Operation: Display code characters are converted
to a binary integer scaled by the source decimal
p o s i t i o n , t h e n t o a n o r m a l i z e d fl o a t i n g p o i n t
r e p r e s e n ta ti o n s c a l e d b y t h e s o u r c e d e c i m a l p o s i
tions, complemented if negative, and stored in the
fi r s t w o r d o f t h e t a r g e t . T h e s e c o n d w o r d i s s e t
to zero.
Error Condit i o n : N o n e .

60485200 A

Target Data Class: 13
Source Field: See 10-X.
O p e r a t i o n : T h e s o u r c e fi e l d i s s c a l e d a n d n o r m a l
ized if the source is negative.
Error Condition: None.

H-3

Source Data Class: 10

Source Data Class: 13

Target Data Class: 14

Target Data Class: 10

Source Field: See 10-X.

Source Field: See 13-X.

O p e r a t i o n : T h e s o u r c e fi e l d i s s c a l e d , n o r m a l i z e d ,
complemented if the source is negative, and stored
i n t h e fi r s t w o r d o f t h e t a r g e t . T h e s e c o n d w o r d
is set to zero.

O p e r a t i o n : T h e s o u r c e fi e l d i s u n n o r m a l i z e d ,
scaled according to the target item decimal posi
tion, and complemented if the source is negative.

Error Condition: None.

/^**^\

E r r o r C o n d i t i o n : I f a n y s i g n i fi c a n t d i g i t s a r e
lost, conversion is terminated with diagnostic 432
(660 octal) or 445 (675 octal).

Source Data Class: 10
Target Data Class: 15

Source Data Class: 13

Source Field: See 10-X.

Target Data Class: 13

O p e r a t i o n : T h e s o u r c e fi e l d i s s c a l e d , n o r m a l i z e d ,
complemented if the source is negative, and stored
in the real part. The imaginary part is set to
ze ro .

Source Field: See 13-X.
Operation: No conversion is required.
Error Condition: None.

Error Condition: None.

13

Source Data Class: 13

Source Data Class:

Target Data Class: X
(Applies to all 13-X conversions.)

Target Data Class: 14

Source Field: Must be a full-word normalized
fl o a t i n g p o i n t r e p r e s e n t a t i o n .

Source Field: See 13-X.

Error Condition: Non e .

O p e r a t i o n : T h e s o u r c e fi e l d i s m o v e d t o t h e fi r s t
word of the double precision target. The second
word is supplied with a coefficient of zero and an
e x p o n e n t e q u a l t o t h e e x p o n e n t o f t h e fi r s t w o r d
minus 48. The value is complemented if the source
is negative.

Source Data Class: 13

Error Condition: None.

Operation: If sign bit is set, the source value is
complemented before conversion.

Target Data Class: 3

Source Data Class: 13

Source Field: See 13-X.
Target Data Class: 15
Operation: The coded arithmetic value is converted
display code numeric c h a r a c t e r s , w h i c h a r e s t o r e d
i n t h e t a r g e t fi e l d r i g h t - j u s t i fl e d w i t h d i s p l a y
c o d e z e r o fi l l t o t h e l e f t . A s i g n o v e r p u n c h i s
s u p p l i e d i f i t i s s p e c i fi e d i n t h e t a r g e t i t e m
picture.
Error Condition: Non e .
Source Data Class:

13

Target Data Class: 4
Source Field: See 13-X.
Operation: Same as 13-3, except the coded arithme
tic value is converted to an integer and fractional
parts are converted to display code numeric char
acter strings. The value is stored in the target
fi e l d j u s t i fi e d o n t h e d e c i m a l p o s i t i o n . C D C S
s u p p l i e s a d e c i m a l p o i n t i f s p e c i fi e d i n t h e t a r g e t
item picture and rounding or display code zero fill
in the fractional part as required.

Source Field: See 13-X.
O p e r a t i o n : T h e r e a l p a r t o f t h e t a r g e t fi e l d i s
s e t t o t h e v a l u e o f t h e s o u r c e fi e l d . T h e i m a g i
nary part of the target field is set to zero.
Error Condition: None.
Source Data Class: 14
Target Data Class: X
(Applies to all 14-X conversions.)
Source Field: Must be a two full-word double
p r e c i s i o n fl o a t i n g p o i n t r e p r e s e n t a t i o n . E a c h w o r d
m u s t c o n t a i n a n o r m a l i z e d fl o a t i n g p o i n t v a l u e ,
with the exponent of word 2 equal to the exponent
of word 1 minus 48. Both words are complemented
prior to conversion if the value of the source
fi e l d i s n e g a t i v e .
Error Condition: None apply to 14-X conversions.

Error Condition: None.

H-4

60485200 A

.ir^^K

Source Data Class: 14

Error Condition: None.

Target Data Class: 3

Source Data Class: 15

Source Field: See 14-X.

Target Data Class: 10

Operation: Same as 13-3.

Source Field: Must be two words of normalized
fl o a t i n g p o i n t r e p r e s e n t a t i o n .

Error Condition: None.
Source Data Class: 14
Target Data Class: 4
Source Field: See 14-X.
Operation: Same as 13-4.
Error Condition: None.
Source Data Class: 14

O p e r a t i o n : T h e r e a l p a r t o f t h e s o u r c e fi e l d i s
unnormalized, scaled according to the target item
decimal position, and complemented if the source is
n e g a t i v e . T h e i m a g i n a r y p a r t o f t h e s o u r c e fi e l d
is discarded.
E r r o r C o n d i t i o n : I f a n y s i g n i fi c a n t d i g i t s a r e
lost, conversion is terminated with diagnostic 432
(660 octal) or 445 (675 octal).
Source Data Class: 15

Target Data Class: 10

^•■fS
rl^^V

Source Field: See 14-X.

Target Data Class: 13
Source Field: See 15-10.

Operation:
zero, word
1 Is then
target item
the source

I f w o r d 2 o f t h e s o u r c e fi e l d i s n o t
1 is rounded. The source value in word
unnormalized, scaled according to the
decimal position, and complemented if
is negative.

E r r o r C o n d i t i o n : I f a n y s i g n i fi c a n t d i g i t s a r e
lost, conversion is terminated with diagnostic 432
(660 octal) or 445 (675).
Source Data Class: 14

Operation: No conversion is required for the real
p a r t o f t h e s o u r c e fi e l d . T h e I m a g i n a r y p a r t o f
t h e s o u r c e fi e l d i s d i s c a r d e d .
Error Condition: None.
Source Data Class: 15
Target Data Class: 14
Source Field: See 15-10.

Target Data Class: 13

O p e r a t i o n : I f w o r d 2 o f t h e s o u r c e fi e l d i s n o t
zero, word 1 is rounded. Word 1 is then moved to
the target field and complemented if the source is
negative.

O p e r a t i o n : T h e r e a l p a r t o f t h e s o u r c e fi e l d i s
m o v e d t o t h e fi r s t w o r d o f t h e d o u b l e p r e c i s i o n
target. The second word is supplied with a coeffi
cient of zero and an exponent equal to the exponent
o f t h e fi r s t w o r d m i n u s 4 8 . T h e v a l u e i s c o m p l e
mented if the source is negative. The imaginary
part of the source field is discarded.

Error Condi t i o n : N o n e .

Error Condition: None.

Source Data Class: 14

Source Data Class: 15

Target Data Class: 14

Target Data Class: 15

Source Field: See 14-X.

Source Field: See 15-10.

Operation: No conversion is required.

Operation: No conversion is required.

Error Condi t i o n : N o n e .

Error Condition: None.

Source Field: See 14-X.

Source Data Class: 14
Target Data Class: 15

CONVERSION SEQUENCE NOTES

Source Field: See 14-X.

On a read operation followed by a rewrite operation
involving schema to subschema to schema mapping,
some conversion sequences do not produce conversion
errors but can cause alteration of data in the data
base file. These conversion sequences are noted in |
table H-l.

O p e r a t i o n : T h e r e a l p a r t o f t h e t a r g e t fi e l d i s
s e t t o t h e m o s t s i g n i fi c a n t p a r t o f t h e s o u r c e
fi e l d . T h e i m a g i n a r y p a r t o f t h e t a r g e t fi e l d i s
set to zero.

60485200 E

H-5

TABLE H-l. CONVERSION SEQUENCES
,**"S3v

Conversion Sequence
Data Classes

Conversion Notes

Subschema

Schema

0

3

0

Position of digits and placement of sign is determined by
the picture for the data class 3 item.

4

3

4

The fractional part of the number is lost; the integer
part is rounded.

4

4

4

The fractional part of the number might be rounded.

Schema

13

13

Same as 4-3-4.

13

13

Same as 4-4-4.

3

13

3

13

4

13

4

13

3 )
Final target value has at most 14 significant digits.

< )

14

14)

14
14

10

14

13

::

Double precision is lost.

»J

15

15)

15

H-6

The imaginary part is lost.
15

10

15

13

;:

"J

60485200 A

COLLATING SEQUENCES FOR DATA BASE FILES

T h e c o l l a t i n g s e q u e n c e o f a d a t a b a s e fi l e i s
determined by the area control entry in the schema.
The following collating sequences can be specified:
A S C I I , C O B O L , a n d D I S P L AY. I f n o c o l l a t i n g s e
q u e n c e i s s p e c i fi e d i n t h e s c h e m a a r e a c o n t r o l
entry, the COBOL collating sequence is the default
f o r t h e fi l e .
T h e c o l l a t i n g s e q u e n c e s p e c i fi e d f o r a fi l e a ff e c t s
the following:
The order in which items are returned when a
fi l e i s a c c e s s e d s e q u e n t i a l l y.

The order in which items are returned by alter
n a t e k e y r e t r i e v a l f o r a l l fi l e o r g a n i z a t i o n s
if duplicate alternate keys are allowed.
The order in which items are returned by pri
mary key (or the major portion of a primary
k e y ) f o r fi l e s t h a t h a v e i n d e x e d s e q u e n t i a l
fi l e o r g a n i z a t i o n .
The collating sequence of a Query Update catalog
file must be the DISPLAY collating sequence.
Collating sequences are shown in table L-l.

j R l fi h r f \

/fS^N

60485200 A

1-1

TABLE 1-1. DATA BASE COLLATING SEQUENCE
COBOL

ASCII

Collating Sequence
Decimal

Octal

Graphics

00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

00
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57
60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77

blank

$^

%t

:t

_^s

D i sp l a y
Code

Graphics

55
66
64
60
53

blank

67
70
51
52
47
45
56
46
57
50
33
34
35
36
37
40
41
42
43
44

/\

631

%t
-*>

-1

i*

oot
77
72
54
73
71
74
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
61
75
62
76
65

s/

:t

DISPLAY
D i sp l a y
Code

55
74
63t
61
65
60
67
70
71
73
75
76
57
52
77
45
53
47
46
50
56
51
54
64
72
01
02
03
04
05
06
07
10
11
66
12
13
14
15
16
17
20
21
22
62
23
24
25
26
27
30
31
32

oot
33
34
35
36
37
40
41
42
43
44

Graphics

:t

1,

E=

blank

%t
-»
\s

/\

- 1

D i sp l ay
Code

oot
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57
60
61
62

631

64
65
66
67
70
71
72
73
74
75
76
77

Ti n I n s t a l l a t i o n s u s i n j » a 63-graphic sset, the % graphic does not e:t L s t . T h e : g i-aphic is displ fH ON -H CO /-n
I «H ON rH >W C CO CO
CO IH CO t-l TJ tH O X!

H
3
U CO

J3CUX

CU u

tH

O
C

O CO

m B
2
oi
3 X

o* o
C
O
in

2
H
pf*

o

fc

<

O

ti

CO

si

tH

ta

xaj4JojrH
-H

P.

CO

WfH

<—\-/^
 C CO
rl

-H

S 01

a;

9

H

CO

I

3

CJ
-H

••>
ON

CO
I
iH ON -H
r-l HH B

co
M
,
id
X 91 X O 0)

CJ CO

h fl - r i
cj 'H

CO
CO

o
TJ

<-N
CO

X

p. g ^ 4-i X cu 4-> o> m

M rH
fc U

H 3 < : O C 0 ' H a c 0 C 0 f H
fi C ^ C K l E B U S l "

as
w

J-l

c

91
OJ
X 91
CJ P. Ql
C O t > N ta
r O H cO

<
^^!
CO CJ

,e *H
a 4->

3.8

l-l

B cu

cu 4J
CJ

CJ

CO CO

CU OT C M U
6
TJ
O P. CO
3 O N c 3 M CU 4=
Z

^

CO

4J

u

o

/-s
CU
C

tH

OT

S

l-i

M

O

O

P

C
u
Vi
tj
O
C
0)
O C *H 1 OJ ta
ti cO ta oi S cj
U U U 91 CO
91 tn 91 U rl
e co TJ co co
9 ON C C rH J=
;s v^ >h co p. cj

O

fc

Tj
C

•n > G tt

S cu
CU 4-1
CJ CJ

U
-H
CO cO
01 OT C M M
E
*0
O P. CO
S ON C -H O J X
Z -^ ro 4-i r l C J

CJ

+-cu

fx c
<

CJ
«H

H rH
fc CJ

O

▶J
fc c
CA rH
M
O

O
w

COM
.C CU
&S^*J
M 3 <*
< e > ~

CJ CO

CO
'"fH
ON
ON
M
IH

«
X

I
-H
C

a «-•
/-"»
CO
f>
CO
CO

U-OH
O
X
o oj cj m tj
K
cj
u
tin
O 01 H a (0 CQiH
' e « ! B c o c j 3 c o

•f—,
0)

0) u

<

X

Ql
t l
O tl
U *H

tj "H
O I-i

CO CO

C 4J

CJ 91

»s

U G

9) 01
4-1 CO

4-1

>> cu

CO C
fH CO

G 9)
ft u
P.
0)

CO X
rH CO
O-fC
CO P-

Cl X
CO

P.

o ^

p3

<

4J /-^
B CO

<-» ^ 2 c

OJ u
E
91
91 ta

rl

CO CO

r

•H > C CO O c j
*H

O "ecj

■SwCO4J

rJ

0J

tx

G

5

a>

>H

§

4—

CJ

<
fe3
OT
M
P

O
> O
E ri
O O
O ^

1 x
fc W
O z

fc fc

SS
r,
M O O

a cj w

O

y ^>

rl <-N
01 OT

Ion
Z w

r l

r l

CU OT

OJ OT

Son

3 on
Z'-"

Z N-X

a)
0) G G *a

•a
o
o

CO -HO
O
CO
cj:
ri
•> 60 U CO B
fr, O «H C rC O
CO -H CO 3 O "H
MM
P.
4J
P. OJ 0) H 4J -H
CO S > OJ CO CO
•H 3 CO > CO O

o

CJ .
M
>

•H

•H

c

x

o

m

a

M

—
/\
fc

/~
\
fc

0)
■O
O
CJ

00
•H
C O C J •H
P h 01
M O TJ C
O
P4J 4-1

CO G

>> CJ -H -H
CO >H CJ O M -H
M U M M O ta
P. 0J r, rH
•H
C O E P. P.

• h 3 s X ro o
Q C M 0 ) E P.

r l

C
U
00
C
U
4-1

•H
> N

Im
CO

•H
PQ

CJ

tn

CO
|
CJ
'"rH
ON
-H
CO
|
-H
ON
M
t,
G
CO
CO
Vi
,
1)
li-OH
O

E5 CO

CO

co w a>
ta eo G
cO -H S
P U S

CO

CO
CO

0)

5Z

55

*-\
CO
X

>i
CJ
CO 1 *H
rH CO I-i
Q. X 9)
tn ex. e
•H
tH
Q CO

3
C

c

1

^

CO

O

•sP. •H
4-*

5! 5
>

cO 1
rH CO CJ
P. X «H

CO P. 4-1
•H r-l CU
O CO ^3

.

ta cO O
CO fH Z
O CJ

▶ J-2

CJ
G

CU

c

fci-H

-H

V - - 4-1 60 >H

op
rl f-N

x: co

4J f-H

<^N

£ 01 X O Cl y H -O
^* @ ^. *"-• X 0J *-> CU M
r-l
9 < * O C 0 - H P. c 0 C 0 M
< B * ~ ' C « J * E C 0 U 3 c 0

CJ CO
IH rH
Pi CJ

O 00
U HI
X 4J
M B

B W
60 rl • H >
91 OJ
4J X OJ rl
C » X oj co

01 91 91

«
.

S OJ

i,S

CM

1 1

u u

B
s

w
rr

_

Ol OT B M U
B
TJ
O P. a)
3 ON B M 0) X
U CJ

tH

£3CJ

l

fc CU TJ

M

a*
Ou 9
Id CO

u cj

F
o o
Z O O

f-l

o

o

4J

•J

UH

—
/ .•

s-^

CO O
J2 *H
Pl. ta
rH 9)

c
• H
fH 4J

CO

H i J P Q

/^
0)

>
•.

I

*g

3 ON B -H
Z<—

01 4-1
CJ CJ
CO CO
M
l-l
P. CO
OJ jz

Cd < <5

CJ

OT l-i

S OJ
S CO
fH 9

s

B

^,^3

H

cu
>* G
<
o
Em p
H
O

OT

B cu

>^^\

w

CJ

P O

01

4-1 /-s
C CO
Ql U

4J

01
Cd co
cj 9
< CO
OT H

** ~ "H -

g o o
Sz
q
CJ M ri

v

CU
CO

CU rl

1 X CJ
fc W M

r l

CJ

B co
fc 0) TJ
O
W
C
•H > B CO

cd

H
CJ

T
O

4J *~s
r l

r«

rCml Oh g

Pj
S fH
O O
U v

M
O
O
r-l

C (0
r l

/ - N

rH

W
H
Z
M

4-> /-\

CO
M

4J

CO

CO

ca

^

C

Pi rJ
W <

M

Sc g

Ph
S U
O O
O v-'

/-O^J

> :j oc
<
▶J
c
a,

/"N

a
c

^

(U

G

N
-•

CO
O
C

3

e

9

91

^OJ

O 3
< CO
OT rH
O O

<

0

O

< C > ^ C < B c o c j 3 c O

O
J
W ca

O
J

CO

cu

l-l iH

3 O •a
tn
tn
Ql CJ
•u Q co
CO cj CO
TJ
u
c
a c
>n CO

§

^/>

<

O
C
3 c j P3
O* CO

O -H

fl

•-s
t«

OJ

S > B O
J

u 8
N rl
CO 9)

rH 00
P. 0)

■HH
CJ

r l
0) fc /-s
N-^>

>
C
O

rH TJ

•H C
D M

P. 0J
CO x
•H ^H
O >H

PI

-*

CO 4J

O
J

S ON
Z

r l

>N Q)

TJ U 00
CU CO OJ
TJ

B

4J

O -H C
CJ X tH

60485200 E

/*5^v

O
C
1 4J OJ
.a
oj
tj
3
Q
O

OT

g

«K

n

0)
Id CO
CJ 3
«JJ CO
CO M
P CJ

CO

2 OJ

M 91 CO
OJ X CO
3 U 03

P

H

4J /-->

4J /-n

co

C co

B

M
91
U
Pi 9) tl 0 91
CJ CO C CU 4-1
•H > B CO CJ O
l-i
-H
CO
CO
OJ
OT
CMM
E
Tj
o
P<
CO

CO

3

CJ CO
M
M
fc CJ

cr tn

fc CU TJ

cj

S on c *h oj x;

O
J
Id CO

CO
1

4-1

tt

9 O
OT

CM

CJ 3

91

tj
o

cf

< CO
OT M

OT £
CU O
up
u

P CJ

>N CO
M E CU

2 0)

91

H

91

3 X CO
O" CJ P3
O
C

iKr"**\

u-l CO
E
Z CU

3^*

CU 4-1

3

CJ CO
M
rH
fc CJ

G

4J /-^
C CO
CU M

fc OJ
CJ
CO
•H
>
C
M
-W
CU OT

t j b fl )

3 ON B
Z *^ CO

•h oj x:

C
0J
u
CO CJ u
CO CO
E
M
U
O P. C O
4J

M

CJ

c▶
f•Js
(d

CJ

4J
1
C
M
OJ
OJ TJ E
C J C O B fl )
•H > B CO CJ
U
M
CO
01
OT
B
M

tj

o

P.

/->
CO
M
OJ
4J
CJ
CO
M

4J /-\
B CO
0) M
fc 01
CJ
CO
•H > B
M
Ti
Ql
VX
E
*VJ
9 ON B
Z *-- CO

cO

3 ON B M 91 X
Z w Q 4J l-l CJ

TJ
6
CO
B
O
*H
4J

4-1 /--\
E CO
CU Im
01 TJ E 0J
CJ
CO B 0) 4-1
•H
>
B CO o o
M
M
CO CO
CU OT
C M t-i
E
T J O P. C O
S ON B t,
Ql
X
Z n-^ co 4-1 In u

B cu

fc

Ol 4-1
O
O
CO rt
M
M
P. ( 0
Ol X
M
O

CO

CO

E

4-1

CO

B

•H

CU

O S C J P . CU
H C O > > 4-1
OS XI H
CO
4-1
O 3

cf OT

E 0)

r J
CQ

fc

O CO

CO

B

M

CJ

CO CJ CO
TJ
CU
P- B O
D-H
U

<

co

01

• H > B C O CJ CJ
M
-H
CO CO
CU
OT
B M
M
E
TJ
O P. CO
9 ON B M 0J X
ZvS
4J U> U

Z n-' CO 4-1 M CJ

X

r J

CJ

1

<

r>. b oj

cf

PQ

CJ

4-> CJ CO
CO
OJ
TJ B U
P. M
CJ

p

id

▶
J
Id

CN

cf

td
hJ
PQ
p
Q
Q

, &3

r-J r4
<
O
UJ O
OS PQ

T
O

O

E
X

CJ

MH

•*

cj

CM

9

CO

cf

<* CO
OT M
P CJ

O
J

4J

TJ
B
CO
01
Cd CO
CO

c▶
fJ

OT
M
CJ
(d
03
CU

4—
^

H—

co

OJ

1

H
■4-1

CJ

CO

CJ
CU
CO

•"N

XI

O
T3

S cu

r-l

P

O

u
•H

CO

O
CJ

>

4-1

B

+01

4J

H
■B

B cu
rl

P.

9<

T J P.
01
/-»
N 60 CO
•> -H B TJ
TJ M M M
0) CO 4J O

•H

•H O M CM
OT C »M w

C E CO 5
OO C O

to

O

M

rl

e^v

7 i S
H
<
O

£3

M
4J
rH
X
0) 01 B CCJ 60
00
M
M
>
9
CU
41
r-l
o
ta
X
91
U
M
/-*

m b S x s o j c o X o -

CJ

4J 4J
B
M
> n to
•H CO ti t a
O P. C O

B

•H

TJ
P.
CU
N OO'-n
« *H B TJ
TJ lH Ti M
91 « 4J O

cu

td co
fc 3

2
w

+0J

3 on
Z N-*

O
■H
M 4J
CO <0
B 4J
In C
CU OJ
4J CO
M

• H
CU OT

O CO
M
M
fc CJ

PQ

fc

[x. H V-- 4J 60 -H 4J f-f

P-

OOrt
60
B 9 1 C O CM

• H
CO
91

• H M B
4J

-H

co x

&gg 3

1
01
M
4J
01 01 6
H 60 M *H
< CU 01
Q 4J Xi 0)

B

O 4-1 TJ
M
tH
B

fc » co

CJ
TJ
• H
M
CO

X

CO

M

P.

>

91
9
rH
>

4-1
M
CO

td

60

in
—1
M

9
o

r M

*-»

3 C » X ! cu co X on
fi , - H v 4 J 6 0 f H J - l C M

s•>..

4-1
CJ
CO

PC
CJ

T
O

2 cu
->

CO

Pf 3
CJ co

OJ

M
rH
fc CJ

cu

OJ

z

z

CO

60
C

CO

co co cu
ta tt 0
rH

rt

o o z

1

•H
M
TJ 4J 4J CO

OJ rt B E "9

TJ
O
CJ

O M G OJ
M
O
O
N
« 4 H P. B t .

OJ

B

•O
M
O
0J X» 1 tH
tj 9 9) CO
O
O
M
M
C J T J P. C J

OJ
•O
M
01 PTJ
B
O
O
CJ CJ

 •

4-1 CO O
CO M Z
O CJ

60485200 E

CO

f - 4

,z
+- ++-

J-31

0 ^

INDEX

Absolute user program 1—11
Access control
CDCS privacy checking 10-1

D e fi n i t i o n C - l
Description 1-6
Key C-l
Lock
D e fi n i t i o n C - l
Description 1-6
E x a m p l e s 11 - 1
Ve r s i o n s 6 - 4 . 1
ACCESS-CONTROL clause 2-10
Actual item C-l
A c t u a l k e y fi l e o r g a n i z a t i o n
D e fi n i t i o n C - l
Description 1-7, 6-1
Specifying for area 2-31
ACTUAL RESULT clause
Format 2-16
Restrictions 6-3, 7-5
AD clause 3-12
Add schema entry 8-8, 8-9
Add subschema subentry 8-8, 8-15
Add version subentry 8-15
Advanced Access Methods (AAM) (see also CYBER
Record Manager)
D e fi n i t i o n C - l
Function 1-7
General 6-1
Utilities 1-10
After-image C-l (see Log record)
AFTER IMAGE RECORDS option 8-7
AFTER option 7-5
Alias C-l
A l i a s D i v i s i o n 3 - 11
ALIAS statement 4-1, 4-9
ALLOCATE clause 9-6
Alphabetic data items
COBOL subschema 3-16
Query Update subschema 3-24
Alphanumeric
Data items
COBOL subschema 3-17
Query Update subschema 3-25
D e fi n i t i o n C - l
Alternate key (see Keys)
D e fi n i t i o n C - l
Schema 2-23
Use 4-2, 7-2
Alternate version subentry 8-7
Application
Language 1-4
Program (see also COBOL, FORTRAN, or
Query Update)
D e fi n i t i o n C - l
E n v i r o n m e n t 1 - 11
Restart 9-3
Tr a n s a c t i o n o p e r a t i o n s 9 - 3
Area (see also Files)
Collating sequence 2-23
D e fi n i t i o n C - l
Description 2-8
FILE control statement 2-31
Multiple records 2-24
Naming conventions 2-6, 2-9
Organization 2-1

60485200 E

Area (Contd)
Record length restrictions 2-17
Special attributes 2-21
Va r i a b l e l e n g t h r e c o r d s 2 - 1 6
Area control entry
Elements 2-8
Format 2-21
Area description entry
Format 2-9
Function 2-1, 2-8
AREA NAME clause
Master directory 8-6
Schema area control entry 2-21
Schema area description entry 2-8
AREA SAME AS MASTER clause (alternate
version subentry) 8-7
Area subentry 8-b, 8-8
Array 4-2, C-l, K-l
Attach C-l
Automatic
Journal log maintenance 9-4
Recovery
Conditions 1-9
D e fi n i t i o n C - l
Description 1-9, 9-1, 9-2
Requirements summary 9-5
Backup dump 9-24, C-l
Basic Access Methods (BAM) b-1, C-l
B a t c h Te s t F a c i l i t y 1 - 11 , C - l
Before-image C-l (see Log record)
BEFORE IMAGE BLOCKS option 8-4.1, 8-7
BEFORE IMAGE RECORDS option 8-4, 8-7
BEFORE option 7-5
Beginning-of-information (BOI) C-l
Blank lines 4-8
Blanks 4-8
Block C-l
Branch situation 6-5
CALL clause
Area description entry 2-9
Data
base
procedures
7-1,
7-5
Record
description
entry
2 - 11
Capsules (see Encapsulation and Fast Dynamic Loader)
C a s c a d e e ff e c t 9 - 2 7 , C - 2
Catalog file (see Query Update)
CDCS
Accounting statistics 10-8
B a t c h Te s t F a c i l i t y 1 - 11 , C - l
Compatibility of CDCS 2.2 and 2.3 8-1
Control statement 10-4
D e fi n i t i o n C - 2
Description 1-1
D i r e c t i v e fi l e 1 0 - 4
Error
processing
10-8.1
Execution 1-12
Field length requirements (see Field length)
Initialization 10-8.2
Loading
1 - 11 ,
10-5,
10-8.1
Mapping 5-1
P r o c e s s i n g 1 - 11 , 1 0 - 1 0
System limits 10-1
S y s t e m p r o c e d u r e fi l e 1 0 - 1 4

Index-i

■
1

|

|

CDCS (Contd)
Te r m i n a t i o n 1 0 - 1 6
CHANGE AREA clause 8-14
Change area subentry 8-13
Change job control information subentry 8-12
Change journal log file subentry 8-12
Change procedure library subentry 8-10
Change quick recovery file subentry 8-12
C h a n g e r e s t a r t i d e n t i fi e r fi l e s u b e n t r y 8 - 11
Change transaction recovery file subentry 8-10
Character data
Conversion 2-4
Default length (FORTRAN 5) 4-11
General 4-3
Grouping in record 4-1
S c h e m a p i c t u r e s p e c i fi c a t i o n 2 - 1 3
Schema type specification 2-15
Character sets
COBOL/Query Update subschema 3-10
FORTRAN subschema 4-6
General information A-l
Schema 2-7
CHARGE/ACCOUNT clause 8-5
CHECK clause
Affects FORTRAN subschema 4-3, 4-4
Controlling data item 2-3, 2-16
Data base procedure 7-1
Description 2-18
Checksums
COBOL/Query Update subschema 3-38
D e fi n i t i o n C - 2
FORTRAN subschema 4-19
Master directory 8-18
Schema 2-32
Child record occurence 6-8, C-2
Clauses (see Schema, COBOL/Query Update subschema,
FORTRAN subschema, or
Master directory)
Close log record (see Log record)
COBOL
Applications programs
Data base environment 1-4, 1-11
L o g fi l e r e p o r t g e n e r a t i o n 9 - 2 4
Subschema 1-1, 2-1 (see also COBOL/
Query Update subschema)
COBOL Subschema
Clauses
AD 3-12
JUSTIFIED 3-13
OCCURS 3-14
PICTURE 3-15
RD 3-12
REDEFINES 3-17, F-2
RENAMES 3-19
RESTRICT 3-30
RN 3-30
S S 3 - 11
SYNCHRONIZED 3-18
USAGE 3-18
VA L U E 3 - 2 0
Coding 3-10
Compilation 3-32, 3-34
Directory 3-32
Divisions 3-1
E x a m p l e 11 - 1 , 11 - 5
Language elements 3-9
Library
D e fi n i t i o n 3 - 3 2
Maintenance operations 3-34
Reserved words D-l
Syntax summary E-4
Coding
COBOL/Query Update subschema 3-10
FORTRAN subschema 4-5, K-l

Index-2

Coding (Contd)
J-l
Master directory
Schema 2-8
Collating sequences
6-13
Affects processing
For character sets
A-l, F-2
1-1
For data base files
2-23
Specified for area
Column usage in FORTRAN DDL statements 4-7
Conunent lines
COBOL/Query Update subschema 3-11
FORTRAN Subschema 4-7
Common blocks
Listing G-l
Sequence generated 4-2
Common Memory Manager (CMM) 1-11
Compaction 4-17
COMPASS 7-2
Compilation output listings 4-18
Compression 7-1, C-2
COMPRESSION clause 2-22
COMPUTATIONAL items
COBOL subschema 3-19
Query Update subschema J-29
Concatenated keys
COBOL/Query Update subschema 3-8
FORTRAN subschema 4-2, 4-3, 4-6
Major key processing b-3
Schema 2-23
Concurrency C-2
Condensed schema/sub-schema table (see CST)
Constant 4-6, C-2
Constraint
CDCS processing
6-15
Cycle 6-15
D e fi n i n g 6 --13
C-2
D e fi n i t i o n
Description
1-7, b-13
Entry
6-13, 11-1
Example
2-24
Format
Function
2-1, 2-8
Error processing 6-16
CONSTRAINT NAME clause 2-26
C o n t i n u a t i o n l i n e s 3 - 11 , 4 - 8
Control break C-2 (see Relation)
Control statements
CDCS 10-4
DDLF 4-13
DDL3 (COBOL/Query Update subschema) 3-32
DDL3 (schema) 2-29
DBMSTRD 8-16
9-10
DBQRFA
9-10
DBQRFI
DBRCN
9-12
DBREC
9-7
DBRST
9-14
2-31
FILE
C-2
Control word
Conversion
D e fi n i t i o n C - 2
Rules 4-3, 5-1, H-l
Sequence notes H-5
Creation entry 8-3, 8-9
CST 8-18, C-2
CYBER Record Manager (CRM) (see also Advanced
Access Methods and
Basic Access Methods)
D e fi n i t i o n C - 2
CDCS interface 6-1
C l a s s i fi c a t i o n o f e r r o r s 1 0 - 8 . 1
E r r o r fi l e u s e 1 0 - 8 . 2
Function 1-1
Record types b-1, F-l

60485200 E

***®"v

CYBER Record Manager (CRM) (Contd)
Utilities (see Utilities)
Cycling command 10-16
Data administrator
Application programming interface 10-3
D e fi n i t i o n 1 - 1 , C - 2
Responsibilities 10-1
Role in automatic recovery 9-4
Sequence to establish data base 10-2
Data base
Backup copy 9-24
D e fi n i t i o n 1 - 1 , C - 2
Environment 1-12
Privacy features 1-6, 10-1
Procedures
Access control 7-1
CDCS functions 7-1
COBOL 7-8
COMPASS 7-8
DDL description 7-1
D e fi n i t i o n C - 2
Description 1-7, 7-1
Entry codes 7-3
Establishing data values 2-16
FORTRAN 7-8
Identifying record type 2-12, 2-24
Input/output functions 7-5
Linkage and communication 7-2
List 2-32
Loading 7-2
Naming conventions 2-6
Nonstandard conversions 2-19
Parameter list 7-2
Privacy (see Data base procedures,
Access control)
Procedure library 7-7, 8-4
Processing 7-2
Restrictions 7-2
Return codes 7-3, 7-7
Sample procedure 7-8
Ti m e o f e n t r a n c e o p t i o n s 7 - 3
Ti m e o f e x e c u t i o n 7 - 3
Use 1-7, 7-1
User function related
Area open/close 2-8
Data item manipulation 2-19
R e c o r d m a n i p u l a t i o n 2 - 11
Writing 7-2
Processing 1-4
R e c o n s t r u c t i o n 9 - 11
Restoration 9-14
Status block
Data base procedures 7-5
D e fi n i t i o n C - 2
Transaction
D e fi n i t i o n C - 2
Description 1-9, 9-3
Utilities (see Manual recovery utilities)
Version (see Version)
Data class
Categories 2-3
Description 5-1, H-l
Null values 5-4

Picture specification 2-12

J*J$!p!BV

Representation
Correspondence with Query Update-CRM
subschema J-l
General CDCS discussion 5-1, J-l
In COBOL/Query update subschema 3-4
Ty p e s p e c i fi c a t i o n 2 - 1 4
Valid conversions
Schema to COBOL/Query Update
subschema 3-4
60485200 E

Data control entry
Format 2-21
Function 2-1, 2-8
Subordinate entries 2-21
Data conversion (see Conversion)
D e fi n i t i o n 2 - 4

Error processing 2-5
Nonstandard 2-5, 2-19
Restrictions 2-4
D a t a d e fi n i t i o n s u m m a r y J - l
Data description entry
Clause combinations 2-1
COBOL/Query Update subschema
Format 3-13, 3-23
Function 3-1
Level 66 3-19, 3-30
Level 88 3-20
Elements 2-8
Format 2-12
FORTRAN subschema 4-1
Data Description Language (see DDL and FORTRAN DDL
Data Integrity C-2 (see also Data validation)
Data item (see also Item)
Alphabetic
COBOL subschema 3-16
Query Update subschema 3-24
Alphanumeric
COBOL subschema 3-27
Query Update subschema 3-25
Character (see Character data)
Conversion 5-1
D e fi n i t i o n C - 2
Embedded key 6-3
Names 4-6, C-2
Numeric
COBOL subschema 3-16
FORTRAN subschema 4-2, 4-11
Query Update subschema 3-24
Schema 2-13, 2-14
USAGE clause
COBOL subschema 3-18
Query Update subschema 3-28
Data Manipulation Language C-3 (see also
FORTRAN DML)
Data name C-3
Data size 3-3
Designation 2-3
P i c t u r e s p e c i fi c a t i o n 2 - 1 2
T y p e s p e c i fi c a t i o n 2 - 1 4
Data type and size 4-2
Data validation 1-6, 7-1
DBMSTRD control statement 8-16
DBMSTRD utility (see also Master directory)
Description 8-1
Execution 8-16
Reserved words D-3
DBQRFA utility
Description 9-9
Diagnostics B-52
DBQRFI utility
Description 9-10
Diagnostics B-52
DBRCN utility
D e s c r i p t i o n 9 - 11
Diagnostics B-54
Reserved words D-3
Syntax summary E-13
DBREC utility
Description 9-6
Diagnostics B-58
E x a m p l e 11 - 11
Reserved words D-3
Syntax summary E-13
DBRST utility
Description 9-14
Index-3 |

DBREC utility (Contd)
Diagnostics B-54
Reserved words D-3
Syntax summary E-13
DB$RPT 9-25
DDL
I Character set 2-7, 3-10, 4-8
D e fi n i t i o n C - 2
Diagnostics (see Diagnostics)
Programming conventions
COBOL/Query Update subschema 3-8
FORTRAN subschema 4-5
Schema 2-5
Record type 6-2, 7-5
Reserved words D-l
I DDLF control statement 4-14
DDL3 control statement
COBOL/Query Update subschema 3-32
Exhibit facility 2-36
Schema compilation 2-30
Deadlock 1-6, C-3
DECODING clause 2-19, 7-1, 7-5
Decompression 7-1, C-3
DECOMPRESSION clause 2-22
D e fi n i t i o n o f d a t a i t e m s 4 - 2
Delete schema entry 8-9
DELETE statement 7-6
Delete subschema subentry 8-8, 8-15
Delete version subentry 8-15
Dependent record occurrence 6-13, C-3
DEPENDS ON clause 2-27
DEVICE TYPE clause 8-2
Diagnostics
CDCS B-l
DBMSTRD B-29
DBQRFA B-52
DBQRFI B-52
DBRCN B-54
DBREC B-58
DBRST B-54
DDLF B-94
DDL3
COBOL/Query Update subschema B-82
Schema B-63
EXHIBIT B-63
D i r e c t a c c e s s fi l e o r g a n i z a t i o n
D e fi n i t i o n C - 3
Description 1-9, 6-1
Specifying 2-31
Directed relationship 6-6, C-3
D i r e c t i v e fi l e 1 0 - 4
Directory C-3
DISPLAY items
COBOL subschema 3-19
Query Update subschema 3-29
DMS-170 1-1, J-l
Dominant record occurrence 6-13, C-3
DOWN command 10-11
DROP command 10-17
DUMP clause 9-6
Duplicate keys 6-2
| Duration Loading 10-8.1, C-3
Elementary item
COBOL/Query Update subschema
D e fi n i t i o n 3 - 2
Ve c t o r s 3 - 6
D e fi n i t i o n C - 3
FORTRAN subschema 4-2, 4-3
Schema 2-2
Encapsulation 7-7
ENCODING clause 2-19, 7-1, 7-5
END clause 8-10

End-of-information (EOI) C-3
END statement 4-12
Error processing
C l a s s i fi c a t i o n o f C R M e r r o r s 1 0 - 8 . 1
Data base procedures 7-5
Error status (see Files)
Examples
COBOL data base procedure 7-9
COBOL subschema H-l, H-5
Concatenated key 6-3
DBREC allocation run 11-10
DBREC dump run 9-10
DBRST utility run 9-16
D e fi n i n g v e r s i o n s 6 - 5
FORTRAN 5 subschema 11-6
K e y d e fi n i t i o n 6 - 2
M a s t e r d i r e c t o r y c r e a t i o n 11 - 9
M a s t e r d i r e c t o r y m o d i fi c a t i o n 11 - 1 0
Query Update subschema 11-8
EXHIBIT facility 2-36
Extended actual key file organization
Description 1-9, 6-1
Selection 2-31
Extended direct access file organization
Description 1-9, 6-1
Selection 2-31
Extended indexed sequential file organization
Description 1-8, b-1
Selection 2-31

■*«5\

FAMILY NAME clause 8-2, 8-5
Fast Dynamic Loader (FDL) 1-11, 7-2, 7-7
Field length
Loading CRM capsules 10-7, 10-8.1
Requirements for CDCS G-l
CDCS G-l
Data base utilities G-l
Schema generation G-l
Subschema generation G-l
RETAIN command 10-13
Specifying CDCS field length 10-5
Figurative constant
COBOL/Query Update subschema 3-22
D e fi n i t i o n C - 3
File
Data base area
Concept description 1-1

CRM file information table 6-2
D e fi n i t i o n C - l , C - 3 , C - 6

Error status 10-14
Operator commands 10-11
Organizations 1-7, 2-31, 6-1
Positioning (see Relation)
Realm definition (FORTRAN Subschema) 4-1
FILE control statement
Description 2-31
Record key parameters 2-22
Relation to area 2-9
Supplements data control entry 2-21
Use by CDCS 6-2
FILE NAME clause (modify schema entry) 8-9
FILE NAME clause (schema subentry) 8-4
FILE NAME clause (subschema subentry) 8-8
Information table 6-1
Fixed occurrence data item
COBOL/Query Update subschema 3-7
D e fi n i t i o n C - 3
Description 2-3
FORTRAN subschema 4-2
S p e c i fi c a t i o n 2 - 1 6
Fixed point
Data items 2-13
Literals 2-6
,/i-^\

Index-4

60485200 E

/1#^\

Floating point literal C-4
Flushing C-4 (see Force writing)
Force writing 9-25
FORM
D e fi n i t i o n 1 - 1 0 , C - 4
L o g fi l e r e p o r t g e n e r a t i o n 9 - 2 4
FORTRAN DDL
Character set 4-8
DDLF control statement 4-14
D e fi n i t i o n 1 - 1 , C - 2
Diagnostics B-94
Programming conventions 4-6
FORTRAN DML
A p p l i c a t i o n s p r o g r a m s 1 - 4 , 1 - 11
Arrays generated 4-5
Character set 4-8
D e fi n i t i o n C - 4
Description 1-1
Va r i a b l e s g e n e r a t e d 4 - 5
FORTRAN subschema (see also FORTRAN DDL)
Compilation 4-13
Concatenated key 4-2, 4-3, 4-6
Correspondence to schema 4-2
D e fi n i t i o n C - 7
Description 1-3, 4-1
Directory 4-1, 4-13
E x a m p l e 11 - 6
Field length requirements G-l
Keywords D-3
Library 4-13, 4-14, 4-15
Organization 4-1
Programming conventions 4-5
Statements
ALIAS 4-9
END 4-13
REALM 4-10
RECORD 4-10
RELATION 4-12
RESTRICT 4-12
SUBSCHEMA 4-9
Ty p e 4 - 11
Syntax summary E-7
Group items
COBOL/Query update subschema
Description 3-2
Nesting 3-2
Nonrepeating 3-8
Repeating 3-7
FORTRAN 4-2
Schema 2-2
Guidelines
Constraint processing 6-16
C r e a t i n g fi l e s w i t h c o n s t r a i n t s 6 - 1 6
Data base procedures 7-1
Future software 1-1, F-l
Recompilation 4-19, 8-18
System operator 10-8.2
Hierarchical tree structure
Home block C-4

6-6, C-4

I d e n t i fi e r
3-9
COBOL/Query Update subschema
D e fi n i t i o n C - 4
Relation 6-9
Schema 2-7
IDLE command 10-12
Immediate return feature 1-6
INDEX clause (change area subentry)
8-15
INDEX FILE clause (area subentry)
8-7

60485200 E

INDEX items
COBOL subschema 3-19
Query update subschema 3-29
I n d e x e d s e q u e n t i a l fi l e o r g a n i z a t i o n
D e fi n i t i o n C - 4
Description 1-8, 6-1
Specifying 2-31
Initialization (see CDCS)
CDCS (see CDCS)
DBREC 9-6
Insertion characters 3-25
I n t e r r e l a t e d fi l e s C - 4
I n v o c a t i o n 1 - 11 , 1 0 - 11 , C - 4
Invoke log record (see Log record)
Item (see also Data item)
Actual 7-1, C-l
Data 5-1, C-2
Elementary 5-1, C-3
Embedded key 6-3
Fixed occurrence C-3
Group 5-1, C-4
Name C-4
Nested group 6-3, C-4
Nonrepeating group C-5
Result C-7
Va r i a b l e o c c u r r e n c e C - 9
Virtual 7-1, C-9
JOB CONTROL INFORMATION clause 8-5
Job structures 3-34
JOIN clause 2-22
Join terms 6-5, C-4
J o i n i n g fi l e s ( s e e R e l a t i o n )
J o u r n a l l o g fi l e
Automatic maintenance 9-4
Automatic recovery 9-5
D e fi n i t i o n C - 4
Description 9-15
Dump 9-6, 9-8.1
Initialization 9-6, 9-8.1, 9-17
Log record (see Log record)
Logging options 9-25
M a g n e t i c t a p e fi l e 9 - 1 2 , 9 - 1 3 , 9 - 1 7
Manual maintenance 9-16
P e r m a n e n t fi l e 9 - 1 5
Recovery point 9-25
Report generation 9-24
Selection 8-4
Structure 9-17
Use
In automatic recovery 9-5
In manual data base reconstruction 9-11
In manual data base restoration 9-12
JOURNAL LOG FILE clause 8-4
JUSTIFIED clause
COBOL subschema 3-13
Query Update subschema 3-23
K display 10-10
KEY clause 2-22
Keys
Alternate 6-2, C-l, F-2
D e fi n i t i o n s 6 - 2
Duplicate 6-2
Embedded 6-3
Inclusion in subschema 3-2, 4-2
Length 6-2
Major 6-3
Multiple record types 6-3
Primary 6-2, C-5
REDEFINES clause 6-3
Use in relation 6-9

Index-5 •

y^i^y

Keyword 4-5, C-4, D-l
L display 10-10
Language elements
COBOL/Query Update subschema 3-9
| F O RT R A N s u b s c h e m a 4 - 6
Schema 2-5
Language version 4-13
Level numbers
Assignments
COBOL/Query Update subschema 3-1
Schema 2-12
D e fi n i t i o n C - 4
Function 2-2
Level 66
COBOL subschema 3-19
Query Update subschema 3-30
Level 88 3-20
Library (See COBOL, FORTRAN, or Query Update
subschema)
Linkage Section 7-8
Literals
CHECK VALUE clause 2-18
D e fi n i t i o n C - 4
Description 3-9
Level 88 3-21
Nonnumeric 2-6
Numeric 2-6
Loading
CDCS (see CDCS)
Data base procedures (see Data base procedures)
P e r m a n e n t fi l e s 8 - 1
L o c a l fi l e n a m e C - 4
LOG clause (area subentry) 8-7
LOG clause (change area subentry) 8-14
Log file (see Journal log file, Quick recovery file,
Tr a n s a c t i o n r e c o v e r y fi l e ,
a n d R e s t a r t i d e n t i fi e r fi l e )
Log record
9-15, 9-20, C-l
After-image
9-15, 9-20, C-l
Before-image
Close 9-20
Header 9-17
Invoke 9-19
Open 9-19
9-19
Privacy breach
9-22
Recovery point
Structure 9-17
Te r m i n a t e 9 - 2 0
Tr a n s a c t i o n 9 - 1 9
Ve r s i o n c h a n g e 9 - 1 9
Ty p e s 9 - 1 7
Logging
Description 9-15
For automatic recovery
9-3, 9-4
Options 9-25
Recovery points 9-25
Logical
Expressions 4-12
Record C-4
Major key 6-3
Manual recovery u t i l i t i e s
Conditions
9-27
Considerations 9-27
Discussion
9-26
Environment
1-9, 9Utilities
9-9
DBQRFA
9-10
DBQRFI
DBRCN
9-11
DBREC
9-6
DBRST
9-14

Index-6

Mapping 5-1, C-4
Master directory (see also DBMSTRD utility)
Check for recompilation 4-19
Coding 8-1
Contents report 8-16, 8-18
Creation run 8-2, 8-17
DBMSTRD output 8-17
D e fi n i t i o n C - 4
Description 1-4, 8-1
Generation 8-16
M o d i fi c a t i o n r u n 8 - 8 , 8 - 1 7
New 8-8, 8-16
Old 8-8, 8-16
Output listings 8-17
Reserved words D-3
Restrictions 8-8
Sample creation run 11-9
S a m p l e m o d i fi c a t i o n r u n 11 - 1 0
Syntax
Add schema entry 8-8, 8-9
Add subschema subentry 8-8, 8-15
Add version subentry 8-15
AFTER IMAGE RECORDS option 8-5, 8-7
Alternate version subentry 8-7
AREA NAME clause 8-6
AREA SAME AS MASTER clause (alternate
version subentry) 8-7
Area subentry 8-b, 8-8
BEFORE IMAGE BLOCKS option 8-5, 8-7
BEFORE IMAGE RECORDS option 8-4, 8-7
CHANGE AREA clause 8-14
Change area subentry 8-13
Change job control Information
subentry 8-12
C h a n g e j o u r n a l l o g fi l e s u b e n t r y 8 - 1 2
Change procedure library subentry 8-10
Change quick recovery file subentry 8-12
C h a n g e r e s t a r t i d e n t i fi e r fi l e
s u b e n t r y 8 - 11
Change transaction recovery file
subentry 8-10
CHARGE/ACCOUNT clause 8-5
Creation entry 8-2, 8-9
Delete schema entry 8-9
Delete subschema subentry 8-8, 8-15
Delete version subentry 8-15
DEVICE TYPE clause 8-2
END clause 8-10
FAMILY NAME clause 8-2, 8-5
FILE NAME clause (modify schema entry) 8-9
FILE NAME clause (schema subentry) 8-3
FILE NAME clause (subschema subentry) 8-8
INDEX clause (change area subentry) 8-15
INDEX FILE clause (area subentry) 8-7
JOB CONTROL INFORMATION clause 8-5
JOURNAL LOG FILE clause 8-4
LOG clause (area subentry) 8-7
LOG clause (change area subentry) 8-14
Master version subentry 8-5
Modify schema entry 8-8, 8-9
MODIFY SCHEMA NAME clause 8-9
PACK NAME clause 8-2
P e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y 8 - 1
Permanent file information subentry
(change area subentry) 8-14
PFN clause 8-2
PROCEDURE LIBRARY clause 8-4
PW clause 8-2, 8-5
QUICK RECOVERY FILE clause 8-4.1
RESTART IDENTIFIER clause 8-4
SCHEMA NAME clause 8-3
Schema subentry 8-3, 8-8
SET NAME clause 8-2
SUBSCHEMA NAME clause 8-8

60485200 E

yf^S^sX

^^^\

Master directory (Contd)
Syntax (Contd)
Subschema subentry 8-8
TAPE clause 8-4.1
TRANSACTION RECOVERY FILE clause 8-4
UN clause 8-5
UN/ID clause 8-2
VERSION NAME clause (alternate version
subentry) 8-7
VERSION NAME clause (change area
subentry) 8-14
VERSION NAME clause (master version
subentry) 8-6
Syntax summary E-9
Use
With CDCS 1-4, 10-10, 10-11
With DBRCN utility 9-13
With DBREC utility 9-8
With DBRST utility 9-14
Ve r s i o n d e fi n i t i o n e x a m p l e 6 - 5
MASTER version name 6-4, 8-5
Master version subentry 8-5
Modify schema entry 8-8, 8-9
MODIFY SCHEMA NAME clause 8-9
MODVAL 10-9
MSTRDIR 9-8, 10-9
Multiple-index processing 1-9, 6-2
Multiple record description 6-2, F-l
Multiple record types 6-3 (see also Multiple
record description)
Multiple subschema compilation 3-35, 4-15
Nested group items
COBOL/Query Update subschema 3-2
D e fi n i t i o n C - 5
Schema 2-2, 2-16, 2-22
Noise record C-4
Nonnumeric
Constant 4-7
Literals 2-6, 3-9
Nonrepeating
Elementary item 4-2
Group item 3-8
Null record occurrence C-5 (see Relation)
Null values (see Data class)
Numeric data items
COBOL subschema 3-16
Conversion 2-4
FORTRAN type specification 4-4, 4-11
P i c t u r e s p e c i fi c a t i o n 2 - 1 3
Query Update subschema 3-24
S c h e m a t y p e s p e c i fi c a t i o n 2 - 1 4
Numeric literals (see also Constant)
COBOL/Query update subschema 3-9
Schema 2-6
OCCURS clause
COBOL subschema 3-14
FORTRAN subschema 4-3
Query Update subschema 3-23
Schema 2-16
Omission of data items 4-2, 5-2
ON ERROR DURING option 7-5
Open log record (see Log record)
Operation C-5
Operator interface
Commands 10-11
K/L display 10-10
Ordering of data items 4-2
Ordinal (see Realm or Subschema item)
Output C-4
O v e r fl o w b l o c k C - 5

60485200 E

O v e r fl o w c o n d i t i o n s G - 2
Overlay capsules 10-4, 10-5, 10-6, 10-8, C-5
Overlay user programs 1-11
PACK NAME clause 8-2
Paging commands 10-16
Parent record occurrence 6-8, C-5
Partial key (see Major key)
Partition C-5
P e r m a n e n t fi l e i n f o r m a t i o n s u b e n t r y 8 - 1
Permanent file information subentry
(change area subentry) 8-14
Permanent files
D a t a b a s e fi l e s 6 - 1
D e fi n i t i o n C - 5
Required for DBREC 9-9
PERMIT control statement
D a t a b a s e fi l e s b - 1 , 1 0 - 3
M a s t e r d i r e c t o r y fi l e 8 - 1 7
PFN clause 8-2
Physical Record Unit (see PRU)
PICTURE clause 5-2, J-2
COBOL subschema 3-15, J-2
Query Update subschema 3-24, J-2
Schema 2-12
P i c t u r e - s p e c i fi c a t i o n 2 - 1 2
Primary key 2-22, C-5 (see Keys)
Privacy (see also Access control)
Breach log record (see Log record)
File privacy features 10-1
Key C-6
Locks 2-10
Private packs or devices 10-9
Procedure library 7-1, 7-7, C-6
PROCEDURE LIBRARY clause 8-4
PROCEDURE LIBRARY PFN clause 7-1 (see also
Master directory)
PRU C-5
PRU device C-6
Punctuation
COBOL/Query Update subschema 3-10
Data description entry 2-1
General rules 2-7
PW clause 8-2, 8-5
Q u a l i fi c a t i o n
D e fi n i t i o n C - 6
Description 1-7, 6-8
Q u a l i fi c a t i o n o f n a m e s 2 - 7 , 3 - 9
Q u a l i fi e r i d e n t i fi e r C - 6
Query Update
C a t a l o g fi l e
Area in schema 11-1
Collating sequence 2-24
Realm in subschema 11-8
Data base environment 1-6, 1—11
Functional description 1-1
L o g fi l e r e p o r t g e n e r a t i o n 9 - 2 4
Query Update subschema
Clauses
AD 3-12
JUSTIFIED 3-23
OCCURS 3-23
PICTURE
3-24
RD 3-12
REDEFINES
3-28, F-2
RENAMES
3-30
RESTRICT
3-30
RN 3-30
S S 3 - 11
SYNCHRONIZED
3-28
USAGE 3-28

Index-7

Query Update subschema (Contd)
Clauses (Contd)
VALUE 3-20
Coding 3-10
Compilation 3-32, 3-34
Directory 3-32
Divisions 3-1
E x a m p l e 11 - 8
Field length requirements G-l
Library
Description 3-32
Maintenance operations 3-34
Reserved words D-l
Syntax summary E-4
Quick recovery file
Automatic recovery use 9-5
D e fi n i t i o n C - 6
Description 9-22
Initialization 9-7, 9-10, 9-23
Manual recovery use 9-9
Recovery point 9-25
Selection 8-5
Use considerations 9-25
| QUICK RECOVERY FILE clause 8-4.1
R a n d o m fi l e C - 6
Rank 6-7, 6-10, C-6
RD clause 3-12
READ statement
Data base procedures 7-6
Data conversion H-5
Realm (see also Files)
D e fi n i t i o n C - 6
Description 1-1
Inclusion In subschema 3-1, 4-1
Realm division
Description 3-12
Function 3-1
Realm ordinal 4-2, C-6
REALM statement 4-10
Description 4-10
Function 4-1
Recompilation 2-35
Recompilation rules (see Guidelines)
R e c o n s t r u c t i o n 9 - 11 , C - 6
Record
Code 2-1, 2-24, C-6
Description entry
COBOL subschema 3-13
Function C-l
Query Update subschema 3-22
Division
COBOL subschema 3-13
Data organization 3-2
Query Update subschema 3-22
Mapping (see Mapping)
Occurrence
D e fi n i t i o n C - 6
Q u a l i fi c a t i o n ( s e e Q u a l i fi c a t i o n )
Returned in relation processing 6-1
RECORD CODE clause
Data base procedure 7-1, 7-5
DDL record type 6-2
Schema 2-24
RECORD statement 4-10
Type (see also CYBER Record Manager) 6-3, C-6
Record description entry
Format 2-10
Function 2-1, 2-8
Organization 2-1
S u b o r d i n a t e e n t r i e s 2 - 11
Record keys 2-22, 2-31
Record mapping 2-5

Index-8

RECORD NAME clause 2-11
Record type
CYBER Record Manager 2-16, 2-32
DDL
Multiple per area 2-1, 4-15
Record description entry 2-1
Recovery (see also Automatic recovery and
Manual recovery)
Conditions
Description 1-9
From application program failure 9-3
From system failure 9-4
Data base facilities 9-1
D e fi n i t i o n C - 6
Point
D e fi n i t i o n C - 6
Description 9-25
Log record (see Log record)
REDEFINES clause
COBOL subschema 3-17
Query Update subschema 3-28
Recommendation F-2
Relation
CDCS processing 6-9
Control break 6-10, C-2
D e fi n i t i o n C - 7
Description 1-6, 4-16
Effect of versions 6-12
E f fi c i e n c y c o n s i d e r a t i o n s 6 - 9
Informative conditions 6-10
J o i n i n g fi l e s 6 - 6 , C - 4
Null record occurrence 6-10, C-5
Occurrence 6-8, C-7
Order of record retrieval 6-10
R e c o r d q u a l i fi c a t i o n ( s e e Q u a l i fi c a t i o n )
S o u r c e i d e n t i fi e r 6 - 9 , C - 7
Ta r g e t i d e n t i fi e r 6 - 9 , C - 8
Relation Division
COBOL/Query Update subschema 3-30
Function 3-1
Relation entry
Format 2-27
Function 2-1, 2-8
RELATION statement 4-11
Relational data base C-7
Relocatable user programs 1-11
RENAMES clause
COBOL subschema 3-19
Query Update subschema 3-30
Repeating data items
Description 2-3
Record key 2-22
S p e c i fi c a t i o n 2 - 1 6
Repeating elementary item 4-2, 4-3
Repeating group
COBOL/Query Update subschema 3-7
D e fi n i t i o n 2 - 3 , 2 - 1 6 , C - 7
OCCURS clause 2-16
Recommendation F-l
Trailor item position 6-2
Replacement characters 3-26
Reserved words
COBOL/Query update subschema 3-9, D-l
Schema 2-5, D-l
Utilities D-3
Restart
I d e n t i fi e r
D e fi n i t i o n C - 7
I d e n t i fi e r fi l e
Automatic recovery 9-5
D e fi n i t i o n C - 7
Description 9-23
Initialization 9-7, 9-8, 9-24
Logging option 9-25

60485200 E

Restart (Contd)
I d e n t i fi e r fi l e ( C o n t d )
Selection 8-4
Operation 9-3
RESTART IDENTIFIER clause 8-4
Restoration 9-14, C-7
RESTRICT clause 3-30, 6-8
RESTRICT statement 6-8
RESULT clause 2-16, 7-1
Result item C-7
RETAIN command 10-13
RETURN command 10-13
REWRITE statement
Data base procedures 7-5
Data conversion H-5
RN clause 3-30
R o o t fi l e 6 - 6 , C - 7
Run-unit
D e fi n i t i o n C - 7
DROP/STOP command 10-17
Sample job structures
Schema
Character set 2-7
Clauses
ACCESS-CONTROL 2-10
ACTUAL RESULT 2-16
AREA NAME 2-9, 2-21
C A L L 2 - 11 , 2 - 1 9
CHECK 2-18
COMPRESSION 2-22
CONSTRAINT NAME 2-26
DECODING 2-19
DECOMPRESSION 2-22
DEPENDS ON 2-27
ENCODING 2-19
JOIN 2-28
KEY 2-22
OCCURS 2-16
PICTURE 2-12
RECORD CODE 2-24
RECORD NAME 2-11
RESULT 2-16
SCHEMA NAME 2-9
SEQUENCE 2-23
TYPE 2-14
VIRTUAL RESULT
2-16
WITHIN
2-11
Coding 2-8
2-29
Compilation
C-7
D e fi n i t i o n
1-1
Description
Field length requirements G-l
FILE control statement 2-31
File information 2-8
Reserved words D-l
Structure 2-1
Subschema compatibility 2-4
Syntax summary E-l
Schema identification entry
D e fi n i t i o n C - 7
Format 2-9
Function 2-1, 2-8
SCHEMA NAME clause 2-9, 8-3
Schema subentry 8-3, 8-8
Schema/subschema
Compatibility 2-4
Correspondence 4-1, 4-2
COBOL/Query update subschema 3-2
FORTRAN subschema 4-1, 4-2
Differences in array size and dimension
Mapping 4-4, 5-1
Section C-7

60485200 E

SEQUENCE clause 2-9
Sequence numbers 2-8, 3-11
S e q u e n t i a l fi l e o r g a n i z a t i o n 6 - 1 , C - 7
SET NAME clause 8-2
Short PRU C-7
Source
D a t a i t e m 2 - 4 , C-7
I d e n t i fi e r C - 7 (see Relation)
Listing 2-33
5-1
Source-target mode
S S c l a u s e 3 - 11
START statement 7-6
Statement labels 4-7
Statements (see Schema, COBOL subschema,
Query Update subschema,
FORTRAN subschema, or
Master directory)
STATUS command 10-14
STOP command 10-17
Subprograms
Data base procedures 7-1
Subschema (see also COBOL, Query Update, or
FORTRAN subschema)
D e fi n i t i o n C - 7
Description 1-2
Item ordinal 5-1, C-8
Library 4-14, 4-15, C-8
Mapping 5-1
SUBSCHEMA NAME clause 8-8
SUBSCHEMA statement 4-9, 6-1
Subschema subentry 8-8
Subscripting 2-7, 3-9
SYNCHRONIZED clause
COBOL subschema 3-18
Query Update subschema 3-28
Syntax summary E-l
S y s t e m c o n t r o l p o i n t 1 - 11 , 1 0 - 8 . 1
System-logical-record C-8
System procedure file (see CDCS)
TA P E c l a u s e 8 - 5
Target (see Relation)
Data item 2-4, C-8
I d e n t i fi e r C - 8
TERM command 10-16
Te s t i n g s i t u a t i o n ( v e r s i o n s ) 6 - 4
Ti t l e D i v i s i o n
D e s c r i p t i o n 3 - 11
Function 3-1
Transaction (see also Data Base Transaction)
D e fi n i t i o n C - 8
F a c i l i t y ( TA F ) 1 - 1 0 , B - l
Log record (see Log record)
Processing C-8
R e c o v e r y fi l e
9-5
Automatic recovery
D e fi n i t i o n C - 8
Description 9-24
Initialization 9-7, 9-8, 9-24
Logging option 9-25
Selection 8-4
TRANSACTION RECOVERY FILE clause 8-4
T r a v e r s i n g fi l e s 6 - 9 , C - 8
Type
Declaration
FORTRAN sub-schema
5-2, J-2
Schema 5-1, J-2
D e fi n i t i o n C - 9
S t a t e m e n t s 4 - 1 , 4 - 11
TYPE clause 2-14, 5-1

4-3
UN clause 8-5
UN/ID clause 8-2

Index-9

U n i t l i m i t 8 - 4 , 8 - 11 , 9 - 4
UP command 10-15
U p d a t e l i m i t 8 - 4 , 8 - 11 , 9 - 4
Updating relations (see Relation)
USAGE clause
COBOL subschema 3-18
General 5-1, 5-2, J-2
Query Update subschema 3-28
U s e r c o n t r o l p o i n t 1 - 11
USER control statement 10-9
User-defined names
COBOL/Query Update subschema 3-9
FORTRAN subschema 4-5
Schema 2-6
User function C-9
Manipulating data items 2-19
M a n i p u l a t i n g r e c o r d s 2 - 11
Opening/closing area 2-8
User's work area 1-12, 6-9, C-9
USING phrase 7-2
Utilities (see also Manual recovery utilities)
CYBER Record Manager 1-10
Data base utilities 9-4.1
Reserved words D-3

Va l i d i t y c h e c k i n g 2 - 1 8
VALUE clause 3-20
Va r i a b l e
Arrays in schemas/subschemas 4-5
D e fi n i t i o n C - 9
Variable occurrence data item
Controlling data item 2-3, 2-16
D e fi n i t i o n C - 9
Description 2-3
FILE control statement 2-31
In COBOL/Query Update subschema 3-7

Index-10

Variable occurrence data item (Contd)
In FORTRAN subschema 4-2, 4-5
S p e c i fi c a t i o n 2 - 1 6
Vector
COBOL/Query Update subschema 3-6
D e fi n i t i o n 2 - 3 , 2 - 1 6 , C - 9
FORTRAN subschema 4-3
OCCURS clause 2-16
Version
Access control locks 6-4.1
Change log record (see Log record)
DBRCN and DBRST utility 9-12
D e fi n i t i o n C - 2 , C - 9
Description 6-4
Relation processing 6-12
Restrictions 6-18
Use 6-4
VERSION NAME clause (alternate version
subentry) 8-7
VERSION NAME clause (change area
subentry) 8-14
VERSION NAME clause (Master version
subentry) 8-6
Virtual
Item C-9
VIRTUAL RESULT clause
2-16, 5-1, 7-5
W type record 6-1, C-9
WITHIN clause 2-11
WRITE statement
Data base procedures

7-5

Zero-byte terminator C-9
Zero-length PRU C-9
ZZZZZEG file 10-8.2, B-2

60485200 E



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
Page Count                      : 412
Creator                         : ScanSnap Manager
Producer                        : Mac OS X 10.5.8 Quartz PDFContext
Create Date                     : 2009:10:20 09:30:46Z
Modify Date                     : 2009:10:20 09:30:46Z
EXIF Metadata provided by EXIF.tools

Navigation menu