EN
Fujitsu logo
Official user manual

Fujitsu UDS/SQL V2.5

324 pages·1.8 MB·Network Router·PDF·ENDEFRITNLJA
Fujitsu UDS/SQL V2.5
Table of Contents 167 sections Contents · Preface · Brief product description · Target group · … ShowHide
Contentsp.3Prefacep.9Brief product descriptionp.9Target groupp.10Summary of contentsp.11Readme filep.16Changes since the last versionp.17Notational conventionsp.22Warnings and notesp.22Non-SDF notational conventionsp.22General informationp.25Modern data organizationp.25Data modelsp.28The CODASYL modelp.28Relational modelp.31Relative merits of the data modelsp.35Coexistence of the CODASYL and relational modelsp.36Universal Database System UDS/SQLp.41Designing the databasep.43Data modelingp.43Distributing the datap.45Technical implementationp.50Defining the logical structure of a UDS/SQL databasep.50Defining the physical structure of a UDS/SQL databasep.51Viewsp.51Schema DDLp.53Introductionp.53Defining an itemp.55Defining an unpacked numeric itemp.56Defining a packed numeric itemp.58Defining a binary itemp.59Defining an alphanumeric item of fixed lengthp.60Defining an alphanumeric item of variable lengthp.61Defining a national item (UTF-16)p.63Defining a database key itemp.64Defining a vectorp.65Defining a repeating groupp.66Grouping record elements to form a record typep.68Linking the records of two record types to form a setp.70Defining a setp.70Defining the type of membership of records in a setp.79Access paths and record sequencesp.84Direct and sequential access on record type level via database key valuep.85Generating additional access paths for direct access on record type levelp.87Determining the order of records within a set occurrencep.94Generating additional paths for direct access on set levelp.100Determining set occurrence selectionp.103Special setsp.105SYSTEM setp.105Dynamic setp.106Assigning names to hash areas and tablesp.107The realm conceptp.108Defining a realmp.109Defining allocation of records to realmsp.110Temporary realmsp.110Assigning name and privacy to a schemap.111Comprehensive example of DDL applicationp.112Reserved words of the DDL compilerp.123SSLp.129Introductionp.129Methods of physical representation of the logical data structurep.130DBTT (Database Key Translation Table)p.131Declaring the populationp.136Specifying the number of records in one record typep.136Specifying the size of the set occurrences of a setp.140Overview of the initial sizes for storage space reservationsp.143Determining the linkage of recordsp.144Determining the storage mode for set occurrencesp.144Assessing pointer array, list and chainp.153Preventing redundancy in SEARCH key tablesp.157Adding a pointer to link a member to its ownerp.159Defining the placement of member records, tables and hash areasp.160Defining the placement of member records, associated tables and hash areas for secondary keysp.160Placement at realm levelp.161Placement within a realmp.163Defining the placement of record SEARCH key table, DBTT and record hash areasp.168Overview of placement statementsp.170Defining the extent of table reorganization desiredp.172Storing the records of a record type in compressed formp.176Formulas for calculating the storage space requirements for records and tablesp.177Comprehensive example of SSL applicationp.179Reserved words of the SSL compilerp.182Definition of the user interface to the databasep.183Subschema DDLp.183Introductionp.183Assigning name and privacy to a subschemap.184Unlocking a schema for creating a subschemap.184Copying entire record types from the schema into the subschemap.185Copying part of a record type from the schema into the subschemap.185Copying sets from the schema into the subschemap.193Copying realms from the schema into the subschemap.194Comprehensive example of subschema DDLp.195Relational schemap.196Structure of pagesp.197Page containerp.199Act-key-0 and act-key-N pagep.200FPA pagep.202DBTT pagesp.205DBTT anchor pagep.205DBTT pagep.207Direct CALC pagep.210Indirect CALC pagep.213Data pagep.215Structure of records and tablesp.219Structure of recordsp.219Structure of tablesp.224Reference sectionp.233Schema DDL syntaxp.236Schema entryp.237Realm entryp.237Record entryp.238Set entryp.243SSL syntaxp.248Schema entryp.248Record entryp.249Set entryp.254Subschema DDL syntaxp.258IDENTIFICATION DIVISIONp.259AREA SECTIONp.259RECORD SECTIONp.260SET SECTIONp.261Glossaryp.263Ap.263Bp.266Cp.266Dp.271Ep.277Fp.277Gp.278Hp.278Ip.279Kp.280Lp.281Mp.282Np.284Op.284Pp.285Rp.289Sp.292Tp.299Up.301Vp.303Wp.303Abbreviationsp.305Related publicationsp.309Indexp.315Ap.315Bp.315Cp.315Dp.316Ep.318Fp.318Gp.318Hp.318Ip.318Kp.318Lp.319Mp.319Np.319Op.319Pp.320Rp.320Sp.321Tp.323Up.323Vp.323Wp.324
Page 1 of the Fujitsu UDS/SQL V2.5 user manual — Design and Definition
Page 1 · click to enlarge
Page 1

UDS/SQL V2.5

Design and Definition

Edition September 2007

Page 2 of the Fujitsu UDS/SQL V2.5 user manual — Copyright and Trademarks
Page 2 · click to enlarge
Page 2

Comments … Suggestions … Corrections …

The User Documentation Department would like to know your opinion on this manual. Your feedback helps us to optimize our documentation to suit your individual needs.

Feel free to send us your comments by e-mail to: manuals@fujitsu-siemens.com

Certified documentation according to DIN EN ISO 9001:2000

To ensure a consistently high quality standard and user-friendliness, this documentation was created to meet the regulations of a quality management system which complies with the requirements of the standard DIN EN ISO 9001:2000.

cognitas. Gesellschaft für Technik-Dokumentation mbH www.cognitas.de

Copyright and Trademarks

Copyright © Fujitsu Siemens Computers GmbH 2007.

All rights reserved. Delivery subject to availability; right of technical modifications reserved.

All hardware and software names used are trademarks of their respective manufacturers.

This manual is printed on paper treated with chlorine-free bleach.

Page 3 of the Fujitsu UDS/SQL V2.5 user manual — Table of Contents
Page 3 · Contents
Contents

Contents

Contentsp.3Prefacep.9Brief product descriptionp.9Target groupp.10Summary of contentsp.11Readme filep.16Changes since the last versionp.17Notational conventionsp.22Warnings and notesp.22Non-SDF notational conventionsp.22General informationp.25Modern data organizationp.25Data modelsp.28The CODASYL modelp.28Relational modelp.31Relative merits of the data modelsp.35Coexistence of the CODASYL and relational modelsp.36Universal Database System UDS/SQLp.41Designing the databasep.43Data modelingp.43Distributing the datap.45Technical implementationp.50Defining the logical structure of a UDS/SQL databasep.50Defining the physical structure of a UDS/SQL databasep.51Viewsp.51Schema DDLp.53Introductionp.53Defining an itemp.55Defining an unpacked numeric itemp.56Defining a packed numeric itemp.58Defining a binary itemp.59Defining an alphanumeric item of fixed lengthp.60Defining an alphanumeric item of variable lengthp.61Defining a national item (UTF-16)p.63Defining a database key itemp.64Defining a vectorp.65Defining a repeating groupp.66Grouping record elements to form a record typep.68Linking the records of two record types to form a setp.70Defining a setp.70Defining the type of membership of records in a setp.79Access paths and record sequencesp.84Direct and sequential access on record type level via database key valuep.85Generating additional access paths for direct access on record type levelp.87Determining the order of records within a set occurrencep.94Generating additional paths for direct access on set levelp.100Determining set occurrence selectionp.103Special setsp.105SYSTEM setp.105Dynamic setp.106Assigning names to hash areas and tablesp.107The realm conceptp.108Defining a realmp.109Defining allocation of records to realmsp.110Temporary realmsp.110Assigning name and privacy to a schemap.111Comprehensive example of DDL applicationp.112Reserved words of the DDL compilerp.123SSLp.129Introductionp.129Methods of physical representation of the logical data structurep.130DBTT (Database Key Translation Table)p.131Declaring the populationp.136Specifying the number of records in one record typep.136Specifying the size of the set occurrences of a setp.140Overview of the initial sizes for storage space reservationsp.143Determining the linkage of recordsp.144Determining the storage mode for set occurrencesp.144Assessing pointer array, list and chainp.153Preventing redundancy in SEARCH key tablesp.157Adding a pointer to link a member to its ownerp.159Defining the placement of member records, tables and hash areasp.160Defining the placement of member records, associated tables and hash areas for secondary keysp.160Placement at realm levelp.161Placement within a realmp.163Defining the placement of record SEARCH key table, DBTT and record hash areasp.168Overview of placement statementsp.170Defining the extent of table reorganization desiredp.172Storing the records of a record type in compressed formp.176Formulas for calculating the storage space requirements for records and tablesp.177Comprehensive example of SSL applicationp.179Reserved words of the SSL compilerp.182Definition of the user interface to the databasep.183Subschema DDLp.183Introductionp.183Assigning name and privacy to a subschemap.184Unlocking a schema for creating a subschemap.184Copying entire record types from the schema into the subschemap.185Copying part of a record type from the schema into the subschemap.185Copying sets from the schema into the subschemap.193Copying realms from the schema into the subschemap.194Comprehensive example of subschema DDLp.195Relational schemap.196Structure of pagesp.197Page containerp.199Act-key-0 and act-key-N pagep.200FPA pagep.202DBTT pagesp.205DBTT anchor pagep.205DBTT pagep.207Direct CALC pagep.210Indirect CALC pagep.213Data pagep.215Structure of records and tablesp.219Structure of recordsp.219Structure of tablesp.224Reference sectionp.233Schema DDL syntaxp.236Schema entryp.237Realm entryp.237Record entryp.238Set entryp.243SSL syntaxp.248Schema entryp.248Record entryp.249Set entryp.254Subschema DDL syntaxp.258IDENTIFICATION DIVISIONp.259AREA SECTIONp.259RECORD SECTIONp.260SET SECTIONp.261Glossaryp.263Ap.263Bp.266Cp.266Dp.271Ep.277Fp.277Gp.278Hp.278Ip.279Kp.280Lp.281Mp.282Np.284Op.284Pp.285Rp.289Sp.292Tp.299Up.301Vp.303Wp.303Abbreviationsp.305Related publicationsp.309Indexp.315Ap.315Bp.315Cp.315Dp.316Ep.318Fp.318Gp.318Hp.318Ip.318Kp.318Lp.319Mp.319Np.319Op.319Pp.320Rp.320Sp.321Tp.323Up.323Vp.323Wp.324
Page 9 of the Fujitsu UDS/SQL V2.5 user manual — 1.1 Brief product description
Page 9 · click to enlarge
Page 9

1 Preface

1.1 Brief product description

The Universal Database System UDS/SQL is a high-performance database system based on the structural concept of CODASYL. Its capabilities, however, go far beyond those of CODASYL as it also offers the features of the relational model. Both models can be used in coexistence with each other on the same data resources.

COBOL DML, CALL DML and (ISO standard) SQL are available for querying and updating data. COBOL DML statements are integrated in the COBOL language; SQL statements can be used in DRIVE programs or via an ODBC interface.

To ensure confidentiality, integrity and availability, UDS/SQL provides effective but flexible protection mechanisms that control access to the database. These mechanisms are compatible with the openUTM transaction monitor.

The data security concept provided by UDS/SQL effectively protects data against corruption and loss. This concept combines UDS/SQL-specific mechanisms such as logging updated information with BS2000 functions such as DRV (Dual Recording by Volume).

If the add-on product UDS-D is used, it is also possible to process data resources in BS2000 computer networks. UDS/SQL ensures that the data remains consistent throughout the network. Distributed transaction processing in both BS2000 computer networks and networks of BS2000 and other operating systems can be implemented using UDS/SQL together with openUTM-D or openUTM (Unix/Linux/Windows). UDS/SQL can also be used as the database in client-server solutions via ODBC servers.

The architecture of UDS/SQL (e.g. multitasking, multithreading, DB cache) and its struc- turing flexibility provide a very high level of throughput.

Page 10 of the Fujitsu UDS/SQL V2.5 user manual — 1.2 Target group
Page 10 · click to enlarge
Page 10

1.2 Target group

This manual is intended to support database designers in designing the logical and physical structure of their database and describing it with DDL and SSL. Furthermore, the manual explains how to make database data available to users in the form they require by using the subschema DDL to create suitable subschemas. The language descriptions are also intended for database application programmers and the database administrator. The general section contains information which is of interest to any user intending to work with UDS/SQL.

Target group Preface

Page 11 of the Fujitsu UDS/SQL V2.5 user manual — 1.3 Summary of contents
Page 11 · click to enlarge
Page 11

Preface Summary of contents

1.3 Summary of contents

What does this manual contain?

The “General” chapter contains general information on maintaining data and using databases and explains the various database models and the differences between them. The chapter is concluded by a general overview of UDS/SQL.

The chapter “Designing a database” provides an overview of the phases of database design and presents options for distributing the data. This chapter concludes with a section that briefly describes the technical implementation of the conceptual schema in a UDS/SQL database.

The chapter “Schema DDL” deals with the data definition language (DDL) used to define the logical data structure.

The chapter “SSL” describes the storage structure language (SSL), which can be used to optimize the physical storage of the data.

The chapter “Defining the user interface to the database” describes the possibilities afforded by the subschema DDL and via the relational schema.

The chapters “Structure of pages” and “Structure of records and tables” provide information for users who are interested in special details.

The “Reference” chapter summarizes the syntax of schema DDL, SSL and subschema DDL.

The “Guide through the manuals” section explains which manuals and which parts of the manuals contain the information you require. A glossary gives brief definitions of the technical terms used in the text. In addition to using the table of contents, you can find answers to your queries either via the index or by referring to the running headers.

Guide through the manuals

The UDS/SQL database system is documented in five manuals:

– UDS/SQL Design and Definition – UDS/SQL Application Programming – UDS/SQL Creation and Restructuring – UDS/SQL Database Operation – UDS/SQL Recovery, Information and Reorganization

Using the manuals

Page 12 of the Fujitsu UDS/SQL V2.5 user manual — Summary of contents
Page 12 · click to enlarge
Page 12

Summary of contents Preface

Further manuals describing additional UDS/SQL products and functions are listed on page 15.

For a basic introduction you should refer to chapters 2 and 3 of the “Design and Definition” manual; these chapters describe

– reasons for using databases

– the CODASYL database model

– the relational database model with regard to SQL

– the difference between the models

– the coexistence of the two database models in a UDS/SQL database

– the characteristic features of UDS/SQL

How the manuals are used depends on your previous knowledge and tasks. Table 1 serves as a guide to help you find your way through the manuals.

If your task is to write COBOL DML programs, you should look up the column “COBOL/CALL DML Programming” under “User task” in the second line of table 1. There, the following chapters of the “Design and Definition” manual are recommended:

B = Basic information

Schema DDL D = Detailed information

SSL D = Detailed information

Subschema DDL L = Learning the functions

In the same column you can also see which chapters of the other manual are of use.

Database administrators who are in charge of database administration and operation will find the appropriate information under the column “Administration and Operation”.

Examples · General information

Page 13 of the Fujitsu UDS/SQL V2.5 user manual — – L – – – – – –
Page 13 · click to enlarge
Page 13

Preface Summary of contents

Contents of the five

COBOL/ CALL DML programming

UDS-D

Manual UDS/SQL Design and Definition

Preface B – B B –

General information B – –

Designing the database B –

Schema DDL L D – L L – – –

SSL L D – L L – – –

Subschema DDL L L – L L – – –

Relational schema L – D –

Structure of pages D – – D D – – –

Structure of records and tables D – – D D – – –

Reference section S – – S –

Manual UDS/SQL Application Programming

Preface – B – – – B B –

Overview – B –

Transaction concept – L – L L D D –

Currency table – L – L L – – –

DML functions D L – L –

Using DML – L – D –

COBOL DML reference section – L –

CALL DML reference section – L –

Testing DML functions using DMLTEST

– L –

Table 1Guide through the manuals (part 1 of 3)
Show 15 more labels / short text on this page
User task · Design · SQL program- · Creation · Administra- tion and op- · Working · Working · Working with · and definition · and re- structuring · with openUTM · with IQS · main manuals · ming · eration
Page 14 of the Fujitsu UDS/SQL V2.5 user manual — – – – – D – – –
Page 14 · click to enlarge
Page 14

Summary of contents Preface

Contents of the five

COBOL/ CALL DML programming

UDS-D

Manual UDS/SQL Creation and Restructuring

Preface – – – B – B B –

Overview – – – B B – – –

Database creation – – – L –

Defining access rights – – – L –

Storing and unloading data D – – L – D – –

Restructuring the database D – – L –

Renaming database objects D – – L –

Database conversion D – – L –

Database conversion using BTRANS24

– – – D –

Manual UDS/SQL Database Operation

Preface – B B B –

The database handler – L – – D

DBH load parameters – L – – D

Administration – L – – D

High availability – B – – –

Extending realms during database operation

D – – – B – – –

Saving and recovering a database in the event of errors

D – – D L D – D

Optimizing performance – D – – D

– D – – –

The SQL conversation – L – – –

UDSMON – D – – –

General functions of the utility routines

– D – – –

Using IQS – – – L D – D –

Using UDS-D D D – D D D – D

Function codes of DML statements – D – – D – – –

Table 1Guide through the manuals (part 2 of 3)
Show 16 more labels / short text on this page
User task · Design · SQL program- · Creation · Administra- tion and op- · Working · Working · Working with · and definition · and re- structuring · with openUTM · with IQS · main manuals · ming · eration · Using BS2000 functionality
Page 15 of the Fujitsu UDS/SQL V2.5 user manual — – – D – D – – –
Page 15 · click to enlarge
Page 15

Preface Summary of contents

Contents of the five

COBOL/ CALL DML programming

UDS-D

Manual UDS/SQL Recovery, Information and Reorganization

Preface – B B B –

Updating and reconstructing a database

D – – D L D – –

Checking the consistency of a database

– L – – –

Output of database information D – – D L – – –

Database reorganization D – – D L – – –

Controlling the reuse of deallocated database keys

D – – D L – – –

UDS/SQL Messages D

UDS/SQL System Reference Guide

S S – S

IQS – – – D D – L –

ADILOS – D – L –

KDBS – L 1 – D –

SQL for UDS/SQL Language Reference Manual

– – D – D – – –

Table 1Guide through the manuals (part 3 of 3)

1 only for COBOL-DML

B LRLR→provides basic information if you have no experience of UDS/SQL L LRLR→helps you learn functions D LRLR→provides detailed information S LRLR→provides a reference to syntax rules for practical work with UDS/SQL

Show 16 more labels / short text on this page
User task · Design · SQL program- · Creation · Administra- tion and op- · Working · Working · Working with · and definition · and re- structuring · with openUTM · with IQS · main manuals · ming · eration · Additional Manuals
Page 16 of the Fujitsu UDS/SQL V2.5 user manual — PARAMETERS(CONTROL-CHARACTERS=EBCDIC)
Page 16 · click to enlarge
Page 16

Additional notes on the manuals

References to other manuals appear in abbreviated form. The following distinction is made: (see “Application Programming” manual, CONNECT) advises you to look up CONNECT in the “Application Programming” manual. The complete titles of the manuals can be found under References.

This manual contains all messages output by UDS/SQL. The messages are sorted in ascending numerical order, or in alphabetical order for some utility routines.

UDS/SQL System Reference Guide

The UDS/SQL System Reference Guide gives an overview of the UDS/SQL functions and formats.

SQL for UDS/SQL Language Reference Manual

This manual describes the SQL DML language elements of UDS/SQL. In addition to UDS/SQL-specific extensions, the language elements described include dynamic SQL as an essential extension of the SQL standard. For information on accessing databases with SQL statements, refer to the “ESQL COBOL” manual and the various “DRIVE” manuals.

1.4 Readme file

Information on functional changes and additions to the current product version described in this manual can be found in the product-specific README file. You will find the README file on your BS2000 computer under the file name SYSRME.product.version.language. The user ID under which the README file is cataloged can be obtained from your system support. You can view the README file using the /SHOW-FILE command or an editor, and print it out on a standard printer using the following command:

/PRINT-DOCUMENT filename, LINE-SPACING=*BY-EBCDIC-CONTROL

SPOOL version smaller than 3.0A:

/PRINT-FILE FILE-NAME=filename,LAYOUT-CONTROL=

PARAMETERS(CONTROL-CHARACTERS=EBCDIC)

Readme file Preface · UDS/SQL Messages

Page 17 of the Fujitsu UDS/SQL V2.5 user manual — DBO 4
Page 17 · click to enlarge
Page 17

Preface Changes since the last version

1.5 Changes since the last version

The main changes introduced in UDS/SQL V2.5 in comparison with Version 2.4 are listed in table 2 below together with the manuals and the sections in which the changes are described. If a specific topic has been dealt with in more than one manual, the manual in which a detailed description appears is listed first. The following codes are used in the “Manual” column for the individual manuals involved:

DES Design and Definition DBO Database Operation

APP Application Programming RIR Recovery, Information and Reorganization

CRE Creation and Restructuring MSG Messages

START-UDS commands - Syntax description

Syntax description DBO 2, 12

CRE 2

Restriction of the pubset environment

In the case of DBH startup DBO 2

Information on compatibility with details of the load parameters PP LOG/LOG-2/RESERVE

DBO 3

Specifying a UDS/SQL pubset declaration DBO 9

Information on compatibility with details of the BMEND statement START-LOG

DBO 9

New DAL command NEW PUBSETS (checks and notes new UDS/SQL pubset declaration)

DBO 4

DAL command DISPLAY PUBSETS (displays the UDS/SQL pubset declaration)

DBO 4

Assignment of the COSSD file for compiling a COBOL-DML program APP 6

SM pubsets for logging files DBO 9

Extension of the START-LOG statement (BMEND utility routine) by operands for log files on SM pubsets

RIR 2

Changed load parameters PP LOG/LOG-2/RESERVE with vsn specification

DBO 3

Changed DAL commands MODIFY LOG/LOG-2/RESERVE with vsn specification

DBO 4

Table 2Changes in Version 2.5 compared to Version 2.4 (part 1 of 5)

Topic Manual Chapter

Page 18 of the Fujitsu UDS/SQL V2.5 user manual — CRE 6, 7
Page 18 · click to enlarge
Page 18

Changes since the last version Preface

Session job variable Additional information

DBO 9

Database job variable New job variable with information on the status of a database

DBO 9

New utility routine BRENAME for renaming database objects CRE 7

New statement RENAME in the BGSIA utility routine CRE 3

Automatic realm extension by means of utility routines

Information on preparations in the database structure CRE 3

Description of the new SQL data types RIR 5

New item types for the LOOKC function APP 8

Definition of national items DES 4, 6, 9

Additional reserved words of the DDL compiler DES 4

PP LOG/LOG-2/RESERVE with vsn specification for pubsets DBO 3

DISPLAY PUBSETS (displays the UDS/SQL pubset declaration) DBO 4

MODIFY LOG/LOG-2/RESERVE with vsn specification for pubsets DBO 4

NEW PUBSETS - checks and notes new UDS/SQL pubset declaration DBO 4

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 6, 7

Use in the renaming cycle CRE 7

Additional format of the FILLING statement: WITH POPULATION CRE 6

Information on UDS/SQL pubset declaration CRE 3

Table 2Changes in Version 2.5 compared to Version 2.4 (part 2 of 5)
Show 10 more labels / short text on this page
Topic Manual Chapter · Renaming database objects · Concept DBO 6 · Unicode support · Concept DBO 9 · Modified load parameters · Modified DAL commands · New DAL commands · BALTER utility routine · BCALLSI utility routine
Page 19 of the Fujitsu UDS/SQL V2.5 user manual — RIR 2
Page 19 · click to enlarge
Page 19

Preface Changes since the last version

Delimitation from renaming of database objects CRE 6

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 6

Information on UDS/SQL pubset declaration RIR 3

Modified message texts because of the new error classification (MINOR, STRUCTURAL, SERIOUS)

RIR 3

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 3

Information on UDS/SQL pubset declaration CRE 3

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 3

New statement RENAME for renaming database objects CRE 3

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 3

Information on UDS/SQL pubset declaration CRE 5

Information on UDS/SQL pubset declaration RIR 2

Extension of the START-LOG statment by operands for log files on SM pubsets

RIR 2

Information on UDS/SQL pubset declaration RIR 9

BOUTLOAD utility routine CRE

Information on UDS/SQL pubset declaration CRE 5

Information on UDS/SQL pubset declaration CRE 8

Table 2Changes in Version 2.5 compared to Version 2.4 (part 3 of 5)
Show 11 more labels / short text on this page
Topic Manual Chapter · BCHANGE utility routine · BCHECK utility routine · BCREATE utility routine · BFORMAT utility routine · BGSIA utility routine · BGSSIA utility routine · BINILOAD utility routine · BMEND utility routine · BMODTT utility routine · BGPSIZE utility routine
Page 20 of the Fujitsu UDS/SQL V2.5 user manual — CRE 3
Page 20 · click to enlarge
Page 20

Changes since the last version Preface

Information on UDS/SQL pubset declaration RIR 7

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 4

Information on UDS/SQL pubset declaration RIR 4

Information on UDS/SQL pubset declaration RIR 5

Description of all SQL data types, including the new one for supporting Unicode

RIR 5

New utility rountine for initiating a renaming cycle CRE 7

Use of DDL, SSL, BGSIA, BALTER and BGSSIA in the renaming cycle CRE 7

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 7

Information on automatic realm extension and UDS/SQL pubset declaration

RIR 8

Information on UDS/SQL pubset declaration RIR 6

Changed requirements for executing the utility routine CRE 9

Information on automatic realm extension CRE 4

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 3

Information on automatic realm extension and UDS/SQL pubset declaration

CRE 3

Table 2Changes in Version 2.5 compared to Version 2.4 (part 4 of 5)
Show 12 more labels / short text on this page
Topic Manual Chapter · BPRECORD utility routine · BPRIVACY utility routine · BPSIA utility routine · BPSQLSIA utility routine · BRENAME utility routine · BREORG utility routine · BSTATUS utility routine · BTRANS24 utility routine · ONLINE-PRIVACY utility routine · DDL compiler · SSL compiler
Page 21 of the Fujitsu UDS/SQL V2.5 user manual — MSG 3
Page 21 · click to enlarge
Page 21

Preface Changes since the last version

New messages UDS0746 - UDS0755 MSG 2

Modified message UDS0728 MSG 2

Additional inserts in the case of UDS0209, UDS0353, UDS0700, UDS0711, UDS0720

MSG 2

New messages of the utility routines: 0045 - 0052, 0055, 0064, 0065, 0084, 1004 - 1007, 1034, 1059, 1060, 1063, 1064, 1091 - 1096, 1317, 2006, 2018, 2037 - 2039, 2926, 2927, 2933, 2934, 2979, 3026, 3608, 4049

MSG 3

Modified messages of the utility routines: 0073, 0074, 1309, 2040, 2507, 3607, 3630, 3639, 3643, 3651, 3652, 3655, 3661 - 3667

MSG 3

New DDL syntax error messages116, 193, 208, 296 MSG 4
Modified DDL syntax error messages166, 194, 196 MSG 4

New status code for the LOOK function: 786 MSG 5

Omitted status code for the LOOK function: 806 MSG 5

Table 2Changes in Version 2.5 compared to Version 2.4 (part 5 of 5)

Topic Manual Chapter · Messages

Page 22 of the Fujitsu UDS/SQL V2.5 user manual — ⎧ CALC ⎫ ⎨ ⎬ ⎩ INDEX ⎭
Page 22 · click to enlarge
Page 22

1.6 Notational conventions

This section provides an explanation of the notational conventions used to describe syntax rules.

1.6.1 Warnings and notes

Points out particularly important information

!

1.6.2 Non-SDF notational conventions

Language element Explanation Example

KEYWORD Keywords are shown in underlined uppercase letters. You may enter either the underlined parts of the keyword exactly as shown or the complete keyword.

DATABASE-KEY

MANUAL

OPTIONAL WORD Optional words are shown in uppercase letters without underlining. Such words may be omitted without altering the meaning of a statement.

NAME IS

ALLOWED

PAGES

variable Variables are shown in italic lowercase letters. In a format which contains variables, a current value must be entered in place of each variable.

⎧Either⎫ ⎨ ⎬ ⎩or ⎭

Exactly one of the expressions enclosed in braces must be specified. Indented lines belong to the preceding expression. The braces themselves must not be specified.

⎧ CALC ⎫ ⎨ ⎬ ⎩ INDEX ⎭

⎧VALUE IS ⎫ ⎨ ⎬ ⎩VALUES ARE ⎭

[optional] The expression in square brackets can be omitted. UDS/SQL then uses the default value The brackets themselves must no be specified.

Table 3Notational conventions (part 1 of 2)
Show 5 more labels / short text on this page
item-name · literal-3 · integer · [IS integer] · [WITHIN realm-name]
Page 23 of the Fujitsu UDS/SQL V2.5 user manual — Notational conventions
Page 23 · click to enlarge
Page 23

Language element Explanation Example

... or ,...

The immediately preceding expression can be repeated several times if required. The two language elements distinguish between repeti- tions which use blanks and those which use commas.

item-name,...

{SEARCH KEY }...

or . .

Indicates where entries have been omitted for reasons of clarity. When the formats are used, these omissions are not allowed.

SEARCH KEY IS RECORD NAME .. .

The period must be specified and must be followed by at least one blank. The underline must not be specified.

SET SECTION.

03 item-name

Space Means that at least one blank has to be specified. USING CALC

Table 3Notational conventions (part 2 of 2)

All other characters such as ( ) , . ; “ = are not metacharacters: they must be specified exactly as they appear in the formats.

Preface Notational conventions

Page 24 of the Fujitsu UDS/SQL V2.5 user manual — Notational conventions
Page 24 · click to enlarge
Page 24
Page 25 of the Fujitsu UDS/SQL V2.5 user manual — 2.1 Modern data organization
Page 25 · click to enlarge
Page 25

2 General information

This chapter provides general information on maintaining data and using databases. It also explains the various database models and the differences between them. It concludes with a general overview of UDS/SQL.

2.1 Modern data organization

Now that data processing is used at all levels in an organization, the qualitative and quanti- tative demands on data storage and organization have increased considerably. Moreover, they are subject to constant change.

The reasons for this change are:

– rapid growth of data volumes – client/server applications – transition from data to information processing – influence of new communication media and technology – increasing tendencies towards decentralization.

It is now widely recognized that data is as an independent factor in production alongside traditional factors such as accounting, personnel and infrastructure.

Page 26 of the Fujitsu UDS/SQL V2.5 user manual — General information
Page 26 · click to enlarge
Page 26

Modern data organization General information

How and by whom data is used at the different levels in an organization company, is shown in the figure 1 in form of an information pyramid.

Top management (objectives, strategy)

Middle management (planning, control, supervision)

Figure 1Flow of data and information in an organization

The basis for physical data storage and logical data organization within a company is the database, which is the focus of the company’s informational processes.

Reasons for using databases

Often, people who are considering using a database system are motivated to do so because they find that is no longer possible to process extensive quantities of data and an increasing number of applications with conventional files.

Mutually isolated, frequently overlapping (redundant) data resources that are divided into different files are awkward to handle and can be kept up to date only with considerable effort and expense.

This is where the functionality offered by database systems can help. These systems provide a stable, non-overlapping and expandable data organization, as well as incorpo- rating convenient, efficient functions for retrieving and manipulating data.

Combining the different sets of data and administering them together in a database system also ensures consistency. At any given time, all the data has the same update status - even when a large number of applications access the data at the same time.

Database systems also protect their data against unauthorized access. They make it possible to have data resources constantly available and to reconstruct data that has been corrupted or destroyed.

Database systems are also capable of satisfying demanding performance requirements through the use of suitable techniques, for example for optimal operation of the data processing system’s input and output devices.

Show 4 more labels / short text on this page
Strategic data · Planning data · Staff (routine work) · Operational data
Page 27 of the Fujitsu UDS/SQL V2.5 user manual — General information
Page 27 · click to enlarge
Page 27

General information Modern data organization

The use of a database system results in a noticeable reduction of costs, particularly in the development of applications.

The cost savings are achieved due to the following reasons:

– All the people involved in development can use a uniform, non-application-specific database.

– Preprogrammed functions are provided.

– A data organization which remains stable over the long term solves lots of problems.

Follow-up costs for service and maintenance can be reduced due to the following reasons:

– Data and programs are clearly separated and independent from one another.

– Logical data organization and physical storage form are mutually independent.

Page 28 of the Fujitsu UDS/SQL V2.5 user manual — 2.2.1 The CODASYL model
Page 28 · click to enlarge
Page 28

CODASYL model General information

2.2 Data models

The UDS/SQL database system supports both the network model (CODASYL model) and the relational model. It encompasses the principles and capabilities of both the CODASYL and the relational models in a single system. UDS/SQL can be regarded as the implemen- tation of a coexistence model of a database. The following sections briefly describe the CODASYL model, the relational model, the relative merits of the two models, and the coexistence model.

2.2.1 The CODASYL model

A major user demand is that database systems are compatible. The standardization of database systems has thus been the goal of powerful user associations for many years. The Conference on Data System Languages (CODASYL) has developed widely accepted recommendations for the standardization of database systems. This association is already well-known for its achievements in application portability thanks to its development of the programming language COBOL.

CODASYL was constituted in 1959 by US producers and users, and, notably, with the participation of the US Administration. Since 1965, this association has concentrated partly on data organization and databases. When the basic results of the different study groups were published, they described a database concept which has been continually improved.

The CODASYL model provided the basis for the implementation of the UDS/SQL database system.

In the CODASYL model, a database contains not only records, but also the relationships between the records. This is why it is also referred to as the network model.

The following diagram (figure 2) shows an example of a networked data structure, which is represented by boxes and arrows. A box symbolizes a type of record. In this example, the records that describe the suppliers are grouped together in the record type SUPPLIER. All records of the given record type have the same structure. For each supplier, the SUPPLIER record type contains a record which defines the name and the city of that supplier. NAME and CITY are record elements names.

Another record type shown in figure 2 is the record type ARTICLE. The record types ARTICLE and SUPPLIER are connected by an arrow, which indicates that a relationship exists between the record types. Such relationships are referred to as set relationships or simply sets.

Page 29 of the Fujitsu UDS/SQL V2.5 user manual — Data models
Page 29 · click to enlarge
Page 29

General information CODASYL model

The set between the SUPPLIER and ARTICLE record types has the name SUPPLIES. In the SUPPLIES set, SUPPLIER is the owner record type, and ARTICLE the member record type. As a rule, two or more records of the member record type are assigned to a given record of the owner record type. In this example, the supplier Schmidt supplies the articles gingerbread cookies and marzipan.

Fujitsu UDS/SQL V2.5 — Data models diagram (page 29)
Fig. 1 · Data models
Figure 2Network-like structure of data

In a network structure, a record type may be a member in two or more different set relation- ships and thus may also have more than one owner. A record can have only one owner per set relationship.

Page 30 of the Fujitsu UDS/SQL V2.5 user manual — Data models
Page 30 · click to enlarge
Page 30

CODASYL model General information

Relationships between record types and referential integrity

In figure 2, the SUPPLIES set indicates that a record of the ARTICLE record type is not an isolated record, but is assigned to a record of the SUPPLIER record type. In UDS/SQL, it is possible to declare in a set definition that no article may be entered without a supplier being assigned to that article. A relationship of this type is an example of referential integrity. Referential integrity also ensures, for example, that the relationships between order and customer remain consistent; in this case, a customer must exist for each order. This means that no order can be entered without the customer who placed it also being entered, and that a given customer cannot be deleted as long as an order from that customer exists.

Language components of the CODSASYL report

The CODASYL report describes three basic language components:

1. The schema DDL (Data Description Language) defines the logical structure of the data in the database. It allows any type of network structure to be defined.
2. The subschema DDL describes user-specific views of the database.

A subschema is a part of a schema. Two or more subschemas may exist for each schema. These subschemas may overlap one another, i.e. a given record type may exist in two or more subschemas. A subschema can include the entire database or contain only a single record type.

The schema/subschema concept is a major part of data protection. Each user is allowed to perform operations only within his or her own subschema, with no access to the rest of the database.

3. The COBOL-DML (Data Manipulation Language) is a comprehensive language for accessing databases. Both its range of functions and the way it is embedded in the programming language COBOL are defined precisely. Its basic language components are used for navigation, reading and updating in the database as well as to control processing.
Page 31 of the Fujitsu UDS/SQL V2.5 user manual — MIT5011
Page 31 · click to enlarge
Page 31

General information Relational model

2.2.2 Relational model

The relational model is based on the theoretical work of E.F. Codd, who described the organization and manipulation of data in database systems in terms of relational algebra. He used precisely defined terms to represent the mathematical model of his relational theory.

The terms and concepts used in the relational model are explained below, taking as an example the following structure of a small database:

DEPARTMENT

DEPTNO DESIGNATION

LOCATION

Munich Nuremberg Munich Munich Munich

ABT02KUN ABT03PER ABT04REC ABT05VER

Customer service Personnel Computer center Sales

EMPLOYEES

Primary key Foreign key

EMPNO NAME

CITY

SALARY DEPT. NO

Munich Nuremberg Freising Munich Ottobrunn

2800 4700 3020 6200 4820 4080

ABT04REC ABT02KUN ABT04REC ABT03PER

MIT0206 MIT3209

Smith Gerold Strahl Berger

MIT5011

MIT9018

Figure 3Terminology used in the relational model
Show 7 more labels / short text on this page
Primary key · Record element name · ABT01ENT Development · Record · Record element · MIT7201 Rang · MIT0100 Winsmann Munich
Page 32 of the Fujitsu UDS/SQL V2.5 user manual — Relational model
Page 32 · click to enlarge
Page 32

Relational model General information

The following list shows the terms used in this manual and the corresponding formal terms defined by Codd:

Term used in manual Formal term (Codd)

table record (row) column, record element value value range

relation tuple attribute attribute value domain

In the relational model, the data is managed and processed in the form of tables. Different types of tables exist:

– base tables – result tables – views

Base tables are tables that have a fixed definition within the database. In figure 3, the database contains two base tables with the table names DEPARTMENT and EMPLOYEES. A table is composed of lines and columns. The base table in the relational model is compa- rable to the record type in the CODASYL model. A line of a table is called a record. A record of the EMPLOYEES table contains all the information on a given employee. Instead of the term “column”, this manual uses the term “record element”.

Querying the database yields a new table, a result table, which contains the records returned in response to the query.

A view is a defined section of a database. A view may contain record elements and records from one or more base tables. Views can be addressed with SQL statements in the same way as a base table can. The use of views can afford a vast simplification of the database interface and provide a large degree of logical data independence.

Base tables · Result tables · Views

Page 33 of the Fujitsu UDS/SQL V2.5 user manual — Relational model
Page 33 · click to enlarge
Page 33

General information Relational model

In the case of relational data organization, record types are linked by means of certain record elements with matching contents. A table in a relational schema thus corresponds to a record type in a CODASYL schema. For example, to link a table with another table by means of record element contents, the identifying primary key of the first table must also be included as a (redundant) foreign key in the second table (see figure 3, DEPARTMENT and EMPLOYEE tables).

A foreign key must match the values of another table’s primary key. Foreign keys create logical links between tables. Foreign keys are defined by the users themselves.

Tables are the only fixed data structures in the relational model. Most relational database systems neither monitor nor maintain the logical relationships between tables. Users create these relationships by means of values when processing the database, i.e. the tables are linked logically on the basis of their contents. Users are thus not restricted by structures prescribed by the system.

Data manipulation and retrieval in relational databases

The relational model defines basic database functions which are analogous to set opera- tions. Thus, in addition to the principle of processing data in the form of tables, another major feature characterizing the relational model is a defined set of basic operations which can be used to retrieve information from relational databases. The relational model does not define a language for data manipulation and retrieval.

The main features of data manipulation languages (DML) in relational systems are the set- oriented operations projection, selection and join and the absence of any predefined struc- tures. In other words, relational data manipulation languages describe the desired result itself, instead of describing how that result is to be obtained, i.e. users no longer need to specify how the desired result is to be ascertained from the database - they need merely state what they want to see.

The relational model is supported in UDS/SQL through the inclusion of SQL (Structured Query Language), a language for relational database systems.

Relationships between tables

Page 34 of the Fujitsu UDS/SQL V2.5 user manual — Relational model
Page 34 · click to enlarge
Page 34

Relational model General information

SQL - a uniform language for relational database systems

Development of the theory of relational databases by Codd and others was paralleled by work on the user interface for such systems. The initial results of this work were first presented in the “System R” prototype and were continually revised and supplemented with further results in the years following. The first commercial implementations of this language interface have been on the market since the early eighties under the name of SQL. Major standardization organizations such as ANSI and ISO have been working on standardizing SQL since 1982. With the active support of Siemens, the ISO standard for SQL (ISO 9075:1989(E)) was established in 1987. The power of the SQL-DML enables users to perform all of the essential operations on the database. New data can be inserted in the tables or data already in the tables can be queried, updated or deleted. Tables can be linked with one another, and the result sets of two or more queries combined. All processing by the DML is set-oriented. For example, a selection yields a table which the user can then process further record by record, and an update statement changes all the records that satisfy the specified conditions. It is precisely this set-oriented processing that distinguishes SQL from database languages for non- relational database systems.

This is also a major advantage for users in that it enables them to have a variety of actions performed on the database by issuing a single statement. In the case of record-oriented processing, all of these actions would have to be initiated separately.

In summary, SQL has the following main features:

– SQL is based on the relational data model developed by E.F. Codd and incorporates all of its advantages: powerful data manipulation by means of descriptive set-processing statements and simple data organization, which does not affect programs when altered.

– The use of the standardized SQL interface promotes the portability of DB applications and provides a high degree of independence from special database interfaces (facili- tates the procurement of know-how).

– SQL is a uniform, easy-to-learn language.

Each of these features results in increased productivity in application programming and improves the cost-effectiveness of database use overall. The obvious advantages of SQL have prompted nearly all manufacturers to offer the SQL interface in their present products or to announce its incorporation in their future ones.

A separate manual (see the “SQL for UDS/SQL” manual) provides detailed information on the basic concepts and terminology of SQL and describes the SQL language set supported by UDS/SQL.

Page 35 of the Fujitsu UDS/SQL V2.5 user manual — 2.2.3 Relative merits of the data models
Page 35 · click to enlarge
Page 35

General information Relative merits of the data models

2.2.3 Relative merits of the data models

Comparing the data models with one another in terms of quality is difficult and possible only from the perspective of a specific field of application. Especially an attempt to weight the relative advantages and disadvantages of the models can be made only for a specific appli- cation.

Basically, all data structures can be implemented with either of the two models.

Advantages of the relational model

The clear advantage of the relational model is its greater flexibility in regard to data struc- tures.

Since the application programs are not dependent on the data structures, the data struc- tures can in many cases be changed without affecting the applications. Through the use of views, the underlying data structures can be hidden completely from the users.

Advantages of the CODASYL model

A major advantage of the CODASYL model lies in the performance of the application.

The CODASYL model explicitly defines not only the record types and tables, but also their relationships to one another. This means that the relationships between the record types must also be known to the applications. Since the applications build on the defined data structures, the applications are optimally adjusted to them. This adaptation of the applica- tions to the data structures known to the database system has a very favorable effect on the applications’ performance. Of course, this favorable influence of the data structures on the applications is achieved at the cost of flexibility. In many cases, alterations to the data structures have an effect on the applications.

A further advantage of the CODASYL model lies in its monitoring of referential integrity.

A database system based on the CODASYL model automatically ensures that the defined logical relationships between the record types are not violated.

Page 36 of the Fujitsu UDS/SQL V2.5 user manual — 2.2.4 Coexistence of the CODASYL and relational models
Page 36 · click to enlarge
Page 36

2.2.4 Coexistence of the CODASYL and relational models

A decision to use UDS/SQL is not a decision in favor of the CODASYL model and against the relational model. UDS/SQL supports both models within a single database system, which is consequently referred to as the coexistence model. Both SQL and CODASYL applications can work with the same data resources at the same time.

The coexistence model also provides users with the advantages of both data models:

– a high degree of flexibility in regard to data structures for SQL applications, for example through the use of views,

– optimal performance for CODASYL applications and

– monitoring of referential integrity for CODASYL and SQL applications, provided set relationships were defined.

UDS/SQL supports two forms of logical data organization:

– CODASYL data organization with set relationships between the record types

– relational data organization, in which record types are linked only via the contents of specific record elements

The SQL interface to CODASYL data structures is supported by the BPSQLSIA utility, which generates a relational view for practically all of the system’s CODASYL structures (see the “Recovery, Information and Reorganization” manual). This is necessary because SQL statements require the use of explicit data elements which do not exist in the CODASYL database description; in the relational database description, primary keys are added to all owner record types, and foreign keys are added to member record types.

The generation of the relational data description by the BPSQLSIA utility does not physi- cally change the database. The additional data elements (primary keys and foreign keys) exist only logically. As the result of the generation, SQL application programmers receive a printout containing all the information needed to process a CODASYL database with SQL (e.g. table names, record element names, record element descriptions, etc.). SQL appli- cation programmers can work exclusively with the relational schema, yet the CODASYL schema remains unchanged and available for use by CODASYL applications.

Coexistence General information

Page 37 of the Fujitsu UDS/SQL V2.5 user manual — UDS/SQL
Page 37 · click to enlarge
Page 37

This results in two different user views of a UDS/SQL database, as is shown in figure 4 below:

CODASYL user level Relational user level

schema BPSQLSIA utility routine

UDS/SQL

Figure 4Two user views of the same UDS/SQL database
Show 6 more labels / short text on this page
General information Coexistence · CODASYL applications · SQL applications · CODASYL subschema · Relational · database
Page 38 of the Fujitsu UDS/SQL V2.5 user manual — UDS/SQL
Page 38 · click to enlarge
Page 38

In summary, UDS/SQL offers the following options for combining program interfaces and data organizations:

UDS/SQL

C C R R R C

CODASYL data structure Relational data structure

Figure 5Coexistence of interfaces and data models in UDS/SQL

Relational SQL program interface → CODASYL data organization (RC)

Via the relational SQL program interface, applications access a CODASYL data organi- zation for which a relational view has been generated as described above. This combination of program interface and data organization will be referred to in the following as an RC combination.

An RC combination makes it possible to take advantage of the implicit set relations without requiring SQL programmers to be acquainted with the CODASYL structures. By taking advantage of these set relationships, UDS/SQL ensures the integrity of the data relation- ships (referential integrity).

Show 5 more labels / short text on this page
Coexistence General information · CODASYL application · SQL application · CODASYL- DML interface · Relational SQL-DML interface
Page 39 of the Fujitsu UDS/SQL V2.5 user manual — Coexistence of the CODASYL and relational models
Page 39 · click to enlarge
Page 39

Relational SQL program interface → relational data organization (RR)

Via the relational SQL program interface, applications access a purely relational data organization. This combination of program interface and data organization will be referred to in the following as an RR combination.

An RR combination is suitable for compatible programs since in this case the primary and foreign keys are administered by the user, as prescribed by the standard, which corre- sponds to their handling in SESAM/SQL and INFORMIX. Since the data structures are not based on set relations, the system cannot ensure referential integrity.

CODASYL program interface → CODASYL data organization (CC)

Via the CODASYL program interface (COBOL-DML or CALL-DML of UDS/SQL), applica- tions access the CODASYL data structures. This combination of program interface and data organization will be referred to in the following as a CC combination.

Coexistence of interfaces and data models

UDS/SQL offers the options just described coexistently, which means that a database handler can perform the following tasks simultaneously:

– run SQL applications and CODASYL applications (SQL and CODASYL language elements can even be mixed in one and the same appli- cation, but not within a transaction),

– process relational data structures and CODASYL data structures, and

– support all three of the program-interface/data-organization combinations described above (RR, RC and CC).

In other words, the UDS/SQL data model incorporates the relational and the CODASYL data models in such a way that each model can exist independently and that SQL state- ments can be applied to CODASYL data structures. This is referred to as the coexistence model, a model that was realized for the first time in UDS/SQL and which provides an appli- cation environment combining the flexibility and simplicity of the relational data model with the efficiency and performance of network database systems.

General information Coexistence

Page 40 of the Fujitsu UDS/SQL V2.5 user manual — Coexistence of the CODASYL and relational models
Page 40 · click to enlarge
Page 40

The COBOL-DML or CALL-DML interface is typically used for

– high-end OLTP applications and extremely performance-critical applications (Online Transaction Processing) and

– special applications that run especially efficiently with network structures, e.g. parts list processing.

The SQL interface is generally used in the following application areas:

– object-oriented database systems – client/server applications – data warehousing – applications that are to be portable and comply with standards, – 4GL programming with DRIVE (4th Generation Language) and – COBOL programs that are to access databases.

Coexistence General information · Interface suitability

Page 41 of the Fujitsu UDS/SQL V2.5 user manual — 2.3 Universal Database System UDS/SQL
Page 41 · click to enlarge
Page 41

General information Universal Database System UDS/SQL

2.3 Universal Database System UDS/SQL

The Universal Database System UDS/SQL offers users a wide range of structuring options and an abundance of capabilities for setting up, using and maintaining databases:

  • Structuring options

The structure of a company’s database is a map reflecting the organizational, business and technical aspects of the company. UDS/SQL allows you to map relational, hierar- chical and/or networked structures, i.e. the database schema can be adapted to existing company structures without any problem.

The data structure can be adapted to new conditions if, for example, aspects of the company change or the database is expanded to include new things.

  • Redundancy-free data storage

In UDS/SQL, data is stored non-redundantly, thus minimizing the storage space required and simplifying updates. An update is made only once, at a single location. The data is thus always available in the same form and with the same update status to all applications.

  • Data independence of programs

In UDS/SQL, the records of the entire database are written only once at the logical level. The data structure is defined during the creation of the database and is binding for all application programs. Application programs operate at the logical level. Alterations to the physical organi- zation of the data have no effect on the programs. Physical aspects (for instance of storage) are thus decoupled or hidden from the users, who get to know only the logical structure of the data required for their respective work. Program creation and maintenance are simplified and made uniform.

  • Flexible data evaluation

Users can evaluate data from different points of view since UDS/SQL maintains the data resources centrally. Records and record elements can be selected not only via defined keys, but also by means of any desired complex conditions or on the basis of any desired record-element contents.

Page 42 of the Fujitsu UDS/SQL V2.5 user manual — Universal Database System UDS/SQL
Page 42 · click to enlarge
Page 42

Universal Database System UDS/SQL General information

  • Central data protection measures

UDS/SQL incorporates effective, flexibly usable protective mechanisms to ensure that each user group can access only precisely defined parts and sections of the database.

UDS/SQL checks the user’s access rights before requests to the database are actually executed.

  • Simultaneous data access by many users

UDS/SQL permits application-independent data to be accessed by large numbers of users simultaneously. Their requests are “time interleaved” for processing to optimize overall throughput.

UDS/SQL also contains functions that prevent users from hindering each other when they contend for access to the same record.

  • Central security concept

The security concept of UDS/SQL includes precautions to protect the data resources against destruction or loss. Data resources which have been destroyed can be restored to the most recent consistent status.

  • Support for mirrored disks

UDS/SQL supports DRV (Dual Recording by Volume). When DRV is used, the operating system writes data to two disks simultaneously. This ensures increased avail- ability and reliability since, even if one of the disks fails, all the data is still consistent, up-to-date and available to the applications.

  • Support for the BS2000 access method FASTPAM

UDS/SQL supports the BS2000 access method FASTPAM, which provides a highly efficient means of accessing files and realms of the database.

  • Support for uninterrupted time conversions

Support for uninterrupted time conversions ensures the continuous and uninterrupted operation of UDS/SQL during seasonal conversions of the local time, e.g. when converting from Central European Daylight Saving Time (MESZ) to Central European Time (MEZ).

Page 43 of the Fujitsu UDS/SQL V2.5 user manual — 3.1 Data modeling
Page 43 · click to enlarge
Page 43

3 Designing the database

In order to design a database with product-specific language resources, it is first necessary to make a precise and detailed analysis of the data items, their interrelationships, their inter- dependencies and the specific user requirements. This analysis should be performed as thoroughly and as carefully as possible because it is of crucial importance for all subse- quent work. Design errors are known to entail the most far-reaching consequences because correcting them at a later time involves a lot of effort and expense.

3.1 Data modeling

For data modeling, there are a wide range of models and aids available, the most important of which include the Entity Relationship Model (ERM) and Structured Analysis (SA).

For example, a data dictionary can be used to acquire and administer the data collected. Literature and training programs provide substantially more detailed information on data analysis and design than can practicably be included in a product-specific manual.

Basically, the analysis includes the following steps:

– Delimiting the microcosm from the real world

The first step is to define the microcosm, i.e. the section of the real world on which the data model is to be based, so that the requirements can be implemented in data- processing procedures.

The objective of information analysis is to study the data items and information of the microcosm, as well as the interrelationships of the data items.

This analysis documents what data is required by the individual applications and in what order.

– Information analysis · – Function analysis

Page 44 of the Fujitsu UDS/SQL V2.5 user manual — Designing the database
Page 44 · click to enlarge
Page 44

Data modeling Database design

The analytical process yields a model which describes the designated section of the real world in such a way that the data can be administered with a database system. The data is complete, consistent and available in normalized form. The type of relationships existing between the data items is defined, e.g. a 1:n relationship between customer and order.

The logical structure of the data is also called the conceptional schema. The conceptional schema is an important basis for further work, both for database designers and for specialized departments. The conceptional schema represents the data items and their interrelationships without defining the data model in which the described structure is mapped.

After a conceptional schema has been developed, it is necessary to consider how the data is to be distributed in databases and on different systems.

Page 45 of the Fujitsu UDS/SQL V2.5 user manual — 3.2 Distributing the data
Page 45 · click to enlarge
Page 45

Database design Database distribution

3.2 Distributing the data

The data resources may be distributed over several databases, e.g., a personnel database for the accounting department, a customer database for the order-processing department, etc. The databases can be operated by one or more database handlers (DBHs). Databases may also be distributed over different systems.

In dividing data resources, it is advisable to take the following aspects into account:

– Links between the applications – Organizational circumstances – Requirements for availability and throughput

Page 46 of the Fujitsu UDS/SQL V2.5 user manual — AP1 AP2 AP3
Page 46 · click to enlarge
Page 46

Database distribution Database design

One DBH - multiple databases

This constellation is also referred to as multi-DB operation. Many application programs work with two or more databases simultaneously. An application program (AP) may access several databases within a single transaction. The DBH controls the processing of the databases and ensures the consistency of all the data resources.

The databases that are operated by a DBH are part of a database configuration.

AP1 AP2 AP3

DB1 DB2 DB3 DB1 DB3 DB1

DBH

AP1 AP2 AP3 AP1 AP1 AP3

DB1 DB2 DB3

Figure 6Multi-DB operation

Reasons for distributing data over multiple databases:

– Data that is used only at certain times or for certain tasks can be stored in a separate database, which need not be connected the whole time.

– A large-scale database project is more easily implemented by gradually developing additional databases.

Configuration

Page 47 of the Fujitsu UDS/SQL V2.5 user manual — Distributing the data
Page 47 · click to enlarge
Page 47

Database design Database distribution

Multiple DBHs - multiple databases

Multi-DB operation is also possible with databases belonging to other configurations. Other configurations may be located on another host in a homogeneous BS2000 network (see figure 7) or on the same host (see figure 8). The UDS/SQL supplementary product UDS-D is required for operation with multiple database handlers (see the “Database Operation” manual). With UDS-D, a COBOL or CALL DML application program, but not an SQL program, can access databases from two or more different configurations within a single transaction, without requiring any infor- mation on the location of the databases accessed. This means that multi-DB operation can be extended to include UDS-D operation without any changes to existing application programs.

Inter-configuration consistency of all databases is maintained at all times during processing. UDS-D also provides inter-configuration deadlock detection and resolution.

The following diagrams show the additional options provided by UDS-D, which are to be understood as an addition to figure 6.

Fujitsu UDS/SQL V2.5 — Distributing the data diagram (page 47)
Fig. 2 · Distributing the data
Figure 7Accessing databases on remote computers
Page 48 of the Fujitsu UDS/SQL V2.5 user manual — Distributing the data
Page 48 · click to enlarge
Page 48

Database distribution Database design

Reasons for distributing databases among several computers within a network:

Work processes can be optimized for the local computer center, and data storage can be adapted even better to the organization of the company.

When distributed databases are used, the data resources are more easily available since especially important and frequently used data can be stored in more than one system, and the copies coupled together. If the backups are stored at different locations and one of the systems fails, the data can still be accessed in other systems.

Costs are cut when fewer data stations require a continuous link to the central computer center. Most of the data required can be accessed locally; only occasionally is it necessary to access remote data.

Fujitsu UDS/SQL V2.5 — Distributing the data diagram (page 48)
Fig. 3 · Distributing the data
Figure 8Accessing databases in another configuration within the same host

– Adaptability · – Availability · – Reduced cost

Page 49 of the Fujitsu UDS/SQL V2.5 user manual — Distributing the data
Page 49 · click to enlarge
Page 49

Database design Database distribution

Reasons for having two or more configurations on a single host:

– Improved performance – Greater mutual independence of applications – Separate administration – Separate accounting – Separate spheres of responsibility

Page 50 of the Fujitsu UDS/SQL V2.5 user manual — 3.3.1 Defining the logical structure of a UDS/SQL database
Page 50 · click to enlarge
Page 50

Technical implementation Database design

3.3 Technical implementation

3.3.1 Defining the logical structure of a UDS/SQL database

The logical structure of a UDS/SQL database, i.e. the UDS/SQL schema, can be defined on the basis of either the CODASYL concept or the relational concept.

In a CODASYL database, data relationships are defined via database structures. A major advantage of this concept is that the database handler automatically checks these relation- ships for consistency (referential integrity) at runtime.

The language used to define a database is the schema DDL (Data Description Language). Using the schema DDL to create a CODASYL database involves the following information objects:

– database realms – types of records – sets – keys as optimized access paths – sort procedures – set membership – set selection

For a precise description of the schema DDL, see page 53.

In a relational database, the data relationships are defined by linking values at runtime.

The components of a relational structure, i.e. tables (record types) and columns (items), are defined by means of the schema DDL.

In order to represent the relationships between tables, it is also necessary to define the primary keys of the respective tables as foreign keys in the corresponding tables. The users themselves must assign these primary and foreign keys and then check the relationships for uniqueness. Users must also check these relationships at runtime in their respective programs.

For a detailed description of the methods used to implement a conceptional schema in relational structures, you can either refer to database literature or attend courses on the subject.

CODASYL database design · Relational database design

Page 51 of the Fujitsu UDS/SQL V2.5 user manual — 3.3.3 Views
Page 51 · click to enlarge
Page 51

Database design Technical implementation

3.3.2 Defining the physical structure of a UDS/SQL database

To define the physical data structure, you use the SSL (Storage Structure Language).

The SSL is used to specify mainly:

– set information – data placement – optimization – links: internal tables, chains, lists.

The data is essentially distributed over database areas via the SSL, taking the following aspects into account:

– depending on access frequency, – according to physical storage options (disk capacity) and – according to the backup procedures used.

3.3.3 Views

With the subschema DDL, the user selects sections from the database which are required for a particular application.

For a detailed description of the subschema DDL, see page 183.

A relational schema is used in an SQL application. A relational schema is the relational view of an actual subschema. Such a view can be derived from a subschema with the aid of the utility BPSQLSIA.

For further information on the relational schema, see page 196.

Subschema · Relational schema

Page 52 of the Fujitsu UDS/SQL V2.5 user manual — Defining the physical structure of a UDS/SQL database
Page 52 · click to enlarge
Page 52

Technical implementation Database design

Page 53 of the Fujitsu UDS/SQL V2.5 user manual — 4.1 Introduction
Page 53 · click to enlarge
Page 53

4 Schema DDL

4.1 Introduction

Before you start designing a UDS/SQL schema, it is first necessary to thoroughly analyze the intended database applications and the information which is to processed by them. The analysis must yield not only all the information required, but the relationships between the information as well.

The data structure thus derived is translated into a UDS/SQL schema by means of the schema DDL.

The UDS/SQL schema must define all data required for the tasks to be performed using the database. However, the UDS/SQL schema has no direct user interface; user-friendly editing of the data need not be provided for when designing the UDS/SQL schema.

The CODASYL model provides the following units for defining the logical data structure:

Item The smallest unit of named data within a record type. It is defined by item type, item length and item name.

Vector Item with repetition factor. The repetition factor must be greater than 1. It defines

how many duplicates of the item the vector comprises.

Named grouping of record elements within a record type. A record element can in this case be either an item, a vector or a group item. Group items that are not repeating groups may only be defined for subschemas.

Group item with repetition factor. The repetition factor must be greater than 1. It defines how many duplicates of the group item the repeating group comprises.

Named collection of record elements and the smallest unit of data which is recog- nized by UDS/SQL via a unique identifier. A record element may be an item, a vector or a repeating group.

Set Named relationship between two record types.

Group item · Repeating group · Record type

Page 54 of the Fujitsu UDS/SQL V2.5 user manual — Schema DDL
Page 54 · click to enlarge
Page 54

Realm Named physical subdivision of the database. Management unit for data privacy and

security as well as for handling concurrent accesses.

The language elements of the DDL which are used to define the data units are described on page 55 through page 70.

The notational convention are explained on page 22, and the general syntax rules are summarized on page 233.

You compile the Schema DDL with the DDL compiler. For information on operating the DDL compiler, please refer to the “Creation and Restructuring” manual, Compiling the Schema DDL).

Introduction Schema DDL

Page 55 of the Fujitsu UDS/SQL V2.5 user manual — DATABASE-KEY-LONG
Page 55 · click to enlarge
Page 55

Schema DDL Defining an item

4.2 Defining an item

An “item” is the smallest unit of data within a record type that can be assigned a name by means of the schema DDL. “Item” also stands for all the values which can be assumed by the item. The particular value contained in an item is referred to as item content. The entirety of all possible item contents is known as the value range of the item.

Defining an item basically means defining an item’s value range. The item description also determines the physical form of storage of an item content.

numeric alphanumeric database key

un- packed packed binary DATABASE-KEY

DATABASE-KEY-LONG

fixed length variable length

Figure 9Item types

figure 9 shows the various possibilities of physical storage for the contents of an item.

item · national

Page 56 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.1 Defining an unpacked numeric item
Page 56 · click to enlarge
Page 56

Defining an item Schema DDL

4.2.1 Defining an unpacked numeric item

[level-number ]item-name PICTURE IS mask-string.

Unpacked items can contain numeric values only. They can be used for arithmetic opera- tions and can be printed out.

level-number specifies whether the item is part of a repeating group:

If the item is not to be part of a repeating group, the specified level number should be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item. If the item is to be part of a repeating group, proceed as described on page 66.

The default value for level-number is 1.

item-name specifies the name assigned by the user.

mask-string defines the item value range, i.e. the symbolic representation of all possible item contents, by means of a mask. mask-string may consist of the following symbols:

Mandatory, if positive and negative item contents are to be distinguished. If S is not specified, UDS/SQL assumes the item content to be a positive numeric value. This symbol is specified once only at the beginning of the mask string.

is the only symbol of the mask specifying a physical storage location. This storage location can be filled with a decimal digit. The digit symbol can be repeated any number of times. The frequency of repetition determines the item length

Table 4Symbols of mask-string when defining an unpacked numeric item (part 1 of 2)

Symbol Designation Explanation · S Sign symbol · 9 Digit symbol

Page 57 of the Fujitsu UDS/SQL V2.5 user manual — P
Page 57 · click to enlarge
Page 57

Schema DDL Defining an item

specifies the position of the decimal point for the mask defined by the digit symbols 9. Default value is V after the last digit symbol of the mask.

is specified if the decimal point is to be more than one position outside the mask defined by digit symbols 9 and cannot be specified by ”V”. P stands for a zero to be added by UDS/SQL between the mask defined by digit symbols 9 and the decimal point. P can be repeated any number of times.

P

The digit symbol 9 and the decimal point symbol P can be repeated. In order to avoid repeating the symbols, the user can add a repetition factor integer after the symbol to denote the number of times the symbol is to be repeated.

(integer) Repetition symbol

Table 4Symbols of mask-string when defining an unpacked numeric item (part 2 of 2)

You can define the item to hold up to 18 digits.

If at least one of the following assertions applies to an unpacked numeric item, the item cannot be accessed using SQL, nor can any new records of the record type involved be inserted:

– number of storage locations > 15 – scale factor < 0 – scale factor > number of storage locations

A positive scale factor specifies the number of digits to the right of the decimal point, while a negative scale factor specifies how many zeroes UDS/SQL must append to the item contents when performing calculations.

Symbol Designation Explanation · Decimal point symbol

Page 58 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.2 Defining a packed numeric item
Page 58 · click to enlarge
Page 58

Defining an item Schema DDL

4.2.2 Defining a packed numeric item

[level-number ]item-name TYPE IS FIXED REAL DECIMAL [ integer-1[,integer-2]].

Packed items can contain numeric values only. They are exclusively used as computational items by the database programmer and cannot be printed without prior editing by a DML program. Packed items require less storage space and can be processed faster than unpacked items.

level-number denotes whether the item is part of a repeating group: If the item is not to be part of a repeating group, the specified level number should be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item.

If the item is to be part of a repeating group, proceed as described on page 66.

item-name specifies the name assigned by the user.

integer-1 and integer-2 are used to describe the value range of an item, where

– integer-1 indicates the number of storage locations the item contains, the maximum being 18. Each storage location can be filled with a decimal digit. Default value for integer-1: 18

– integer-2 specifies the position of the decimal point. This has no effect on the number of storage locations, however. If integer-2 is positive, it denotes the number of digits to the right of the decimal point; if it is negative, it signals to UDS/SQL how many zeros it is to append to the item contents when performing calculations. It follows that if integer-2 is m, specification of integer-2 means a multiplication of the item contents by 10-m. Default value for integer-2: 0

If at least one of the following assertions applies to an unpacked numeric item, the item cannot be accessed using SQL, nor can any new records of the record type involved be inserted:

– number of bytes of storage > 15 – scale factor < 0 – scale factor > number of bytes of storage

A positive scale factor specifies the number of digits to the right of the decimal point, while a negative scale factor specifies how many zeroes UDS/SQL must append to the item contents when performing calculations.

Page 59 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.3 Defining a binary item
Page 59 · click to enlarge
Page 59

Schema DDL Defining an item

4.2.3 Defining a binary item

⎧15⎫ [level-number ]item-name TYPE IS FIXED REAL BINARY[ ⎨ ⎬]. ⎩31⎭

Binary items can contain integers only. They are used exclusively as computational items by the database programmer and cannot be printed without prior editing by a DML program. Binary items require less storage space and can be processed faster than packed or unpacked items.

If BINARY 15 items are not aligned to halfwords and BINARY 31 items are not aligned to words by the user, UDS/SQL aligns them automatically.

level-number denotes whether the item is part of a repeating group:

If the item is not to be part of a repeating group, the specified level number should be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item.

If the item is to be part of a repeating group, proceed as described on page 66.

item-name specifies the name assigned by the user.

BINARY 15 is used to define a binary item with a value range of -215 through 215-1.

BINARY 31 is used to define a binary item with a value range of -231 through 231-1.

If you do not specify a number, the default value BINARY 15 is assumed.

Page 60 of the Fujitsu UDS/SQL V2.5 user manual — A
Page 60 · click to enlarge
Page 60

Defining an item Schema DDL

4.2.4 Defining an alphanumeric item of fixed length

⎧PICTURE IS mask-string ⎫ [level-number ]item-name ⎨ ⎬. ⎩TYPE IS CHARACTER integer⎭

Alphanumeric items can contain any type of character.

level-number denotes whether the item is part of a repeating group: If the item is not to be part of a repeating group, the specified level number should be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item. If the item is to be part of a repeating group, proceed as described on page 66.

item-name specifies the name assigned by the user.

mask-string may consist of the following symbols:

stands for a storage location containing any character of the character set.

stands for a storage location containing a letter or a blank. UDS/SQL does not distinguish between A and X however.

A

stands for a storage location containing a digit. 9 may not stand to the left of A or X.

Each of the X, A or 9 symbols can be repeated. To do this, the user can either write the symbols the desired number of times or add a repetition factor integer after the symbol to denote the number of times the symbol is to be repeated. The default value is 1; the maximum value is 18 for 9 and 255 for X and A.

(integer) Repetition symbol

Table 5Symbols of mask-string when defining an alphanumeric item of fixed length

The first symbol in a mask string must be A or X. (A mask string beginning with 9 defines a numeric item.)

The item can be defined for a maximum of 255 characters. The digit symbol may not be repeated more than 18 times and the mask string may consist of no more than 30 characters.

Symbol Designation Explanation · 9 Digit symbol

Page 61 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.5 Defining an alphanumeric item of variable length
Page 61 · click to enlarge
Page 61

Schema DDL Defining an item

integer specifies the number of storage locations the item contains, each storage location being able to contain one character of the character set.

4.2.5 Defining an alphanumeric item of variable length

⎧PICTURE IS LX(integer) ⎫ [level-number ]item-name-1 ⎨ ⎬ ⎩TYPE IS CHARACTER integer⎭

DEPENDING ON item-name-2.

Alphanumeric items of variable length can contain any type of character.

level-number denotes whether the item is part of a repeating group. As items of variable length may not be part of a repeating group, the specified level number must be the smallest level number in the whole record type.

item-name-1 specifies the name assigned by the user.

integer specifies the maximum length of the variable-length item, i.e. it denotes the maximum number of storage locations, where each storage location can contain any character of the character set. The value specified for integer must be > 0.

item-name-2 specifies the name of an item that must have been defined immediately before the variable item as a binary item with a value range of 0 through 215-1. Before storing or updating a record containing a variable item, the database programmer must specify the current length of the variable item in the item-name-2 item. This (current) length may also be 0, in which case, neither the variable item nor the record length item are stored in the database.

Depending on which page length has been defined for the database, the maximum length of a record with a variable item must not exceed the following values:

– 2012 bytes for a 2048-byte page length (2-Kbyte page format) – 3960 bytes for a 4000-byte page length (4-Kbyte page format) – 8056 bytes for a 8096-byte page length (8-Kbyte page format)

The maximum length of a record containing a variable item could, however, also be somewhat lower, depending on the connection data for the record (see “SCD” on page 219).

Page 62 of the Fujitsu UDS/SQL V2.5 user manual — Defining an alphanumeric item of variable length
Page 62 · click to enlarge
Page 62

Defining an item Schema DDL

Since the record must also contain at least the record length item item-name-2 in addition to the variable item, the maximum length of the variable item is equal to:

– 2010 bytes for a 2048-byte page length – 3958 bytes for a 4000-byte page length – 8054 bytes for a 8096-byte page length

If the record includes other items besides the variable item and the record length item, the maximum length of the variable item decreases accordingly.

Furthermore, the following restrictions apply for variable items:

– There may be only one variable item for each record type; it must also be the last item.

– A variable-length item may not be defined as a key item, nor used for direct access to records.

– A record type containing a variable item may not be restructured by means of subschema DDL. It must be taken over into the subschema as defined by the schema DDL.

– A record type containing an item of variable length cannot be addressed with SQL.

RECORD NAME IS ARTICLE MASTER DATA-ITEM-1 TYPE IS LENGTH-ITEM TYPE IS BINARY 15. ARTICLE-INFO PICTURE IS LX(500) DEPENDING ON LENGTH ITEM.

Example

Page 63 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.6 Defining a national item (UTF-16)
Page 63 · click to enlarge
Page 63

Schema DDL Defining an item

4.2.6 Defining a national item (UTF-16)

Detailed information is provided in the COBOL2000 “Language Reference Manual” under “Character representation by UTF-16”.

[level-number ]item-name PICTURE IS mask-string.

National items can be filled with any characters.

level-number specifies whether the item is part of a repeating group: If the item is not part of a repeating group, the specified level number must be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item. If the item is part of a repeating group, proceed as described on page 66.

item-name specifies the name assigned by the user.

mask-string may consist of the following symbols:

N stands for a storage location containing any character of the character set.

You can repeat the symbol N by writing it the desired number of times or by adding a repetition factor integer after the symbol to denote the number of times the symbol is to be repeated. The default value is 1; the maximum value is 127.

(integer) Repetition symbol

Table 6Symbols of the mask-string when defining a national item

The first symbol in a mask string must be N. The mask string may consist of no more than 30 characters.

integer specifies the number of storage locations the item contains, each storage location being able to contain one character of the character set.

A national character occupies 2 bytes and is aligned to the byte boundary in data structures (see the COBOL2000 “Language Reference Manual” under “Character representation by UTF-16”).

Symbol Designation Explanation

Page 64 of the Fujitsu UDS/SQL V2.5 user manual — 4.2.7 Defining a database key item
Page 64 · click to enlarge
Page 64

Defining an item Schema DDL

4.2.7 Defining a database key item

⎧DATABASE-KEY. ⎫ [level-number ]item-name TYPE IS ⎨ ⎬ ⎩DATABASE-KEY-LONG.⎭

Database key items are binary items that are intended for storing database key values. At the same time, they are the only items whose contents are interpreted by UDS/SQL as database key values.

Database key items must be defined by the database programmer if the database key values are not implicitly defined by UDS/SQL (see section “Assignment of database key values by the user” on page 85).

level-number denotes whether the item is part of a repeating group: If the item is not to be part of a repeating group, the specified level number should be the smallest level number in the whole record type. This is especially important if the item is to be used as a key item.

If the item is to be part of a repeating group, proceed as described on page 66.

A database key item can be defined as an item of type DATABASE-KEY or DATABASE-KEY-LONG:

– A DATABASE-KEY item is a binary item of 4-byte length with a value range from 0 - 231-1.

– A DATABASE-KEY-LONG item is a binary item of 8-byte length with a value range from 0 - 263-1. Note that the bit positions 17 - 32 (from the left) are not evaluated by UDS/SQL.

The structure of database key values is described in detail on page 132.

A database key item must be supplied with values by the database programmer.

This allows the database programmer to independently define the database key value used by UDS/SQL (see LOCATION MODE clause on page 85). Note, however, that the content of the database key item need not always match the value used internally by UDS/SQL for the database key of the record.

Page 65 of the Fujitsu UDS/SQL V2.5 user manual — 4.3 Defining a vector
Page 65 · click to enlarge
Page 65

Schema DDL Defining a vector

4.3 Defining a vector

⎧PICTURE ⎫ [level-number ]vector-name ⎨ ⎬ OCCURS integer TIMES. ⎩TYPE ⎭

A vector is an item with a repetition factor. The repetition factor must be greater than 1. It denotes how many duplicates of the item are grouped into the vector.

A vector is defined in the same way as an item as described on page 55.

integer specifies the repetition factor.

Items of variable length and key items may not be declared vectors.

level-number denotes whether the vector is part of a repeating group: If the vector is not to be part of a repeating group, the specified level number must be the smallest level number in the whole record type.

If you want to declare the vector to be part of a repeating group, proceed as described on page 66.

The limit is the maximum record length.

02 CUST-ADDRESS PICTURE IS X(20) OCCURS 2 TIMES.

Example

Page 66 of the Fujitsu UDS/SQL V2.5 user manual — 4.4 Defining a repeating group
Page 66 · click to enlarge
Page 66

Defining a repeating group Schema DDL

4.4 Defining a repeating group

[level-number-1 ]group-item-name OCCURS integer TIMES.

⎧ ⎧PICTURE ⎫ ⎫ ⎨level-number-2 record-element-name[ ⎨ ⎬][ OCCURS ].⎬... ⎩ ⎩TYPE ⎭ ⎭

A group item is a named grouping of record elements within a record type. A record element can in this case be either an item, a vector or even a group item.

A repeating group is a group item with repetition factor. The repetition factor must be greater than 1. It defines how many duplicates of a group item the repeating group comprises.

The definition of group items that are not repeating groups is only useful for subschemata and is therefore not possible using the schema DDL.

group-item-name specifies the user-assigned name of the repeating group.

integer denotes the repetition factor.

record-element-name specifies the record element that is to become part of the repeating group. It must be defined as described on page 55 if it is an item, as described on page 65 if it is a vector or as described on this page if it is a repeating group.

level-number-2 must be greater than level-number-1.

The following applies for all record elements that are to become part of a repeating group: Record elements must have the same level number if they have the next higher repeating group in common.

A hierarchy of repeating groups may not exceed three levels.

If one record element is a vector, only two more hierarchy levels are allowed.

The limit is the maximum record length.

If you want to use elementary items of a repeating group as key items, you must bear in mind that in each case the first variant of the higher-ranking repeating group is taken as a basis and that this may be continued recursively up to the outer repeating group.

Page 67 of the Fujitsu UDS/SQL V2.5 user manual — ADDRESSES
Page 67 · click to enlarge
Page 67

Schema DDL Defining a repeating group

01 ADDRESSES OCCURS 2 TIMES. 02 CUST-ADDRESS PICTURE IS X(20) OCCURS 2 TIMES. 02 TEL PICTURE IS X(12).

ADDRESSES

CUST-ADDRESS CUST-ADDRESS

TEL TEL

Figure 10Items and vectors grouped to form a repeating group
Show 4 more labels / short text on this page
Example · Repeating group · Vectors · Items
Page 68 of the Fujitsu UDS/SQL V2.5 user manual — 4.5 Grouping record elements to form a record type
Page 68 · click to enlarge
Page 68

Grouping to form a record type Schema DDL

4.5 Grouping record elements to form a record type

RECORD NAME IS record-name. . . ⎧ ⎧PICTURE ⎫ ⎫ ⎨[level-number ]record-element-name[ ⎨ ⎬][ OCCURS ].⎬... ⎩ ⎩TYPE ⎭ ⎭

A record type is a named collection of record elements. A record element may be an item, a vector or a repeating group.

A single occurrence of a record type is a record. A record thus consists of one item content each of all the items represented in the record type.

A record type is also the smallest unit of data recognized by UDS/SQL by means of a unique identifier - the database key. All record elements therefore have to be defined as parts of record types.

record-name specifies the name of the record type assigned by the user.

record-element-name specifies the record element which is to become part of the record type. It must be defined as described on page 55 through page 65.

The total length of all record elements within a record type must not exceed the maximum record length. Depending on which page length was defined for the database, the maximum record length may be:

– 2020 bytes for a 2048-byte page length (2-Kbyte page format) – 3968 bytes for a 4000-byte page length (4-Kbyte page format) – 8064 bytes for a 8096-byte page length (8-Kbyte page format)

The maximum record length could, however, also be somewhat lower, depending on the connection data for the record (see “SCD” on page 219).

The following applies to the maximum number of record types per database:

– A maximum of 253 record types can be defined in the schema of a database with a page length of 2048 bytes.

– A maximum of 32 766 record types can be defined in the schema of a database with a page length of 4000 or 8096 bytes.

Page 69 of the Fujitsu UDS/SQL V2.5 user manual — ADDRESSES
Page 69 · click to enlarge
Page 69

Schema DDL Grouping to form a record type

RECORD NAME IS CUSTOMER . . . 01 C-NO PICTURE IS 9(10). 01 C-NAME PICTURE IS X(20). 01 ADDRESSES OCCURS 2 TIMES. 02 CUST-ADDRESS PICTURE IS X(20) OCCURS 2 TIMES. 02 TEL PICTURE IS X(12).

ADDRESSES

CUST-ADDRESS CUST-ADDRESS

TEL TEL

Figure 11Grouping of items and a repeating group to form a record type
Show 5 more labels / short text on this page
Example · CUSTOMER Record type · Repeating group · Vectors · Items C-NO C-NAME
Page 70 of the Fujitsu UDS/SQL V2.5 user manual — 4.6.1 Defining a set
Page 70 · click to enlarge
Page 70

Linking record types Schema DDL

4.6 Linking the records of two record types to form a set

UDS/SQL depicts the relationships and interdependencies of information existing in a corporate organization and a planned database application as relationships between record types using the set concept.

In a relational application, the definition of set relationships causes foreign keys to be assigned appropriately. This is the prerequisite for linking tables (join).

A maximum of 32 766 sets can be defined per database.

For each record type which is owner of a set you can generate a maximum of 255 tables in these sets. A table is created when the set mode pointer array or list or chain is of the type sorted indexed, also for each secondary key in these sets.

Irrespective of this you may define up to 255 secondary keys per record type on record type level and per singular set on set level; hash routines are not counted here.

4.6.1 Defining a set

SET NAME IS set-name. . . OWNER IS record-name-1. MEMBER IS record-name-2

A set is a named relationship between two record types. It is a hierarchic relationship in which one record type is defined as higher-ranking, the other lower-ranking.

The higher-ranking record type is called the owner of the set. record-name-1 specifies the name of the record type which is to be the owner.

The lower-ranking record type is called a member of the set. record-name-2 specifies the name of the record type which is to be a member of the set.

set-name specifies the name of the set relationship between two record types and is assigned by the user.

An individual occurrence of a set is known as a set occurrence. A set occurrence consists of exactly one owner record and any number of lower-ranking member records. In other words, a set consists of as many set occurrences as the owner record type has records. An owner without a member is referred to as an empty set occurrence.

Page 71 of the Fujitsu UDS/SQL V2.5 user manual — Linking the records of two record types to form a set
Page 71 · click to enlarge
Page 71

Schema DDL Linking record types

Sets and set occurrences are represented according to the following principle:

Owner record Owner record Owner record Owner record 1 type 2 3

Set Set occurrence Empty Set occurrence Set occurrence

Member rec. 3

Member rec. 2

Member record Member Member rec. 1

Figure 12Representation of a set and its set occurrences

figure 12 shows all the owner record types, i.e. all set occurrences of a set. However only member records that are part of a set occurrence are shown.

The member records form a logical sequence within a set occurrence. The sequence is represented by arrows pointing from one member record to the corresponding successor.

record 4 type

Page 72 of the Fujitsu UDS/SQL V2.5 user manual — ARTICLES ARTICLES ARTICLES AVAILABLE
Page 72 · click to enlarge
Page 72

Linking record types Schema DDL

RECORD NAME IS SUPPLIER

. . . RECORD NAME IS ARTICLE

. . . SET NAME IS ARTICLES-AVAILABLE

. . . OWNER IS SUPPLIER. MEMBER IS ARTICLE

ARTICLES ARTICLES ARTICLES AVAILABLE

AVAILABLE AVAILABLE

Figure 13Set and set occurrences as defined above
Show 5 more labels / short text on this page
Example · SUPPLIER Taylor Moore · Lager · Bitter · ARTICLE Cocoa Stout
Page 73 of the Fujitsu UDS/SQL V2.5 user manual — Linking the records of two record types to form a set
Page 73 · click to enlarge
Page 73

Schema DDL Linking record types

A record type can be part of several sets. This makes the set the basic unit in network-like data structures.

Figure 14Network-like data structure

Relationships between record types

There are three possible types of relationships between record types that are to be linked:

– 1:n relationship between two record types – m:n relationship between two record types – m:n relationship within one record type

1:n relationship

If relationships between records are to be represented in a set, the following rule must be observed: A record may be a member of no more than one set occurrence in any set in which it is a member record, i.e. within a set, a member record is assigned to no more than one owner record. An owner record may, however, have more than one member record associated with it.

Thus a 1:n relationship must exist between owner record type and member record type.

Page 74 of the Fujitsu UDS/SQL V2.5 user manual — RADIO LAMP
Page 74 · click to enlarge
Page 74

Linking record types Schema DDL

Example of a 1:n relationship

The relationship between customers and their orders is a 1:n relationship. A customer can place several orders, but each order can only be placed by one customer.

ORDER: 1 CUST.: ADAM

ORDER4 CUST.: ERIC ORDER: 3 CUST.: ERIC ORDER: 2 CUST.: ERIC

RADIO LAMP

LAMP CLOCK RADIO

KETTLE RADIO

30 1 CLOCK LAMP KETTLE

CUSTOMER

ADAM

ERIC

CUSTOMER

ORDERS

ORDERS 1

Figure 151:n relationship between CUSTOMER and ORDERS

The logical relationship is created by defining the set CUSTOMER-ORDERS for the record types to be associated.

100 5 10

Page 75 of the Fujitsu UDS/SQL V2.5 user manual — Linking the records of two record types to form a set
Page 75 · click to enlarge
Page 75

Schema DDL Linking record types

m:n relationship between two record types (many-to-many relationship)

An m:n relationship is a relationship in which a member record can be associated with more than one owner record.

If m:n relationships are to be represented, they have to be broken down into two 1:n relation- ships. To this purpose a new record type (auxiliary record type) has to be defined which acts as member record type. After the relationship has been resolved, each member record has an owner.

Example of an m:n relationship

An example of an m:n relationship is the relationship between orders and articles. An order can refer to several articles, an article can be referred to in several orders.

Page 76 of the Fujitsu UDS/SQL V2.5 user manual — ORDER: 3 CUST.: ERIC KETTLE RADIO
Page 76 · click to enlarge
Page 76

Linking record types Schema DDL

ORDER: 1 CUST.: ADAM RADIO LAMP

ORDER2 CUST.: ERIC LAMP CLOCK RADIO 1 5

ORDER: 3 CUST.: ERIC KETTLE RADIO

ORDER: 4 CUST.: ERIC CLOCK LAMP KETTLE

ARTICLE

ORDERS

ARTICLE-ITEM ORDER-ITEM

ITEM

ORDER 1 ORDER 2 ORDER 3 ORDER 4

QTY: 2 ORDER-

ORDERQTY: 100 ORDER-

ORDER-

QTY: 5

QTY: 30

ARTICLE-NAME:

ARTICLE-NAME:

CLOCK ARTICLE-NAME:

ARTICLE-NAME:

RADIO

LAMP

KETTLE

Figure 16m:n relationship between ORDERS and ARTICLE

100 5 10

Page 77 of the Fujitsu UDS/SQL V2.5 user manual — Linking the records of two record types to form a set
Page 77 · click to enlarge
Page 77

Schema DDL Linking record types

The m:n relationship between ORDERS and ARTICLE is resolved to form two 1:n relation- ships by creating a new record type (auxiliary record type) ITEM which is a member of both ORDERS and ARTICLE.

m:n relationship within one record type (parts list processing)

In this special case the m:n relationship is not between two record types, but exists within one record type.

This type of relationship is resolved by defining a new record type (auxiliary record type) which acts as a member, and defining a new set.

Example of an m:n relationship within one record type

An (assembled) part is made up of several subparts: → parts list

A subpart is used in several (assembled) parts: → where-used list

A bicycle is made up of several parts. Parts used for the bicycle are again in other parts of the bike.

Page 78 of the Fujitsu UDS/SQL V2.5 user manual — QTY. SUBPART PART-LIST PART
Page 78 · click to enlarge
Page 78

Linking record types Schema DDL

QTY. SUBPART PART-LIST PART

QTY. SUBPART PART-LIST PART QTY. SUBPART PART-LIST PART

BICYCLE 1 1 2 1 1 2

WHEEL TIRE 1 1

HANDLEBAR FRAME WHEEL BELL LAMP FENDER

RIM SPOKE TIRE

CASING TUBE

PARTS

USED-IN PARTS-LIST

ASSEMBLY

HANDLE-

TUBE BICYCLE FRAME WHEEL RIM SPOKE TIRE CASING

BAR

Figure 17m:n relationship within the record type PARTS
Page 79 of the Fujitsu UDS/SQL V2.5 user manual — OPTIONAL
Page 79 · click to enlarge
Page 79

Schema DDL Linking record types

4.6.2 Defining the type of membership of records in a set

⎧MANDATORY⎫ ⎧AUTOMATIC⎫ MEMBER IS record-name ⎨ ⎬ ⎨ ⎬ ⎩OPTIONAL ⎭ ⎩MANUAL ⎭

The records of a member record type do not automatically have to be members in a set occurrence. The type of membership of a record in a set can be defined under two aspects:

1. At which point is the record to be inserted in the set occurrence?

AUTOMATIC

The member record is automatically inserted in the set occurrence at storage time (see the “Application Programming” manual, STORE).

MANUAL

The member record is not automatically inserted in the set occurrence at storage time. Membership in the set occurrence only takes effect when a specific DML statement is entered (see the “Application Programming” manual, CONNECT).

2. What type of link is to exist between an existing member and an owner?

MANDATORY

The link is fixed. A member record can only exist in connection with an owner record. In this case, membership in a set occurrence can only be released by making the member record a member of another set occurrence of the same set or by deleting it from the database (see the “Application Programming” manual, MODIFY and ERASE).

OPTIONAL

The link can be established or released by the database programmer (see the manual “Application Programming”, CONNECT and DISCONNECT). A member can be released from a set occurrence without the member record being deleted.

Page 80 of the Fujitsu UDS/SQL V2.5 user manual — CUSTOMER
Page 80 · click to enlarge
Page 80

Linking record types Schema DDL

CUSTOMER

CUSTOMER-ORDERS-PLACED

(OPTIONAL AUTOMATIC)

CUSTOMER-

ORDER

Figure 18Example of OPTIONAL AUTOMATIC

The link between a CUSTOMER-ORDER record and a CUSTOMER record is relatively stable. An order only exists if a customer has placed one. The link to the owner record is thus automatic at the time the CUSTOMER-ORDER record is stored. Filled orders are to remain in the database for statistical purposes even when the link to the CUSTOMER record no longer exists. This is why the set membership is defined as OPTIONAL.

Example 1

Page 81 of the Fujitsu UDS/SQL V2.5 user manual — PROJECT
Page 81 · click to enlarge
Page 81

Schema DDL Linking record types

The MANUAL option is used if, for example, a record type is a member type of two sets and some of its member records are to belong to one set occurrence only.

PROJECT

EMPLOYEES

HEAD (OPTIONAL MANUAL)

EMPLOYEE

Figure 19Example of membership in two parallel sets

This example illustrates how project heads can be selected from all employees working on a project by using a set. As not all employees working on a project can be project heads, this set must be defined as MANUAL. An employee is taken over into the corresponding set occurrence only when he or she becomes head of a project. If the set is defined as OPTIONAL, the employee can be deleted from the set once no longer head of the project.

Example 2

Page 82 of the Fujitsu UDS/SQL V2.5 user manual — MANUAL
Page 82 · click to enlarge
Page 82

Linking record types Schema DDL

The MANUAL option is used in cyclic data structures, i.e. a number of record types are connected in such a way that each record type is at the same time owner of one set and member in another.

MANUAL

AUTOMATIC AUTOMATIC

Figure 20Type of set membership in a cycle

If all sets of a cycle were defined as AUTOMATIC, it would be impossible to store a record of this cycle in the databases, as the AUTOMATIC option requires that the owner of a record to be stored already exists in the database.

Example 3

Page 83 of the Fujitsu UDS/SQL V2.5 user manual — ORDERS ARTICLE
Page 83 · click to enlarge
Page 83

Schema DDL Linking record types

In order to resolve a many-to-many relationship, it is necessary to define an auxiliary record type. This requires the following types of set membership:

ORDERS ARTICLE

(MANDATORY AUTOMATIC)

(MANDATORY AUTOMATIC)

AUX. RECORD

TYPE

Figure 21Types of set membership in the case of a many-to-many relationship

The purpose of an auxiliary record type is to link the ORDERS records with the ARTICLE records. The link is only effected if every auxiliary record is present in each set occurrence of the two sets. This is why membership is enforced by the AUTOMATIC option.

If the auxiliary records contain no valid information once they have been released from their owner records, the link to the owner records can be retained unless the records are to be deleted. Membership can thus be specified as MANDATORY.

Example 4

Page 84 of the Fujitsu UDS/SQL V2.5 user manual — 4.7 Access paths and record sequences
Page 84 · click to enlarge
Page 84

Types of access Schema DDL

4.7 Access paths and record sequences

The user can define the following access types using DDL:

– direct access on record type level

A record is selected from all records of one record type via the content of an item or a combination of items.

– sequential access on record type level

A record is selected on the basis of its position within the logical sequence of all records of the record type.

– direct access on set level

A record is selected from all records of a set occurrence via the content of an item or a combination of items.

– sequential access on set level

A record is selected on the basis of its position within the logical sequence of all records of one set occurrence.

The following describes:

– which access paths for direct accesses are a standard feature and which can be generated by the user.

– how to define the logical sequence of records if sequential processing is required.

Page 85 of the Fujitsu UDS/SQL V2.5 user manual — Direct and sequential access on record type level via database key value
Page 85 · click to enlarge
Page 85

Schema DDL Types of access

4.7.1 Direct and sequential access on record type level via database key value

The database key value is a unique internal record key assigned at the time a record is stored, and retained for the entire life of the record. The database key value is a combination of the record type identifier, the record reference number and a record sequence number (see the section “Structure of a database key value” on page 132). The order of records within a record type is according to ascending record sequence numbers.

For each record type, UDS/SQL automatically generates a table, the Database Key Trans- lation Table (DBTT), which contains the physical addresses (page numbers) of all records of one record type (see section “DBTT (Database Key Translation Table)” on page 131). UDS/SQL obtains the physical address of a record in the DBTT by converting the record’s database key value; it does not have to sequentially scan the DBTT.

Thus the database key represents a means of directly and sequentially accessing data on record type level.

As a standard feature, the database key values are assigned by UDS/SQL. In this case, the order of records is not usually predictable when sequential processing is applied: If the database programmer stores the database key values, he or she can determine the order in which the records are stored. This requires the following provisions:

Assignment of database key values by the user

⎧ ⎧IN⎫ ⎫ ⎧DIRECT ⎫ item-name ⎨ ⎬ record-name LOCATION MODE IS ⎨ ⎬ ⎨ ⎩OF⎭ ⎬ ⎩DIRECT-LONG⎭ ⎩identifier ⎭

If this clause is specified, the database programmer is not only enabled to determine the order of the records, but it is also possible to select any associated set occurrences more conveniently (see the section “Determining set occurrence selection” on page 103). If you specify this clause, you cannot insert any new records of the specified record type with SQL.

item-name specifies an item which can contain database key values. It is at the same time defined as a key item for direct access.

If LOCATION MODE IS DIRECT is specified, item-name must be defined as a DATABASE- KEY item.

Page 86 of the Fujitsu UDS/SQL V2.5 user manual — Direct and sequential access on record type level via database key value
Page 86 · click to enlarge
Page 86

Types of access Schema DDL

If LOCATION MODE IS DIRECT-LONG is specified, item-name must be defined as a DATABASE-KEY-LONG item.

record-name specifies the record type containing the database key item referred to by item-name.

identifier specifies the name of an item which is automatically generated by UDS/SQL for storing database key values. This item serves as a key item, but is not part of a record type. If you specify LOCATION MODE IS DIRECT, UDS/SQL generates the identifier item as a DATABASE-KEY item. If you specify LOCATION MODE IS DIRECT-LONG, UDS/SQL generates the identifier item as a DATABASE-KEY-LONG item.

When entering a record, the database programmer can store a database key value signi- fying the position of the record within the record sequence in the item referred to by item-name or identifier (see the section “DBTT (Database Key Translation Table)” on page 131).

If the specified database key has already been assigned, another database key that is not in use is automatically assigned by UDS/SQL.

If the database programmer does not wish to assign the database key value independently, 0 may be entered instead. This resumes the automatic assignment of database key values by UDS/SQL.

Page 87 of the Fujitsu UDS/SQL V2.5 user manual — 4.7.2 Generating additional access paths for direct access on record type level
Page 87 · click to enlarge
Page 87

Schema DDL Types of access

4.7.2 Generating additional access paths for direct access on record type level

Defining a primary key for conversion by hash routine

LOCATION MODE IS CALC[ hash-routine] USING item-name,... DUPLICATES ARE[ NOT] ALLOWED

With this clause, the user specifies the distributed storage of records on the basis of a hash routine. The storage area which you address with this routine is called the hash area. If the records are owners of a set, the corresponding set occurrences can also be conve- niently selected (see the section “Determining set occurrence selection” on page 103).

A key declared by LOCATION MODE IS CALC is referred to as a CALC key. It is the primary key for the record type. It may comprise several items (compound key).

item-name specifies the item(s) representing the key; all named items must belong to the same associated record type and may be both numeric and alphanumeric.

With the DUPLICATES ARE[ NOT] ALLOWED specification, the user determines (for a particular realm) whether UDS/SQL is to accept or reject duplicate key values.

Use hash-routine to specify the name of a module when you want to control the location of the data in the hash area yourself. If you make no entry for hash-routine, UDS/SQL uses its default hash routine. If you have specified a hash-routine, it converts your primary key to a four-byte binary number. UDS/SQL then converts the binary number to a relative page number. The page with that number generally contains the associated record (see the section “Direct CALC page” on page 210).

Page 88 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional access paths for direct access on record type level
Page 88 · click to enlarge
Page 88

Types of access Schema DDL

If you want to define a user-specific hash routine, you must observe the following register conventions:

  • Before and after running the routine, all UDS/SQL registers except Register 1 must have the same content. The hash routine is branched to by BALR 14,15; return to the UDS/SQL hash routine is effected by BR 14.
  • The following information is provided by the UDS/SQL DBH:
Register 1The address of a word containing the address of the key item

Register 2: The address of a byte containing the length of the key item.

Register 3: The address of a word containing the number of pages of the hash area assigned to this key.

Register 13: Starting with the address (Register 13) + X’0C’, 13 words are available to the user as a transaction-oriented save area for registers.

  • The UDS/SQL DBH expects the result of the hash routine in Register 1. It converts the binary number encountered there into a relative page number as follows:

– Bit 231 in Register 1 is set to 0.

– If the resulting value is less than the number of pages in the hash area (content of Register 3), this value is used as the relative page number.

– If the resulting value is greater, UDS/SQL performs the following division: content (Register 1) / content (Register 3)

The quotient of this division is used as the relative page number.

Page 89 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional access paths for direct access on record type level
Page 89 · click to enlarge
Page 89

Schema DDL Types of access

The following exemplifies the conversion of a key value into a physical address using the UDS/SQL standard hash routine.

Let the key value be 9952333 and the number of pages in the hash area be 503. This results in the following arithmetic operations:

1. Beginning from the 9952/333 left, the key value is subdivided into words (units of four bytes length).
2. An exclusive OR is F9F9F5F2 LRLR > 11111001 11111001 11110101 11110010 performed with the 00F3F3F3 LRLR > 00000000 11110011 11110011 11110011 corresponding binary LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR representation. 11111001 00001010 00000110 00000001
3. The first bit is set 01111001 00001010 00000110 00000001=790A0601 to 0 (positive).
4. The result is 790A0601 16 : 503 10 divided by the number of pages =2030700033 10 : 503 10 = 4037117 Remainder= 2 in the hash area.

The remainder gives the physical address in the form of a relative page number (see the section “Structure of a physical page address” on page 131) within the hash area.

If the user employs a user-specific hash routine, the first two operations can be replaced. UDS/SQL always performs the last two operations.

Example 1

Page 90 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional access paths for direct access on record type level
Page 90 · click to enlarge
Page 90

Types of access Schema DDL

This example shows how a user can program a user-specific hash routine.

The program replaces the first two operations of the UDS/SQL standard hash routine by a division/remainder algorithm. The entire key value is considered a positive binary number which is divided by the number of available CALC pages.

The algorithm is the same as a normal-type division, the only difference being that three digits are brought down. An example of this type of operation follows (for the sake of simplicity, in decimal numbers):

123456789013 117 6 6456 8 8789 1 10

The resulting remainder is the relative page number. It is always smaller than the number of CALC pages, i.e. after returning to the standard hash routine, the page number remains unchanged. The DBH accepts the binary value stored in Register 1 as the final result.

This hash routine gives the same results as the standard hash routine if the key value is not longer than four bytes.

Viewed logically, the hash routine BYTEHASH generates a CALC page number from a CALC key in 2 steps:

1. The order of the bytes within the CALC key is reversed.
2. The entire byte string that results is treated as a positive integer and divided by the number of CALC pages. The remainder of the division is then the CALC page number.

Example 2

Page 91 of the Fujitsu UDS/SQL V2.5 user manual — END
Page 91 · click to enlarge
Page 91

Schema DDL Types of access

Example in Assembler:

BYTEHASH CSECT READ BYTEHASH AMODE ANY BYTEHASH RMODE ANY

USING *,15 STM 4,8,12(13) LM 4,7 ALLZEROS L 8,0(0,1) LA 4,0(0,8) BCTR 4,0 LRLRLRLRLRLRLRLRLRLRLRLRLR (1) IC 5,0(0,2) LRLRLRLRLRLRLRLRLRLRLRLRLR (2) DR 6,5 LRLRLRLRLRLRLRLRLRLRLRLRLR (3) HASHBYTE SRDL 6,24

IC 7,0(4,5) D 6,0(0,3) BCT 5,HASHBYTE LR 1,6 LM 4,8,12(13) BR 14 ALLZEROS DC 4F'0'

END

(1) Register 4 always contains the address before the CALC key.

(2) Register 5 contains the index to the CALC key; the initial value is the length of the CALC key.

(3) If a zero is passed for the length of the CALC key, this division results in a P104.

Page 92 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional access paths for direct access on record type level
Page 92 · click to enlarge
Page 92

Types of access Schema DDL

Defining secondary keys for conversion by hash routine

SEARCH KEY IS item-name,... USING CALC[ hash-routine] DUPLICATES ARE[ NOT] ALLOWED

A key declared by SEARCH KEY IS... is a SEARCH key or secondary key. It may consist of more than one item (compound key).

item-name specifies the item(s) comprising the key. All items must be part of the corre- sponding record type.

DUPLICATES ARE[ NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

hash-routine denotes the name of a module which converts the secondary key to a 4-byte binary number. This binary number is subsequently converted into a relative page number by UDS/SQL. The corresponding page contains a pointer to the record (see the section “Indirect CALC page” on page 213). The hash routine does not compute the record address directly, as it is up to the user to place the record either via the primary key or by means of SSL statements.

If hash-routine is omitted, UDS/SQL uses the same standard hash routine as for conversion of the primary key. (For programming a hash routine and running the standard hash routine, refer to “Defining a primary key for conversion by hash routine” on page 87.)

More than one secondary key can be defined for one record type.

RECORD NAME IS ARTICLE . . . SEARCH KEY IS ART-NO-AVAIL, COLOR-NO-AVAIL, SIZE USING CALC SEARCH KEY IS ARTICLE-NAME USING CALC 01 ART-NO-AVAIL PICTURE IS 9(4). 01 COL-NO-AVAIL PICTURE IS 99. 01 SIZE PICTURE IS 99. 01 ARTICLE-NAME TYPE IS CHARACTER 40.

Example

Page 93 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional access paths for direct access on record type level
Page 93 · click to enlarge
Page 93

Schema DDL Types of access

Defining a secondary key for direct access via table

SEARCH KEY IS item-name,... USING INDEX [NAME IS name] DUPLICATES ARE[ NOT] ALLOWED

A key declared by SEARCH KEY IS... is a SEARCH key or secondary key. It may be made up of more than one item.

item-name specifies the item(s) comprising the key. All items must be part of the corre- sponding record type.

name specifies the name of the table. This name is referred to in the SSL statements concerning the table.

DUPLICATES ARE [NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

Based on this definition, UDS/SQL sets up a record SEARCH key table. This table contains the values of the secondary keys of all records of a record type, representing a unique reference between key value, database key value and physical address of the record. The physical address is not automatically updated, however, when the position of the record is changed. A SEARCH key table is used only for direct access to the records of a record type. It always involves several levels in order to speed up access.

Several independent secondary keys can be defined for one record type.

Page 94 of the Fujitsu UDS/SQL V2.5 user manual — 4.7.3 Determining the order of records within a set occurrence
Page 94 · click to enlarge
Page 94

Types of access Schema DDL

4.7.3 Determining the order of records within a set occurrence

Two basic concepts in determining the logical order of the member records within a set occurrence can be distinguished:

– sorting without key values, and – sorting according to primary key values

They are described in detail below.

Sorting without key values

⎧LAST ⎫ FIRST ORDER IS ⎨NEXT ⎬ PRIOR ⎩IMMATERIAL⎭

Page 95 of the Fujitsu UDS/SQL V2.5 user manual — ORDER IS LAST
Page 95 · click to enlarge
Page 95

Schema DDL Types of access

ORDER IS LAST

Specifies that the order of the member records in a set occurrence corresponds to the chronological sequence in which they are stored.

Fujitsu UDS/SQL V2.5 — ORDER IS LAST diagram (page 95)
Fig. 4
Figure 22Record sequence for ORDER IS LAST
Page 96 of the Fujitsu UDS/SQL V2.5 user manual — ORDER IS NEXT/PRIOR
Page 96 · click to enlarge
Page 96

Types of access Schema DDL

ORDER IS FIRST

Specifies the reverse order to that in which the member records were chronologically entered.

PURCH-ORDRECEIVED

12.2.81

12.2.81

13.2.81

14.2.81

PURCHASE14.2.81

ORDER

FIRST

Figure 23Record sequence for ORDER IS FIRST

ORDER IS NEXT/PRIOR

If this type of ordering is specified, the database programmer has the possibility of estab- lishing a certain order when storing the member records. The CRS (current record of set), i.e. the record of a set referred to last, is used as a reference point for positioning the record to be stored. Thus the CRS determines:

– the set occurrence, and – the position within the set occurrence.

UDS/SQL places the record to be stored:

– immediately behind the CRS if ORDER IS NEXT, or – immediately before the CRS if ORDER IS PRIOR.

If automatic selection of a set occurrence has been specified (see the section “Determining set occurrence selection” on page 103), UDS/SQL automatically makes the owner record of the set occurrence the current record of set (CRS). In this case, ORDER IS NEXT has the same effect as ORDER IS FIRST.

SUPPLIER Moore

Page 97 of the Fujitsu UDS/SQL V2.5 user manual — ORDER IS IMMATERIAL
Page 97 · click to enlarge
Page 97

Schema DDL Types of access

Sets defined with ORDER IS NEXT or ORDER IS PRIOR cannot be accessed by SQL with INSERT or UPDATE.

Fujitsu UDS/SQL V2.5 — Determining the order of records within a set occurrence diagram (page 97)
Fig. 5 · Determining the order of records within a set occurr…
Figure 24Record order if ORDER IS NEXT/PRIOR

ORDER IS IMMATERIAL

The user leaves ordering of the member records to UDS/SQL. Default values for ORDER IS IMMATERIAL are

– for the SSL specification MODE IS CHAIN: ORDER IS NEXT – for the SSL specification MODE IS LIST/POINTER ARRAY: ORDER IS LAST

Sets defined with ORDER IS IMMATERIAL cannot be accessed by SQL with INSERT or UPDATE.

Page 98 of the Fujitsu UDS/SQL V2.5 user manual — Determining the order of records within a set occurrence
Page 98 · click to enlarge
Page 98

Types of access Schema DDL

Sorting member records according to primary key values

⎧DATABASE-KEY ⎫ ORDER IS SORTED BY ⎨ ⎬ . ⎩DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED⎭ . . ⎧ASCENDING ⎫ ⎨ ⎬ KEY IS item-name,... ⎩DESCENDING⎭

ORDER IS SORTED BY DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED

Items defined as keys with this ORDER clause are primary keys of a set. UDS/SQL sorts the member records of the set occurrences according to the values of the primary key (which may consist of one or several items of a member record type) either in ASCENDING or DESCENDING order. If the key consists of several items, it is a compound key.

item-name specifies the item(s) comprising the key. When inserting new member records in a set occurrence, UDS/SQL automatically selects the position corresponding to the key value. If the user changes key values in the database, UDS/SQL automatically updates the sequence of the associated member records.

DUPLICATES ARE [NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

If DUPLICATES ARE ALLOWED is specified, member records with identical key values are sorted by database key values in ascending order.

The primary key does not only determine the sequence of the member records within a set occurrence. If, by means of SSL, a storage mode is established which causes UDS/SQL to set up a table in order to sort a set occurrence (see page 144; pointer array, list), UDS/SQL also uses the table as a direct access path.

In this case the above clause must be supplemented by INDEXED, which results in the creation of a multi-level table (see page 100).

Page 99 of the Fujitsu UDS/SQL V2.5 user manual — ORDER IS SORTED BY DATABASE-KEY
Page 99 · click to enlarge
Page 99

Schema DDL Types of access

ARTICLES - AVAILABLE

ARTICLE

Figure 25Sorting a set occurrence according to the key ART-NAME

ORDER IS SORTED BY DATABASE-KEY

UDS/SQL sorts the member records of the set occurrence in ascending order according to the values of the database key. In this case, the database key is also referred to as primary key of the set.

The values of the database key can be defined by the user (see the section “Direct and sequential access on record type level via database key value” on page 85) or left to UDS/SQL.

If, by means of SSL, a storage mode is established which causes UDS/SQL to set up a table in order to sort a set occurrence (see page 144; pointer array, list), UDS/SQL also uses the table as direct access path. In this case, the above clause must be supplemented by INDEXED, which results in the creation of a multi-level table (see page 100).

Show 5 more labels / short text on this page
SUPPLIER Moore · Water · Lemonade · Cocoa · Beer
Page 100 of the Fujitsu UDS/SQL V2.5 user manual — 4.7.4 Generating additional paths for direct access on set level
Page 100 · click to enlarge
Page 100

Types of access Schema DDL

4.7.4 Generating additional paths for direct access on set level

Unlike on record level, on set level UDS/SQL supports direct access only via tables. Only SYSTEM sets (see section “SYSTEM set” on page 105) allow direct access via a hash routine. Two kinds of tables can be defined for direct access on set level:

– a table containing the primary key of the set, or – one or more tables containing a secondary key (SEARCH key) of the set.

Generating an additional access path via primary key

ORDER IS SORTED INDEXED[ NAME IS name] BY

⎧DATABASE-KEY ⎫ ⎨ ⎬ ⎩DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED⎭ . . . ⎧ASCENDING ⎫ ⎨ ⎬ KEY IS item-name,... ⎩DESCENDING⎭

ORDER IS SORTED INDEXED BY DEFINED KEYS DUPLICATES ARE [ NOT] ALLOWED ASCENDING/DESCENDING KEY IS item-name,...

Specifies a primary key determining the order of the member records within a set occur- rences (see section “Determining the order of records within a set occurrence” on page 98). It also sets up a multi-level table for each set occurrence of the set. For each record belonging to the set occurrence, the table represents a unique reference between primary key value, database key value and physical record address. In the case of a change in the position of the record, its physical address is not automatically updated, however.

item-name specifies the item(s) of the member record type comprising the key.

DUPLICATES ARE[ NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

Page 101 of the Fujitsu UDS/SQL V2.5 user manual — ORDER IS SORTED INDEXED BY DATABASE-KEY
Page 101 · click to enlarge
Page 101

Schema DDL Types of access

RECORD NAME IS SUPPLIER . . .

RECORD NAME IS ARTICLE . . . 01 ARTICLE-NAME PICTURE IS X(30).

SET NAME IS ARTICLES-AVAILABLE ORDER IS SORTED INDEXED BY DEFINED KEYS OWNER IS SUPPLIER MEMBER IS ARTICLE ASCENDING KEY IS ARTICLE-NAME . . .

ORDER IS SORTED INDEXED BY DATABASE-KEY

Specifies the order of the members of a set occurrence (see the section “Determining the order of records within a set occurrence” on page 98). It also sets up a multi-level table for each set occurrence of the set. The table represents a unique reference between database key value and physical address for each record belonging to the set occurrence. UDS/SQL makes use of this access path when inserting a record in or deleting a record from the set occurrence and in sequential reading, but not for direct accesses.

Example

Page 102 of the Fujitsu UDS/SQL V2.5 user manual — Generating additional paths for direct access on set level
Page 102 · click to enlarge
Page 102

Types of access Schema DDL

Generating an additional access path via secondary key

SEARCH KEY IS item-name,... USING INDEX [NAME IS name] DUPLICATES ARE[ NOT] ALLOWED

A key defined by means of SEARCH-KEY IS... is called a SEARCH key or secondary key. It may consist of more than one item.

item-name specifies the item(s) comprising the key. All items have to be part of the member.

name specifies the name of the table. This name is referred to in SSL statements concerning the table.

DUPLICATES ARE[ NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

Based on this definition, UDS/SQL sets up a SEARCH key table on set level or a set SEARCH key table for each set occurrence of the set. This table represents a unique reference between secondary key value, database key value and physical address for each record belonging to the set occurrence. It must be a multi-level table. When the position of the record is changed, the physical address is not automatically updated.

Several independent secondary keys can be defined for each set.

Page 103 of the Fujitsu UDS/SQL V2.5 user manual — SET OCCURRENCE SELECTION IS THRU CURRENT OF SET
Page 103 · click to enlarge
Page 103

Schema DDL Types of access

4.7.5 Determining set occurrence selection

SET OCCURRENCE SELECTION IS THRU

⎧CURRENT OF SET ⎫ ⎧item-name ⎫ MULOCATION MODE OF OWNER[ ALIAS FOR ⎨ ⎬ IS identifier-2]...MU ⎩ ⎩identifier-1⎭ ⎭

When accessing records via sets, it is first necessary to select the desired set occurrences.

Two selection options are available:

SET OCCURRENCE SELECTION IS THRU CURRENT OF SET

In this case, the record last referenced within a set (CRS) identifies the set occurrence.

SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER [ALIAS FOR item-name / identifier-1 IS identifier-2]...

⎧item-name ⎫ [ALIAS FOR ⎨ ⎬ IS identifier-2]... ⎩identifier-1⎭

This option requires you to have defined a unique primary key for the owner record type with one of the following clauses:

– LOCATION MODE IS DIRECT or LOCATION MODE IS DIRECT-LONG

– LOCATION MODE IS CALC DUPLICATES ARE NOT ALLOWED

This key is either the database key or a CALC key.

UDS/SQL can use this option either to read a record from a set occurrence (see the manual “Application Programming”, FIND 7) or to insert a new record into a set occurrence (see STORE and MODIFY in the “Application Programming” manual). All the programmer has to do is provide UDS/SQL with the key value uniquely identifying the owner record of the set occurrence. UDS/SQL will automatically select the set occurrence on owner record type level using direct access via the database key or the hash routine, and make the selected owner record the CRS.

Page 104 of the Fujitsu UDS/SQL V2.5 user manual — Determining set occurrence selection
Page 104 · click to enlarge
Page 104

Types of access Schema DDL

Simultaneous automatic selection of several owner records from one record type

With certain data structures, it may be necessary to select several set occurrences (i.e. several owner records) at the same time when inserting a new member record, where all owner records are part of the same record type.

Such a case applies when the following two conditions are met:

– Two record types are connected by more than one set.

– The member record type is defined as an AUTOMATIC member in at least two of these sets.

If the selection option LOCATION MODE OF OWNER has been defined, UDS/SQL automatically selects the set occurrences of the sets. In order to select several different owner records simultaneously, however, the user then requires an additional language resource, because it is not possible to provide the items defined as primary keys with LOCATION MODE IS... with multiple key values at the same time. The following clause can be used to create an additional item for the owner selection in this set to hold the key values:

⎧item-name ⎫ ALIAS FOR ⎨ ⎬ IS identifier-2 ⎩identifier-1⎭

item-name and identifier-1 specify items that have been declared primary keys by LOCATION MODE IS

identifier-2 specifies the name of the additional item to be created. UDS/SQL automatically provides this item with the same item type and length as items referred to by item-name or identifier-1.

If a key consisting of several items has been defined by LOCATION MODE IS CALC, the ALIAS clause must be repeated an appropriate number of times in order to create one substitute item for every key item.

Page 105 of the Fujitsu UDS/SQL V2.5 user manual — 4.8.1 SYSTEM set
Page 105 · click to enlarge
Page 105

Schema DDL OWNER clause and SEARCH KEY clause

4.8 Special sets

4.8.1 SYSTEM set

OWNER IS SYSTEM.

A record type which is not related to a higher-ranking record type on the basis of its data structure can still be declared member of a set.

This applies in the following cases:

– For reasons of sequential processing, the records are to be in a different order than ascending order according to database key values (see page 85 and page 94 ff).

– Only a certain collection of records is to be processed (see section “Defining the type of membership of records in a set” on page 79).

In these cases, the record type is declared member of a set which has only a symbolic owner record type named SYSTEM. Accordingly such sets are called SYSTEM sets.

The symbolic owner record type contains exactly one record which is automatically generated by UDS/SQL. It is called an anchor record. A SYSTEM set thus consists of just one set occurrence.

In addition to the possibilities of a normal set, SYSTEM sets allow direct access via hash routines.

Defining secondary keys for conversion by hash routine

SEARCH KEY IS item-name,... USING CALC[ hash-routine] DUPLICATES ARE[ NOT] ALLOWED

A key declared by SEARCH KEY IS... is a SEARCH key or secondary key. It may be consist of more than one item.

item-name specifies the item(s) comprising the key. All items must be part of the corre- sponding member record type.

DUPLICATES ARE[ NOT] ALLOWED specifies whether UDS/SQL is to accept or reject duplicate key values.

Page 106 of the Fujitsu UDS/SQL V2.5 user manual — 4.8.2 Dynamic set
Page 106 · click to enlarge
Page 106

OWNER clause and SEARCH KEY clause Schema DDL

hash-routine denotes the name of a module converting the secondary key to a 4-byte binary number. This binary number is subsequently converted into a relative page number by UDS/SQL. The corresponding page contains the pointer to the record (see page 213).

If hash-routine is omitted, UDS/SQL uses the same standard hash routine as for conversion of the primary key on record type level (for programming a hash routine as well as using the standard hash routine, see page 87).

More than one secondary key may be defined.

4.8.2 Dynamic set

In general, DML statements process one record of the database at a time. One particular DML retrieval statement, however, selects several records from the database at the same time (see the “Application Programming“ manual, FIND 7). The selected records are buffered for further processing. UDS/SQL does this by automatically making the records member records in a dynamic set.

It is characteristic of a dynamic set that, during a transaction, it can accept records of various record types, identifying them as intermediate results of a search query, and discard them when the intermediate result is no longer required. Membership in a dynamic set is thus of the OPTIONAL MANUAL type and there is no defined member record type.

One set occurrence is sufficient for storing selected records in a dynamic set as connection data relating to certain owner records need not be stored, i.e. a dynamic set is declared as SYSTEM set.

The set is called dynamic because it holds member records for the course of one trans- action only. There is no static set membership.

In order to be able to define a dynamic set, the user must include a temporary realm in the schema. The dynamic set is defined as follows:

SET NAME IS set-name SET IS DYNAMIC ORDER IS IMMATERIAL OWNER IS SYSTEM.

If the Interactive Query Language IQL is to be used, the user must define eight dynamic sets with the names IQL-DYN1 through IQL-DYN8. More details can be found in the manual “Interactive Query System IQS“.

Page 107 of the Fujitsu UDS/SQL V2.5 user manual — 4.9 Assigning names to hash areas and tables
Page 107 · click to enlarge
Page 107

Schema DDL SEARCH KEY and ORDER clause

4.9 Assigning names to hash areas and tables

Names must be assigned to hash areas and tables for secondary keys and tables for primary keys if they are to be referenced by the SSL for the following purposes:

– determining the physical placement of the hash areas and tables – preventing redundancy in tables – defining the type of table reorganization desired

Names are assigned to hash areas or tables for secondary keys on record type and on set level by:

⎧CALC ⎫ SEARCH KEY IS USING ⎨ ⎬ NAME IS name ⎩INDEX⎭

Names are assigned to tables for primary keys on set level by means of:

ORDER IS SORTED INDEXED NAME IS name

where name specifies the name of the hash area or the table.

Page 108 of the Fujitsu UDS/SQL V2.5 user manual — 4.10 The realm concept
Page 108 · click to enlarge
Page 108

Realm concept Schema DDL

4.10 The realm concept

In order to take the aspects of

– data privacy, – data recovery, – concurrent access, and – the logical association of certain data

into account, it is often advisable to subdivide the database into subunits. These subdivi- sions are called “realms” or “areas”. They are generated as BS2000 files at database creation (see the “Creation and Restructuring” manual, Database creation). There are realms which contain UDS/SQL-internal information only and realms for user data. The latter are called user realms.

A maximum of 123 realms can be defined for a database with a page length of 2048 bytes (2-Kbyte page format). A database with a page length of 4000 or 8096 bytes (4-Kbyte or 8-Kbyte page format), by contrast, may be subdivided into a maximum of 245 realms.

With the BPRIVACY utility, the database administrator can grant certain groups of users access privileges to database objects (realms, record types, sets). When defining the subschema, a user can restrict the use of data to certain realms.

The subdivision into realms allows the effects of hardware errors or read/write errors to be restricted to a few realms or even to one realm. In such cases, only the realm or realms concerned needs to be recovered by means of realm copies or after-images, if used (see the “Recovery, Information and Reorganization” manual, BMEND). Data that is updated frequently should therefore be stored in a separate realm from data that is seldom updated or updated only at certain times.

Data privacy · Data security

Page 109 of the Fujitsu UDS/SQL V2.5 user manual — 4.10.1 Defining a realm
Page 109 · click to enlarge
Page 109

Schema DDL Realm concept

When a transaction is opened, the database programmer states the realms to be accessed within the transaction (see the “Application Programming” manual, READY). He can also define usage modes for realms, restricting or prohibiting concurrent access to these realms by other transactions. The subdivision of the database into realms helps keep mutual inter- ference by transactions to a minimum.

Data which is often accessed concurrently can be stored in different realms, and the realms can be assigned different disk drives. This allows concurrent accesses by different transac- tions, which again reduces access time.

Logical association of data

Data can be distributed over the different realms so that programs need access only some of the existing realms. Realms can be connected or disconnected at the user’s discretion by means of the BMEND utility or, in a session, by means of the administration with DAL commands. There is no need to waste resources on realms which are rarely used.

4.10.1 Defining a realm

AREA NAME IS realm-name

realm-name specifies the name of the realm assigned by the user. No further specifications are required to define a realm. Its size is specified at database creation (see the “Creation and Restructuring” manual, Database creation).

Handling concurrent access

Page 110 of the Fujitsu UDS/SQL V2.5 user manual — 4.10.3 Temporary realms
Page 110 · click to enlarge
Page 110

Realm concept Schema DDL

4.10.2 Defining allocation of records to realms

RECORD NAME IS record-name WITHIN realm-name-1[,realm-name-2,... AREA-ID IS identifier]

The allocation of data to realms and the placement of data within realms is performed mainly when defining the physical storage structure by means of SSL (see the section “Defining the placement of member records, tables and hash areas” on page 160). The allocation of records to realms is however defined by means of the schema DDL.

realm-name-1, etc. specifies all the realms to contain records of the record type record-name. If you specify multiple realms, you cannot insert any new records of this record type with SQL.

identifier must be specified only if more than one realm name is specified. identifier is specified by the user to denote the name of an item that is automatically generated by UDS/SQL to store one of the specified realm names in each case. Prior to storing a record, the database programmer must provide this item with the name of the realm that is to contain the record (see the “Application Programming” manual, STORE).

The time required for retrieving member records via their set relationship can be decreased by storing the member records in the same realm as the associated owner record. This allows further placement optimization for records by means of SSL (see the section “Placement within a realm” on page 163).

4.10.3 Temporary realms

AREA IS TEMPORARY

A temporary realm must be defined if the schema description contains dynamic sets or if UDS/SQL must automatically generate a dynamic set because a specific DML statement has been given (see the “Application Programming” manual, FIND 7). The temporary realm serves to store the table that represents the set occurrence of the dynamic set and that points to the associated member records. A temporary realm must also be defined when you wish to access the database using SQL.

Page 111 of the Fujitsu UDS/SQL V2.5 user manual — 4.11 Assigning name and privacy to a schema
Page 111 · click to enlarge
Page 111

Schema DDL SCHEMA NAME and PRIVACY LOCK clause

4.11 Assigning name and privacy to a schema

schema-name [PRIVACY LOCK FOR COPY IS literal-1[ OR literal-2]].

The definition of a database with the schema DDL always begins with the assigning of a name to the schema.

schema-name specifies the name assigned to the schema by the user. This name is later referenced by the SSL, the subschema DDL and the utility routines.

How the data in the database can be accessed by means of the subschema depends on the individual user’s access rights. literal-1 and literal-2 specify passwords which prevent the creation of unauthorized subschemas. In order to create a subschema, knowledge of at least one password is required.

Page 112 of the Fujitsu UDS/SQL V2.5 user manual — 4.12 Comprehensive example of DDL application
Page 112 · click to enlarge
Page 112

DDL example Schema DDL

4.12 Comprehensive example of DDL application

This example shows the schema of a mail order business. The schema supports the following functions:

– Management of master data relating to customers, articles, suppliers, customer orders and orders placed with suppliers

– Issuing of reminders

– Parts list processing for replacement parts

– Stock management

Page 113 of the Fujitsu UDS/SQL V2.5 user manual — CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, LEISURE, STATIONERY
Page 113 · click to enlarge
Page 113

Schema DDL DDL example

ARTICLE-TYPE SYSTEM

ARTICLESELECTION

SHORT-LIST OFFER

SUPPLIERS

DIRECTLONG

ARTICLE-

CUSTOMER

CALC

SUPPLIER

DESCR

CALC

HIRE-PURCHASE CUSTOMERORDERSPLACED

ARTICLESAVAILABLE OUTSTANDING

PURCH-ORD-

PURCHORDRECEIVED

SYSTEM

SPECS

PURCH-ORDPLACED

MIN-STOCKLEVEL

INSTALLMENT CUSTOMER-

PURCHASE-

ARTICLE

CALC

ORDER

ORDER

CUSTOMERORDERCONTENTS ORDEREDARTICELS

REORDEREDARTICLES

PURCH-ORD-

CONTENTS

CONTAINS CONTAINED-IN

CUSTORDER-ITEM SUBSET

PURCH-ORD-

ITEM

Realms:

CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, LEISURE, STATIONERY

COLORS MATERIALS

RealmARTICLE-RLM Realm: CUSTOMER-ORDER-RLM PURCHASEORDER-RLM Realm:
Figure 26Schema of a mail order business
Page 114 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 114 · click to enlarge
Page 114

DDL example Schema DDL

A rough selection of articles is possible by means of the criteria ARTICLE-TYPE and ARTICLE-SELECTION. This selection leads to a detailed article description. An article description can comprise several articles differing in color, size and price.

The sets CONTAINS and CONTAINED-IN comprise a parts list used for parts supply. In the ARTICLE records, colors are coded by numbers, materials in by abbreviations with percentages. The record types COLOR and MATERIALS contain the assignments of the codes to the associated meanings.

In the example, the schema is designed to provide as full an understanding of DDL clauses as possible.

1 SCHEMA NAME IS MAIL-ORDERS 2 PRIVACY LOCK FOR COPY IS "SHIP-KEY". 3 * 4 * 5 * 6 AREA NAME IS CUSTOMER-ORDER-RLM. 7 AREA NAME IS PURCHASE-ORDER-RLM. 8 AREA NAME IS CLOTHING. 9 AREA NAME IS HOUSEHOLD-GOODS. 10 AREA NAME IS SPORTS-ARTICLES. 11 AREA NAME IS FOOD. 12 AREA NAME IS LEISURE. 13 AREA NAME IS STATIONERY. 14 AREA NAME IS ARTICLE-RLM. 15 AREA NAME IS SEARCH-RLM 16 AREA IS TEMPORARY. 17 * 18 * 19 * 20 RECORD NAME IS CUSTOMER 21 LOCATION MODE IS DIRECT-LONG CUST-NO OF CUSTOMER 22 WITHIN CUSTOMER-ORDER-RLM. 23 * 24 01 CUST-NAME TYPE IS CHARACTER 30. 25 01 CUST-F-NAME TYPE IS CHARACTER 30. 26 01 CUST-NO TYPE IS DATABASE-KEY-LONG. 27 * 28 * 29 RECORD NAME IS CST-ORDERS 30 WITHIN CUSTOMER-ORDER-RLM. 31 * 32 01 ORD-NO PICTURE IS 9(4). 33 01 ORD-YEAR PICTURE IS 99. 34 01 ORD-MONTH PICTURE IS 99. 35 01 ORD-DAY PICTURE IS 99. 36 01 ORD-STATUS PICTURE IS X.

Page 115 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 115 · click to enlarge
Page 115

Schema DDL DDL example

37 * 38 * 39 RECORD NAME IS ORD-ITEM 40 WITHIN CUSTOMER-ORDER-RLM. 41 * 42 01 ORD-NO-ITEM PICTURE IS 99. 43 01 ORD-QTY TYPE IS DECIMAL 6. 44 01 PAY-INSTAL-CODE PICTURE IS X. 45 01 ORD-STATUS-ITEM PICTURE IS X. 46 * 47 * 48 RECORD NAME IS INSTALMENT 49 WITHIN CUSTOMER-ORDER-RLM 50 SEARCH KEY IS YEAR-NEXT-INSTAL, MONTH-NEXT-INSTAL, 51 DAY-NEXT-INSTAL 52 USING INDEX NAME IS SEARCH-TAB-INSTALMENT 53 DUPLICATES ARE ALLOWED. 54 * 55 01 ORD-NO PICTURE IS 9(4). 56 01 ORD-NO-ITEM PICTURE IS 99. 57 01 TOT-PRICE-INSTAL TYPE IS DECIMAL 9,2. 58 01 SINGLE-INSTAL TYPE IS DECIMAL 7,2. 59 01 BALANCE TYPE IS DECIMAL 9,2. 60 01 YEAR-NEXT-INSTAL PICTURE IS 99. 61 01 MONTH-NEXT-INSTAL PICTURE IS 99. 62 01 DAY-NEXT-INSTAL PICTURE IS 99. 63 * 64 * 65 RECORD NAME IS ART-TYPE 66 WITHIN CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, 67 LEISURE, STATIONERY AREA-ID IS RLM-SELECTION-1 68 SEARCH KEY IS ART-NAME USING CALC 69 NAME IS SEARCH-TAB-ART-TYPE DUPLICATES ARE ALLOWED. 70 * 71 01 ART-NAME TYPE IS CHARACTER 25. 72 * 73 * 74 RECORD NAME IS ART-SELECTION 75 WITHIN CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, 76 LEISURE, STATIONERY AREA-ID IS RLM-SELECTION-2 77 SEARCH KEY IS SEL-CRIT USING INDEX 78 NAME IS SEARCH-TAB-ARTICLE-SELECTION 79 DUPLICATES ARE ALLOWED. 80 * 81 01 SEL-CRIT TYPE IS CHARACTER 25. 82 * 83 * 84 RECORD NAME IS ART-DESCR

Page 116 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 116 · click to enlarge
Page 116

DDL example Schema DDL

85 LOCATION MODE IS CALC USING ARTICLE-NAME 86 DUPLICATES ARE ALLOWED 87 WITHIN CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, 88 LEISURE, STATIONERY AREA-ID IS RLM-SELECTION-3. 89 * 90 01 ART-NO PICTURE IS 9(6). 91 01 ARTICLE-NAME TYPE IS CHARACTER 40. 92 01 MATERIAL OCCURS 4 TIMES. 93 02 PERZENT PICTURE IS 99. 94 02 MAT-CODE PICTURE IS X. 95 01 LENGTH-FIELD TYPE IS BINARY 15. 96 01 ART-INFO PICTURE IS LX(500) 97 DEPENDING ON LENGTH-FIELD. 98 * 99 * 100 RECORD NAME IS ARTICLE 101 LOCATION MODE IS CALC USING ART-NO, COL-NO, ART-SIZE 102 DUPLICATES ARE NOT ALLOWED 103 WITHIN CLOTHING, HOUSEHOLD-GOODS, SPORTS-ARTICLES, FOOD, 104 LEISURE, STATIONERY AREA-ID IS RLM-SELECTION-4 105 SEARCH KEY IS ART-NO-AVAIL, COL-NO-AVAIL, ART-SIZE 106 USING CALC NAME IS SEARCH-TAB-ARTICLE-1 107 DUPLICATES ARE NOT ALLOWED 108 SEARCH KEY IS ARTICLE-NAME USING CALC 109 NAME IS SEARCH-TAB-ARTICLE-2 DUPLICATES ARE ALLOWED. 110 * 111 01 ART-NO PICTURE IS 9(6). 112 01 COL-NO PICTURE IS 99. 113 01 ARTICLE-NAME TYPE IS CHARACTER 40. 114 01 ART-NO-AVAIL PICTURE IS 9(4). 115 01 COL-NO-AVAIL PICTURE IS 99. 116 01 ART-SIZE PICTURE IS 99. 117 01 PRICE TYPE IS DECIMAL 7,2. 118 01 INSTALMENT-PRICE TYPE IS DECIMAL 7,2. 119 01 MAX-STOCK TYPE IS DECIMAL 10. 120 01 MIN-STOCK TYPE IS DECIMAL 3. 121 01 CURR-STOCK TYPE IS DECIMAL 10. 122 01 STATISTICS TYPE IS DECIMAL 15. 123 01 NOT-AVAIL-CODE PICTURE IS X. 124 * 125 * 126 RECORD NAME IS SUBSET 127 WITHIN HOUSEHOLD-GOODS, SPORTS-ARTICLES 128 AREA-ID IS RLM-SELECTION-5. 129 * 130 01 QUANTITY PICTURE IS 99. 131 * 132 *

Page 117 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 117 · click to enlarge
Page 117

Schema DDL DDL example

133 RECORD NAME IS COLORS 134 WITHIN ARTICLE-RLM 135 SEARCH KEY IS COL-NAME USING CALC DUPLICATES ARE NOT ALLOWED 136 SEARCH KEY IS COL-NO USING CALC DUPLICATES ARE NOT ALLOWED. 137 * 138 01 COL-NO PICTURE IS 99. 139 01 COL-NAME TYPE IS CHARACTER 20. 140 * 141 * 142 RECORD NAME IS MATERIALS 143 WITHIN ARTICLE-RLM 144 SEARCH KEY IS MAT-CODE USING INDEX 145 NAME IS SEARCH-TAB-MATERIAL-1 DUPLICATES ARE NOT ALLOWED 146 SEARCH KEY IS MAT-NAME USING INDEX 147 NAME IS SEARCH-TAB-MATERIAL-2 DUPLICATES ARE NOT ALLOWED. 148 * 149 01 MAT-CODE TYPE IS CHARACTER 1. 150 01 MAT-NAME TYPE IS CHARACTER 20. 151 * 152 * 153 RECORD NAME IS SUPPLIER 154 LOCATION MODE IS CALC USING SUPPL-NO, SUPPL-NAME 155 DUPLICATES ARE NOT ALLOWED 156 WITHIN PURCHASE-ORDER-RLM. 157 * 158 01 SUPPL-NO PICTURE IS 9(5). 159 01 SUPPL-NAME TYPE IS CHARACTER 30. 160 01 SUPPL-PCODE TYPE IS CHARACTER 4. 161 01 SUPPL-TOWN TYPE IS CHARACTER 30. 162 01 SUPPL-STREET TYPE IS CHARACTER 30. 163 01 SUPP-STREET-NO TYPE IS CHARACTER 3. 164 01 SUPPL-TEL PICTURE IS 9(12). 165 01 SUPPL-POBOX PIC 9(4). 166 01 SUPP-TELEX PIC 9(12). 167 * 168 * 169 RECORD NAME IS PURCHASE-ORDER 170 WITHIN PURCHASE-ORDER-RLM. 171 * 172 01 P-ORD-NO PICTURE IS 9(4). 173 01 P-ORD-YEAR PICTURE IS 99. 174 01 P-ORD-MONTH PICTURE IS 99. 175 01 P-ORD-DAY PICTURE IS 99. 176 * 177 * 178 RECORD NAME IS P-ORD-ITEM 179 WITHIN PURCHASE-ORDER-RLM. 180 *

Page 118 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 118 · click to enlarge
Page 118

DDL example Schema DDL

181 01 P-ORD-NO-ITEM PICTURE IS 99. 182 01 P-ORD-QTY TYPE IS DECIMAL 10. 183 * 184 * 185 * 186 SET NAME IS CST-ORD-PLACED 187 ORDER IS SORTED INDEXED BY DEFINED KEYS 188 DUPLICATES ARE NOT ALLOWED 189 OWNER IS CUSTOMER. 190 MEMBER IS CST-ORDERS OPTIONAL AUTOMATIC 191 ASCENDING KEY IS ORD-NO 192 SEARCH KEY IS ORD-YEAR, ORD-MONTH, ORD-DAY USING INDEX 193 NAME IS SEARCH-TAB-C-O-PLCD DUPLICATES ARE ALLOWED 194 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 195 * 196 * 197 SET NAME IS CST-O-CONTENTS 198 ORDER IS SORTED INDEXED BY DEFINED KEYS 199 DUPLICATES ARE NOT ALLOWED 200 OWNER IS CST-ORDERS. 201 MEMBER IS ORD-ITEM MANDATORY AUTOMATIC 202 ASCENDING KEY IS ORD-NO-ITEM 203 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 204 * 205 * 206 SET NAME IS OUTSTANDING 207 ORDER IS LAST 208 OWNER IS CUSTOMER. 209 MEMBER IS ORD-ITEM OPTIONAL AUTOMATIC 210 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 211 * 212 * 213 SET NAME IS HIRE-PURCHASE 214 ORDER IS LAST 215 OWNER IS CUSTOMER. 216 MEMBER IS INSTALMENT MANDATORY AUTOMATIC 217 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 218 * 219 * 220 SET NAME IS OFFER 221 ORDER IS SORTED INDEXED BY DEFINED KEYS 222 DUPLICATES ARE ALLOWED 223 OWNER IS ART-TYPE. 224 MEMBER IS ART-DESCR MANDATORY AUTOMATIC 225 ASCENDING KEY IS ARTICLE-NAME 226 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 227 * 228 *

Page 119 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 119 · click to enlarge
Page 119

Schema DDL DDL example

229 SET NAME IS SHORT-LIST 230 ORDER IS SORTED INDEXED BY DEFINED KEYS 231 DUPLICATES ARE ALLOWED 232 OWNER IS ART-SELECTION. 233 MEMBER IS ART-DESCR MANDATORY AUTOMATIC 234 ASCENDING KEY IS ARTICLE-NAME 235 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 236 * 237 * 238 SET NAME IS P-ORD-SPEC 239 ORDER IS SORTED INDEXED BY DEFINED KEYS 240 DUPLICATES ARE NOT ALLOWED 241 OWNER IS ART-DESCR. 242 MEMBER IS ARTICLE MANDATORY AUTOMATIC 243 ASCENDING KEY IS COL-NO, ART-SIZE 244 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 245 * 246 * 247 SET NAME IS MIN-STOCK-LEVEL 248 ORDER IS SORTED INDEXED BY DEFINED KEYS 249 DUPLICATES ARE NOT ALLOWED 250 OWNER IS SYSTEM. 251 MEMBER IS ARTICLE OPTIONAL MANUAL 252 ASCENDING KEY IS ART-NO, COL-NO, ART-SIZE. 253 * 254 * 255 SET NAME IS CONTAINING 256 ORDER IS NEXT 257 OWNER IS ARTICLE. 258 MEMBER IS SUBSET MANDATORY AUTOMATIC 259 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 260 * 261 * 262 SET NAME IS CONTAINED-IN 263 ORDER IS NEXT 264 OWNER IS ARTICLE. 265 MEMBER IS SUBSET MANDATORY AUTOMATIC 266 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER 267 ALIAS FOR ART-NO IS SUBST-ART-NO 268 ALIAS FOR COL-NO IS SUBST-COL-NO 269 ALIAS FOR ART-SIZE IS SUBST-SIZE. 270 * 271 * 272 SET NAME IS SUPPLIERS 273 ORDER IS SORTED INDEXED BY DEFINED KEYS 274 DUPLICATES ARE NOT ALLOWED 275 OWNER IS SYSTEM. 276 MEMBER IS SUPPLIER MANDATORY AUTOMATIC

Page 120 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 120 · click to enlarge
Page 120

DDL example Schema DDL

277 ASCENDING KEY IS SUPPL-NAME, SUPPL-NO. 278 * 279 * 280 SET NAME IS ARTICLES-AVAILABLE 281 ORDER IS SORTED INDEXED BY DEFINED KEYS 282 DUPLICATES ARE ALLOWED 283 OWNER IS SUPPLIER. 284 MEMBER IS ARTICLE MANDATORY AUTOMATIC 285 ASCENDING KEY IS ARTICLE-NAME 286 SEARCH KEY IS NOT-AVAIL-CODE USING INDEX 287 NAME IS SEARCH-TAB-ART-AVAIL DUPLICATES ARE ALLOWED 288 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 289 * 290 * 291 SET NAME IS ORDERED-ARTICLES 292 ORDER IS LAST 293 OWNER IS ARTICLE. 294 MEMBER IS ORD-ITEM MANDATORY AUTOMATIC 295 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 296 * 297 * 298 SET NAME IS REORDERED-ARTICLES 299 ORDER IS LAST 300 OWNER IS ARTICLE. 301 MEMBER IS P-ORD-ITEM MANDATORY AUTOMATIC 302 SET OCCURRENCE SELECTION IS THRU LOCATION MODE OF OWNER. 303 * 304 * 305 SET NAME IS P-ORD-PLACED 306 ORDER IS LAST 307 OWNER IS SUPPLIER. 308 MEMBER IS PURCHASE-ORDER MANDATORY AUTOMATIC 309 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 310 * 311 * 312 SET NAME IS P-ORD-RECEIVED 313 ORDER IS FIRST 314 OWNER IS SUPPLIER. 315 MEMBER IS PURCHASE-ORDER MANDATORY MANUAL 316 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 317 * 318 * 319 SET NAME IS P-ORD-CONTENTS 320 ORDER IS NEXT 321 OWNER IS PURCHASE-ORDER. 322 MEMBER IS P-ORD-ITEM MANDATORY AUTOMATIC 323 SET OCCURRENCE SELECTION IS THRU CURRENT OF SET. 324 *

Page 121 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 121 · click to enlarge
Page 121

Schema DDL DDL example

325 * 326 * 327 SET NAME IS RESULT-SET 328 SET IS DYNAMIC 329 ORDER IS IMMATERIAL 330 OWNER IS SYSTEM. 331 * 332 SET NAME IS LIMITED-SET 333 SET IS DYNAMIC 334 ORDER IS IMMATERIAL 335 OWNER IS SYSTEM. 336 * 337 * 338 SET NAME IS IQL-DYN1 339 SET IS DYNAMIC 340 ORDER IS IMMATERIAL 341 OWNER IS SYSTEM. 342 * 343 SET NAME IS IQL-DYN2 344 SET IS DYNAMIC 345 ORDER IS IMMATERIAL 346 OWNER IS SYSTEM. 347 * 348 SET NAME IS IQL-DYN3 349 SET IS DYNAMIC 350 ORDER IS IMMATERIAL 351 OWNER IS SYSTEM. 352 * 353 SET NAME IS IQL-DYN4 354 SET IS DYNAMIC 355 ORDER IS IMMATERIAL 356 OWNER IS SYSTEM. 357 * 358 SET NAME IS IQL-DYN5 359 SET IS DYNAMIC 360 ORDER IS IMMATERIAL 361 OWNER IS SYSTEM. 362 * 363 SET NAME IS IQL-DYN6 364 SET IS DYNAMIC 365 ORDER IS IMMATERIAL 366 OWNER IS SYSTEM. 367 * 368 SET NAME IS IQL-DYN7 369 SET IS DYNAMIC 370 ORDER IS IMMATERIAL 371 OWNER IS SYSTEM. 372 *

Page 122 of the Fujitsu UDS/SQL V2.5 user manual — Comprehensive example of DDL application
Page 122 · click to enlarge
Page 122

DDL example Schema DDL

373 SET NAME IS IQL-DYN8 374 SET IS DYNAMIC 375 ORDER IS IMMATERIAL 376 OWNER IS SYSTEM.

Page 123 of the Fujitsu UDS/SQL V2.5 user manual — ACCEPT ACCESS ACTUAL
Page 123 · click to enlarge
Page 123

Schema DDL Reserved words of the DDL compiler

4.13 Reserved words of the DDL compiler

ACCEPT ACCESS ACTUAL

AD ADD ADVANCING

AFTER ALIAS ALL

ALLOWED ALPHABETIC ALPHANUMERIC

ALSO ALTER ALTERNATE

AN AND ANY

APPLY ARE AREA

AREA-ID AREAS ASC

ASCENDING ASSIGN ASSIGNED

AT ATTACHED AUTHOR

AUTO AUTOMATIC BEFORE

BEGINNING BETWEEN BIN

BINARY BLANK BLOCK

BLOCK-DENSITY BOTTOM BY

C01 C02 C03

C04 C05 C06

C07 C08 C09

C10 C11 C12

CALC CALL CANCEL

CARD-PUNCH CARD-READER CBL-CTR

CD CH CHAIN

CHANGED CHAR CHARACTER

CHARACTERS CHECK CHECKING

CHECKPOINT CLASS CLOCK-UNITS

CLOSE COBOL CODE

CODE-SET COLLATING COLUMN

COMMA COMMUNICATION COMP

COMP-1 COMP-2 COMP-3

COMPILE COMPRESSION COMPUTATIONAL

COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3

Page 124 of the Fujitsu UDS/SQL V2.5 user manual — COMPUTE CONFIGURATION CONNECT
Page 124 · click to enlarge
Page 124

Reserved words of the DDL compiler Schema DDL

COMPUTE CONFIGURATION CONNECT

CONSOLE CONTAINS CONTROL

CONTROLS COPY CORR

CORRESPONDING COUNT CREATING

CSP CURRENCY CURRENT

CURRENT-DATE CYCLES CYLINDER-OFLO

DATA DATABASE-EXCEPTION DATABASE-KEY

DATABASE-KEY-LIST DATABASE-KEY-LONG DATABASE-KEY-NAME

DATABASE-KEY-RANGE DATABASE-KEYTRANSLATION-TABLE

DATABASE-PRIVACY-KEY

DATABASE-REALM-NAME DATABASE-RECORD-NAME DATABASE-SET-NAME

DATABASE-STATUS DATE DATE-COMPILED

DATE-WRITTEN DAY DB

DBKEY DBKEY-LONG DBKEY-TRANSLATION-TABLE

DBTT DCB-NAME DE

DEBUGGING DEC DECIMAL

DECIMAL-POINT DECLARATIVES DEFINED

DELETE DELIMETED DELIMETER

DEPENDING DESC DESCENDING

DESTINATION DETACHED DETAIL

DIGITS DIRECT DIRECT-LONG

DISABLE DISC DISC64

DISC80 DISC90 DISCONNECT

DISPLAY DISPLAY-ST DIVIDE

DIVISION DOWN DUP

DUPLICATE DUPLICATES DYNAMIC

EGI ELSE EMI

EMPTY ENABLE END

END-OF-PAGE ENDING ENTER

ENTRY ENVIRONMENT EOP

EQUAL ERASE ERROR

ESI EVERY EXAMINE

Page 125 of the Fujitsu UDS/SQL V2.5 user manual — EXCEPTION EXCL EXCLUSIVE
Page 125 · click to enlarge
Page 125

Schema DDL Reserved words of the DDL compiler

EXCEPTION EXCL EXCLUSIVE

EXHIBIT EXIT EXTEND

EXTENDED FD FETCH

FILE FILE-CONTROL FILE-LIMIT

FILE-LIMITS FILES FILLER

FINAL FIND FINISH

FIRST FIXED FOOTING

FOR FORM-OVERFLOW FREE

FROM GENERATE GET

GIVING GO GREATER

GREATEST GROUP GROUP-USAGE

HEADING HIGH-VALUE HIGH-VALUES

HOLD I-O I-O-CONTROL

ID IDENTIFICATION IF

IMMATERIAL IN INCLUDING

INCREASE INDEX INDEXED

INDICATE INDICATOR INITIAL

INITIATE INPUT INPUT-OUTPUT

INSPECT INSTALLATION INTO

INVALID IS ITEMS

JUST JUSTIFIED KEEP

KEY KEYS LABEL

LABELS LAST LEADING

LEFT LENGTH LESS

LIBRARY LIMIT LIMITED

LIMITS LINAGE LINE

LINE-COUNTER LINES LINK

LINKAGE LINKED LIST

LOC LOCATION LOCK

LOCKS LOG LOW-VALUE

LOW-VALUES MAND MANDATORY

MANUAL MASK MEMBER

Page 126 of the Fujitsu UDS/SQL V2.5 user manual — MEMBERS MEMBERSHIP MEMORY
Page 126 · click to enlarge
Page 126

Reserved words of the DDL compiler Schema DDL

MEMBERS MEMBERSHIP MEMORY

MERGE MESSAGE MINUS

MIXED MODE MODIFY

MODULES MORE-LABELS MOVE

MULTIPLE MULTIPLY NAME

NAMED NATIONAL NATIVE

NEGATIVE NEXT NO

NOT NOTE NUMBER

NUMERIC OBJECT-COMPUTER OCCURRENCE

OCCURS OF OFF

OH OMITTED ON

ONES ONLY OPEN

OPT OPTIMIZATION OPTIONAL

OR ORDER ORGANIZATION

OTHER OTHERWISE OUTPUT

OV OVERFLOW OWNER

PA PAGE PAGE-COUNTER

PAGES PERCENT PERFORM

PERMANENT PF PH

PHYSICAL PHYSICALLY PIC

PICTURE PLACEMENT PLACING

PLUS POINTER POINTER-ARRAY

POPULATION POSITION POSITIONING

POSITIVE PRESELECTION PRINT-SWITCH

PRINTER PRINTING PRIOR

PRIVACY PRIVACY-GROUP PRIVACY-IDENTIFICATION

PRIVACY-NAME PRIVACY-RECORD PROCEDURE

PROCEDURES PROCEED PROCESS

PROCESSING PROGRAM PROGRAM-ID

PROT PROTECTED PROTECTION

PUNCH4 PUNCH6 QUEUE

QUOTE QUOTES RANDOM

Page 127 of the Fujitsu UDS/SQL V2.5 user manual — RD READ READER
Page 127 · click to enlarge
Page 127

Schema DDL Reserved words of the DDL compiler

RD READ READER

READY REAL REALM

REALM-NAME REALMS RECEIVE

RECORD RECORDING RECORDS

REDEFINES REEL REFERENCE-YEAR

REFERENCES RELATIVE RELEASE

REMAINDER REMARKS REMOVAL

RENAMES REORGANIZATION REPEATED-KEY

REPLACING REPORT REPORTING

REPORTS RERUN RESERVE

RESET RESTRICTED RESULT

RETAINING RETR RETRIEVAL

RETURN REVERSED REWIND

REWRITE RF RH

RIGHT ROUNDED RUN

SA SAME SCHEMA

SD SEARCH SECTION

SECURITY SEEK SEGMENT

SEGMENT-LIMIT SELECT SELECTION

SELECTIVE SEND SENTENCE

SEPARATE SEQUENCE SEQUENTIAL

SET SETS SIEMENS-4004

SIGN SIGNED SIZE

SMALLEST SORT SORT-MERGE

SORT-TAPE SORT-TAPES SORTED

SOURCE SOURCE-COMPUTER SPACE

SPACES SPANS SPECIAL-NAMES

STANDARD STANDARD-1 START

STATUS STOP STORAGE

STORE STRING STRUCTURE

SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3

SUB-SCHEMA SUBTRACT SUM

Page 128 of the Fujitsu UDS/SQL V2.5 user manual — SUPPRESS SYMBOLIC SYNC
Page 128 · click to enlarge
Page 128

Reserved words of the DDL compiler Schema DDL

SUPPRESS SYMBOLIC SYNC

SYNCHRONIZED SYSIN SYSIPT

SYSLST SYSOPT SYSOPT-234

SYSOUT SYSPUNCH SYSRDR

SYSTEM TABLE TALLY

TALLYING TAPE TAPES

TEMP TEMPORARY TENANT

TERMINAL TERMINATE TEXT

THAN THEN THROUGH

THRU TIME TIMES

TO TODAYS-DATE TOP

TRACE TRACK-AREA TRACKS

TRAILING TRANSFORM TRY

TYPE UNDER UNIT

UNITS UNSTRING UNTIL

UP UPDATE UPON

USAGE USAGE-MODE USE

USING VALUE VALUES

VARYING VIA WHEN

WITH WITHIN WITHOUT

WORDS WORKING-STORAGE WRITE

WRITE-ONLY YEAR ZERO

ZEROES ZEROS

Page 129 of the Fujitsu UDS/SQL V2.5 user manual — 5.1 Introduction
Page 129 · click to enlarge
Page 129

5 SSL

5.1 Introduction

The schema DDL is used to describe the logical structure of the data; the Storage Structure Language SSL is used to specify the physical storage structure when storing data and logical relationships between data. The definition of the physical storage structure is optional. If it is omitted, UDS/SQL applies the default values. The user can influence the storage space requirements for the data and especially the system run-time behavior in future applications when defining the storage structure.

Designing the storage structure involves the following steps:

1. Declaring the population
2. Defining the linkage of records
3. Determining the placement of member records, tables and hash areas
4. Determining the extent of table reorganization

Each of these steps is dealt with below in a separate section, which also explains the default cases. These sections are preceded by a description of the methods UDS/SQL uses for the physical representation of the logical data structure.

The metalanguage used is described on page 22, and the general syntax rules are summa- rized on page 234.

You compile the SSL using the SSL compiler. For information on operating the SSL compiler, please refer to the "Creation and Restructuring" manual, Compiling SSL).

Page 130 of the Fujitsu UDS/SQL V2.5 user manual — 5.1.1 Methods of physical representation of the logical data structure
Page 130 · click to enlarge
Page 130

5.1.1 Methods of physical representation of the logical data structure

The physical representation of the entirety of

  • all records of a record type:

DBTT (Database Key Translation Table)

Table representing all records of a record type and linking all owner records to the tables of their set occurrences.

Record SEARCH key table Table representing all records of a record type.

  • all records of a set occurrence:

Tables representing all member records of a set occurrence

Set SEARCH key table

List Table containing all member records of a set occurrence

Chain Contains owner record and all member records of a set occurrence

Using the SSL, the user determines if and how a pointer array, list, chain, sort key table or SEARCH key table is to be set up. A description of these elements can be found on page 144.

UDS/SQL automatically sets up a DBTT without user intervention. A description of the DBTT follows.

Show 4 more labels / short text on this page
Introduction SSL · Pointer array · ⎫ ⎬ ⎭ · Sort key table
Page 131 of the Fujitsu UDS/SQL V2.5 user manual — REALM-REF PNO
Page 131 · click to enlarge
Page 131

5.1.2 DBTT (Database Key Translation Table)

The DBTT establishes the link between the database key value of a database record and the physical page address of that record.

Structure of a physical page address

The total space available for storing data in the database is divided into realms. A realm consists of a number of pages defined at database creation (see the “Creation and Restruc- turing” manual, “Database creation”). The pages in each realm are consecutively numbered, as are the realms. UDS/SQL can thus locate data in the database if the number of the page containing the data and the number of the realm containing the page are known. The realm reference and page number are therefore combined to form a physical page address, which UDS/SQL can use as a pointer to the physical position of the data.

REALM-REF PNO

REALM-REF PNO

= Realm reference = Page number

1 byte 3 bytes

Figure 27Structure of a physical page address

For the main part, data in the database comprises the records and tables defined by the user. The physical placement of these records and tables can change, but UDS/SQL does not update all the associated pointers when this happens. Pointers that must be current at all times are referred to as actual keys (act-key), the remaining pointers are called Probable Position Pointers (PPP).

PPPs can be updated to the most recent update level by means of the BREORG utility routine (see the “Recovery, Information and Reorganization” manual, BREORG).

SSL Introduction

Page 132 of the Fujitsu UDS/SQL V2.5 user manual — REC-REF RSQ
Page 132 · click to enlarge
Page 132

Structure of a database key value

To find the physical address of records and associated tables, UDS/SQL can always make use of an additional identifier, the database key value, which never changes during the life of a record in the database.

A record type consists of a number of records which are consecutively numbered. The record types are also numbered. The record sequence number (RSQ) and record type reference (REC-REF) are combined to form the database key value of the record. The database key is thus an identifier that uniquely identifies each record contained in the database.

The structure of the database key value varies, depending on whether the database page length is 2048 bytes or 4000/8096 bytes.

REC-REF RSQ

REC-REF RSQ

= Record reference no. = Record sequence no.

1 byte 3 bytes

Figure 28Structure of a database key value if the page length is 2048 bytes

REC-REF RSQ

REC-REF RSQ

= Record reference no. = Record sequence no.

2 bytes 2 bytes

Figure 29: Structure of a database key value if the page length is 4000 or 8096 bytes

The following applies to the value range for a record reference number (REC-REF):

– 1 ≤REC-REF ≤254 for databases with a 2048-byte page length

– 1 ≤REC-REF ≤215-1 for databases with a 4000/8096-byte page length

Introduction SSL · not used · 4 bytes

Page 133 of the Fujitsu UDS/SQL V2.5 user manual — DBTT (Database Key Translation Table)
Page 133 · click to enlarge
Page 133

The following applies to the value range for a record sequence number (RSQ):

– 1 ≤RSQ ≤ 224-1 for databases with a 2048-byte page length if the record type is not an owner in any set.

– 1 ≤ RSQ ≤ 224- 216- 1 for databases with a 2048-byte if the record type is an owner in a set.

– 1 ≤ RSQ ≤ 231-1 for databases with a 4000/8096-byte page length

Structure of the DBTT

In order to locate the physical placement of a record via the database key value, UDS/SQL uses the database key translation table or DBTT.

UDS/SQL automatically sets up a DBTT for every record type. The DBTT contains exactly one line for every record of a record type. A DBTT line is divided into columns. Column 0 contains the page address of the record. The DBTT of a record type which is not an owner consists of column 0 only. The database key value is contained only implicitly in the DBTT. It is symbolized by the place where the associated physical page address is entered. For example, the record with RSQ=3 is stored in line 3 of the DBTT; the record with RSQ=9 is stored in line 9, etc.

SSL Introduction

Page 134 of the Fujitsu UDS/SQL V2.5 user manual — 10 E 10F 110 111
Page 134 · click to enlarge
Page 134

Database key value for page length of 2048 bytes

DBTT of record type 05

REC-REF RSQ Column 0

0 5 0 3

1 byte 3 bytes

0 4 0 8 3

Database key value for page length of 4000/8096 bytes

REC-REF RS Q

00 05 00 00 00 03

2 bytes 4 bytes

0 6 0 1 4

0 5 0 9

1 byte 3 bytes

001 002 003 004

001 002 003 004

001 002 003 004

018 019 01 A 01 B

060 061 062 063

10 E 10F 110 111

Figure 30Linkage between the database key value and the record address via the DBTT
Show 13 more labels / short text on this page
Introduction SSL · Line 3 · not used · Line 3 · 2 bytes · Line 9 · Realm 01 · Realm 04 · Realm 06 · 083 014 · 084 085 086 · 013 015 016 · 034 035 036
Page 135 of the Fujitsu UDS/SQL V2.5 user manual — DBTT (Database Key Translation Table)
Page 135 · click to enlarge
Page 135

If the placement of records changes, updating of the page addresses can be limited to the DBTT.

In addition to the page addresses of the owner records, the DBTT of an owner record type contains the page addresses of all tables pertaining to the set occurrences of the owner records. To identify these tables, the database key value of the corresponding owner record is combined with the DBTT column number, forming a unique identifier which never changes.

Column 0 Column 1 Column 2

0 4 0 8 3 0 4 0 9 0 0 4 0 9 0

0 6 0 1 4 0 6 0 2 8 0 6 0 2 8

Act key: owner record Act key: pointer array 4 bytes 4 bytes Act key: set SEARCH key table

Figure 31Complete example of a DBTT

General conclusions:

– Page address updating for records and tables can be limited to the DBTT.

– All page addresses listed in the DBTT are current.

SSL Introduction · 4 bytes

Page 136 of the Fujitsu UDS/SQL V2.5 user manual — 5.2.1 Specifying the number of records in one record type
Page 136 · click to enlarge
Page 136

5.2 Declaring the population

5.2.1 Specifying the number of records in one record type

The number of records included in one record type is defined in the DBTT and in the record POPULATION clause. Using this number UDS/SQL computes:

– the storage space requirement for the DBTT, – the hash area size for the primary key, – the hash area sizes for secondary keys.

A record SEARCH key table is always initially set up in a single database page and can be subsequently extended page by page as required for additional records.

Storage space requirements for the DBTT

DATABASE-KEY-TRANSLATION-TABLE IS integer [WITHIN realm-name]

For each record, there must be one line available in the DBTT of the associated record type. integer specifies the number of expected records of the record type, and thus the number of DBTT lines.

– If the database has a page length of 2048 bytes, you may specify a maximum value of 16 777 215 (=224-1) for integer. If the record type in question is the owner in a set, the maximum possible value for integer is 16 711 679.

– If the database has a page length of 4000 or 8096 bytes, the maximum value that can be specified for integer is 231-1.

If the record type is not “owner”, the DBTT consists of exactly one column. Otherwise, one column is added for each reference to

– a pointer array (MODE IS POINTER-ARRAY),

– a list (MODE IS LIST),

– a sort key table (MODE IS CHAIN, ORDER IS SORTED INDEXED), or

– a set SEARCH key table.

UDS/SQL calculates the storage space requirement of the DBTT from the number of lines and columns, and reserves the required number of pages. Since only whole pages or DBTT extents can be reserved for a DBTT, the table can accommodate more lines than specified by integer.

Population SSL

Page 137 of the Fujitsu UDS/SQL V2.5 user manual — Declaring the population
Page 137 · click to enlarge
Page 137

Note, however, that UDS/SQL always creates only as many DBTT pages as required for the DBTT and that, depending on the database page length, a maximum of 224-1 or 224- 216- 1 (=16711679) or 231-1 entries per DBTT can be administered. Since a DBTT base can only be created in whole pages and a DBTT extent only in DBTT extent size (128 PAM pages), an excess amount is usually created if the maximum values are specified. This excess amount is not used.

The DBTT can be extended by means of the BREORG utility routine (see the "Recovery, Information and Reorganization" manual, BREORG).

By default, UDS/SQL reserves one page for a DBTT.

If a secondary key has been defined for a record type for conversion by a hash routine, the size specification for the DBTT also affects the initial size of the hash area (see the section “Size of a hash area for the primary key” on page 138).

SSL Population

Page 138 of the Fujitsu UDS/SQL V2.5 user manual — SSL:
Page 138 · click to enlarge
Page 138

Size of a hash area for the primary key

POPULATION IS {integer WITHIN realm-name},...

The hash area for the primary key of a record type is distributed over several realms if the records of the record type are allocated to several realms by means of the schema DDL (see the section “Defining allocation of records to realms” on page 110).

integer specifies the number of records to be stored in the realm referenced by realm-name. Using this number, UDS/SQL calculates the minimum number of pages required for storing the records (see the section “Direct CALC page” on page 210) or the record addresses (see the section “Indirect CALC page” on page 213) in the respective realm. In each realm, UDS/SQL then reserves a number of pages corresponding to the next higher prime number.

A hash area is extended by means of overflow pages if the data assigned to a page by a hash routine exceeds the maximum capacity of the page. The overflowing page is linked to the overflow page by means of act-keys.

The efficiency of a hash routine can be judged by how evenly it distributes data over the hash area, i.e. how many overflow pages are generated.

A hash area can be subsequently extended by means of the BREORG utility routine (see the "Recovery, Information and Reorganization" manual, BREORG).

By default, UDS/SQL sets up a hash area of one page.

DDL:

RECORD NAME IS ARTICLE

LOCATION MODE IS CALC WITHIN CLOTHING, HOUSEHOLD-GOODS, AREA-ID

SSL:

RECORD NAME IS ARTICLE

POPULATION IS 400 WITHIN CLOTHING, 100 WITHIN HOUSEHOLD-GOODS,

Population SSL · Example

Page 139 of the Fujitsu UDS/SQL V2.5 user manual — Declaring the population
Page 139 · click to enlarge
Page 139

Size of the hash area for a secondary key

integer specifies the number of records of a record type.

– If the database has a page length of 2048 bytes, you may specify a maximum value of 224-1 for integer. If the record type in question is the owner in a set, the maximum possible value for integer is 16 711 679.

– If the database has a page length of 4000 or 8096 bytes, the maximum value that can be specified for integer is 231-1.

Using this number, UDS/SQL not only calculates the size of the DBTT, but also the minimum number of pages required for the distributed storage of the record addresses (see the section “Indirect CALC page” on page 213). UDS/SQL then reserves a number of pages corresponding to the next higher prime number.

A hash area is extended by means of overflow pages if the data assigned to a page by a hash routine exceeds the maximum capacity of the page. The overflowing page is linked to the overflow page by means of act-keys.

A hash area can be extended at a later time by means of the BREORG utility routine (see the "Recovery, Information and Reorganization" manual, BREORG).

By default, UDS/SQL sets up a hash area of one page for each secondary key.

SSL Population · DATABASE-KEY-TRANSLATION-TABLE IS integer

Page 140 of the Fujitsu UDS/SQL V2.5 user manual — 5.2.2 Specifying the size of the set occurrences of a set
Page 140 · click to enlarge
Page 140

5.2.2 Specifying the size of the set occurrences of a set

The size of the set occurrences must be specified in the following cases:

– if you want to store tables and member records in the proximity of the associated owner records,

– if you want to facilitate subsequent table extensions,

– if you want to specify the size of a hash area for secondary keys in a SYSTEM set in order to avoid overflow pages.

integer specifies an average set occurrence population. It should be the value which applies to the majority of the set occurrences.

Based on this specification, UDS/SQL calculates:

– the storage space requirements for pointer arrays, lists, sort key tables and set SEARCH key tables, provided the set is not a SYSTEM set,

– the storage space requirements for the member records of the set occurrences, provided the set is not a SYSTEM set,

– the size of hash areas for secondary keys in a SYSTEM set.

UDS/SQL reserves the storage space calculated for a set occurrence in the next free space following the owner record when storing the owner record.

The default value for integer is 0. In this case, no space is reserved for tables and member records, and one page is reserved for each hash area.

Storage space requirements for pointer array, list, sort key table and set SEARCH key table

Each of the above tables represents or contains all member records of a set occurrence. Each member record corresponds to one line in the associated tables. This means that integer specifies the number of lines in each table of the set occurrence.

Based on the number and the length of lines, UDS/SQL calculates the storage space requirements for the tables.

Population SSL · POPULATION IS integer

Page 141 of the Fujitsu UDS/SQL V2.5 user manual — Specifying the size of the set occurrences of a set
Page 141 · click to enlarge
Page 141

When storing an owner record, UDS/SQL reserves:

– the calculated storage space, if it is smaller than one page, – one page, if the calculated storage space is greater than one page.

for each table belonging to the associated set occurrence.

In the case of SYSTEM sets, UDS/SQL reserves exactly one database page for each table, regardless of the POPULATION clause.

UDS/SQL automatically extends pointer arrays, lists, sort key tables and set SEARCH key tables if the need arises when member records are stored. In order to avoid frequent table extensions, the user can control table size using the following specification in the set POPULATION clause:

POPULATION IS integer-1 INCREASE IS integer-2

integer-2 specifies the number of table lines to be added with the first two table extensions. Following the second extension, integer-2 * 2n (nïnumber of extensions) table lines are added until there is no more space for a further table line. If data other than that belonging to the table is contained in the page, preventing the table from being extended, a subse- quent table extension includes the relocation of the table. In this case, UDS/SQL makes available a page large enough to accommodate the table and its desired extension.

For table extensions beyond the first table page, integer-2 no longer has any effect (see the section “Defining the extent of table reorganization desired” on page 172).

The default value for integer-2 is 1.

Storage space requirements for member records

This only applies to member records which are not included in a list. When the owner is stored, UDS/SQL reserves space for its member records if the PLACEMENT OPTIMIZATION clause is defined for the member record type (see the section “PLACEMENT OPTIMIZATION” on page 165). In this case, UDS/SQL uses the entry in the set occurrence population clause to calculate the storage space requirement for the member records.

SSL Population · Table extensions

Page 142 of the Fujitsu UDS/SQL V2.5 user manual — Specifying the size of the set occurrences of a set
Page 142 · click to enlarge
Page 142

Size of the hash area for a secondary key

Only in the case of SYSTEM sets can a secondary key be used for conversion by a hash routine. UDS/SQL calculates the minimum number of pages required for distributed storage of record addresses on the basis of the set occurrence population entry (see the section “Indirect CALC page” on page 213) and then reserves the number of pages corresponding to the next higher prime number.

If some pages overflow due to uneven data distribution by the hash routine, UDS/SQL automatically sets up overflow pages.

A hash area can be extended at a later time by means of the BREORG utility routine (see the "Recovery, Information and Reorganization" manual, BREORG).

By default, UDS/SQL sets up a hash area with a size of one page.

Population SSL

Page 143 of the Fujitsu UDS/SQL V2.5 user manual — DBTT
Page 143 · click to enlarge
Page 143

5.2.3 Overview of the initial sizes for storage space reservations

Type of data Set type Reserved storage space

Records with PLACEMENT OPTIMIZATION not

According to integer in the set POPULATION clause

List Pointer array Sort key table

According to integer in the set POPULATION clause; maximum one page

SYSTEM

SYSTEM

Set SEARCH key table

One page Record SEARCH key table -

Hash area for set SEARCH key

According to integer in the set POPULATION clause; minimum one page

SYSTEM

Hash area for record SEARCH key

According to integer in the DBTT clause; minimum one page

Hash area for primary key According to integer in the record POPULATION clause; minimum one page

According to integer in the DBTT clause; minimum one page

DBTT

Table 7Initial sizes for storage space reservations

SSL Population

Page 144 of the Fujitsu UDS/SQL V2.5 user manual — ARTICLESAVAILABLE
Page 144 · click to enlarge
Page 144

5.3 Determining the linkage of records

5.3.1 Determining the storage mode for set occurrences

UDS/SQL offers three different storage modes for linking member records to form a set occurrence. These are:

– pointer array (POINTER-ARRAY) – list (LIST), and – chain (CHAIN)

The following example is used in this section to explain the three storage modes:

ARTICLESAVAILABLE

ARTICLE

Figure 32Example of storage modes for set occurrences
Show 6 more labels / short text on this page
Linkage methods SSL · SUPPLIER Moore · Milk · Cocoa · Gin · Beer
Page 145 of the Fujitsu UDS/SQL V2.5 user manual — – ORDER IS SORTED
Page 145 · click to enlarge
Page 145

Storing a set occurrence as a pointer array

MODE IS POINTER-ARRAY

If MODE IS POINTER-ARRAY is defined for a set, UDS/SQL links the member records of its set occurrences via a table called a pointer array.

This table contains pointers to each member record of a set occurrence. A pointer consists of the RSQ of the member record and the PPP of the page containing the member record (see page 224, Table line).

The further contents of the pointer array depend on which ORDER clause was defined for the set in the schema DDL.

– ORDER IS LAST/FIRST/NEXT/PRIOR/IMMATERIAL or SORTED INDEXED BY DATABASE-KEY

The pointer array contains only the pointers to the member records of the set occur- rence.

– ORDER IS SORTED INDEXED BY DEFINED KEYS

In addition to the pointers to the member records of the set occurrence, the pointer array contains the associated values of the primary key.

– ORDER IS SORTED

This entry is not allowed for a pointer array.

SSL Linkage methods

Page 146 of the Fujitsu UDS/SQL V2.5 user manual — RSQ
Page 146 · click to enlarge
Page 146

Owner record DBTT Pointer array Member records

Gin .

RSQ

+ PPP

Figure 33Set occurrence stored as a pointer array

If a pointer array occupies more than one page, each page is connected by act-keys twice. If ORDER IS SORTED INDEXED, the pointer array is provided with additional higher- ranking table levels. Each higher-ranking level has the same structure as the lowest level, but contains only the last table entry of the pages containing the next lower level. The PPPs pointing to the member records are replaced by the act-key of the page where the table entry originates (see page 228, figure 59).

Show 10 more labels / short text on this page
Linkage methods SSL · Beer · Cocoa · Beer · Gin · Cocoa · Moore · Milk · Primary key · Milk
Page 147 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS POINTER-ARRAY.....WITH PHYSICAL LINK
Page 147 · click to enlarge
Page 147

Additional pointer from owner to its pointer array

MODE IS POINTER-ARRAY WITH PHYSICAL LINK

The standard UDS/SQL link between an owner record and the pointer array of its member records is via the DBTT. The user can bypass the DBTT and save one page access by specifying WITH PHYSICAL LINK, which generates a pointer to the pointer array in the owner record.

Fujitsu UDS/SQL V2.5 — MODE IS POINTER-ARRAY.....WITH PHYSICAL LINK diagram (page 147)
Fig. 6

Figure 34Additional pointer from owner → pointer array

This entry is not permitted in SYSTEM sets, where both the function of the owner record and of the DBTT is assumed by an anchor record.

SSL Linkage methods

Page 148 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS LIST
Page 148 · click to enlarge
Page 148

Storing a set occurrence as a list

MODE IS LIST

If a set is defined with MODE IS LIST, UDS/SQL stores the member records of a set occur- rence in a table called a list. The physical sequence of the records corresponds to the logical sequence defined in the ORDER clause.

Owner record DBTT List

Gin . . .

Figure 35Set occurrence stored as a list

If a list occupies more than one page, each page is linked twice by act-keys.

If ORDER IS SORTED INDEXED, the list is provided with additional higher-ranking table levels. The higher-ranking levels have the same structure as that of a pointer array.

Show 5 more labels / short text on this page
Linkage methods SSL · Beer · Cocoa · Moore · Milk
Page 149 of the Fujitsu UDS/SQL V2.5 user manual — Determining the linkage of records
Page 149 · click to enlarge
Page 149

The physical placement of records can be defined only once:

– If a record type is a member of several sets, only one of the sets can be defined with MODE IS LIST.

– It is not possible to define records with MODE IS LIST and PLACEMENT OPTIMIZATION at the same time (see the section “PLACEMENT OPTIMIZATION” on page 165).

– If the records of a record type are placed both by LOCATION MODE IS CALC and MODE IS LIST, they are stored in lists, and the hash area consists of indirect CALC pages.

The following restrictions also apply:

MODE IS LIST may only be specified if the set membership has been defined as MANDATORY AUTOMATIC in the schema DDL (see the section “Defining the type of membership of records in a set” on page 79).

MODE IS LIST may not be specified in the following cases:

– if the record lengths (including pointers; see page 220, SCD) exceed

– 993 bytes in a database with a 2048-byte page length (2-Kbyte page format) – 1963 bytes in a database with a 4000-byte page length (4-Kbyte page format) – 4011 bytes in a database with a 8096-byte page length (8-Kbyte page format)

(At least two records must fit in a list, but this would not be possible in the above cases.)

– if a member record type contains an item of variable length;

– if the order of the records within the set occurrence is defined with ORDER IS SORTED (without INDEXED) or

– if member records are to be stored in compressed form (see the section “Storing the records of a record type in compressed form” on page 176).

SSL Linkage methods

Page 150 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS LIST.....WITH PHYSICAL LINK
Page 150 · click to enlarge
Page 150

Additional pointer from owner to its list

MODE IS LIST WITH PHYSICAL LINK

The UDS/SQL standard connection between an owner record and the list of its member records is via the DBTT. The user can bypass the DBTT and save one page access by specifying WITH PHYSICAL LINK, which generates a pointer to the list in the owner record.

Owner record DBTT List

Gin . . .

Figure 36Additional pointer from owner → list

This entry is ignored by the compiler in SYSTEM sets, where both the function of the owner record and the DBTT are assumed by an anchor record. The user is informed by a warning.

Show 5 more labels / short text on this page
Linkage methods SSL · Beer · Cocoa · Moore · Milk
Page 151 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS CHAIN
Page 151 · click to enlarge
Page 151

Storing a set occurrence as a chain

MODE IS CHAIN

If MODE IS CHAIN is defined for a set, each set occurrence of the set is stored as a closed chain of records. The chain comprises the owner record and all member records of the set occurrence. The member records are chained by means of pointers in the order defined in the ORDER clause for the set in the schema DDL. The position of the owner record is between the last and the first member record.

The pointer is composed of the database key value of the subsequent record in the chain and the PPP of the page containing this record.

. . . Cocoa

. . . Gin

. . . Beer

. . . Milk .

Moore .

Figure 37Set occurrence stored as a chain

The chain is the only storage mode applicable if the set has been defined with ORDER IS SORTED (without INDEXED) in the schema. If ORDER IS SORTED INDEXED, a table is set up as an additional path for direct access. This table is referred to as the sort key table. Its structure is the same as that of a multi-level pointer array.

SSL Linkage methods

Page 152 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS CHAIN LINKED TO PRIOR
Page 152 · click to enlarge
Page 152

Additional backward chaining for chain

MODE IS CHAIN LINKED TO PRIOR

In addition to standard forward chaining, the records of a chain can be concatenated in reverse order. If LINKED TO PRIOR is specified, a further pointer is added to each record pointing to the logically preceding record. In the same way as forward chaining, the pointer is composed of the database key value of the preceding record and the PPP of the page containing this record.

Fujitsu UDS/SQL V2.5 — MODE IS CHAIN LINKED TO PRIOR diagram (page 152)
Fig. 7
Figure 38Additional backward chaining for chain

Backward chaining is important for large set occurrences where prior records are frequently the object of a search.

Linkage methods SSL

Page 153 of the Fujitsu UDS/SQL V2.5 user manual — 5.3.2 Assessing pointer array, list and chain
Page 153 · click to enlarge
Page 153

5.3.2 Assessing pointer array, list and chain

The time required for the execution of a program depends on the storage modes defined for the set occurrences.

This section compares retrieval and updating operations when using pointer arrays, lists and chains. The retrieval operations are subdivided into sequential and direct accesses. Updating operations dealt with are insertion and deletion.

  • Sequential access

The pointer array must be present in memory. This is almost always the case whenever a member record of the set occurrence has already been accessed via the set. One entry in the pointer array must then be read before the associated record can be read. The number of disk accesses depends on how records are distributed over the pages and can be reduced by optimizing the placement of the records (see the sections “Natural optimization” on page 164 and “PLACEMENT OPTIMIZATION” on page 165).

  • Direct access

– ORDER IS SORTED INDEXED: All levels of the pointer array must be in memory. The higher levels are used to select the number of the page containing the entry of the record to be found. One disk access is required for each level of the table.

– ORDER IS LAST/FIRST/NEXT/PRIOR: UDS/SQL must search the set occurrence sequentially until the desired record is found. This may require a considerable number of disk accesses.

  • Insertion

In order to insert an entry, the place of insertion in the pointer array must be determined. If ORDER IS SORTED INDEXED, this is possible via direct access. If ORDER IS LAST/FIRST, UDS/SQL can directly access the last or first table page respectively. If ORDER IS NEXT/PRIOR, the place of insertion is found via the currency information or by sequentially reading the pointer array. Writing the record usually requires a further disk access.

  • Deletion

The record and its associated entry in the pointer array must be deleted.

  • Result

MODE IS POINTER-ARRAY allows speedy sequential and direct access and updating operations. The response times are largely independent of the order of the sets and the size of the set occurrences.

SSL Linkage methods · Pointer arrays

Page 154 of the Fujitsu UDS/SQL V2.5 user manual — Assessing pointer array, list and chain
Page 154 · click to enlarge
Page 154
  • Sequential access

If MODE IS LIST, the records are grouped together in a contiguous storage area. This storage mode offers fastest sequential processing. The number of accesses when processing large numbers of records depends on the record length.

  • Direct access

If ORDER IS SORTED INDEXED, all levels of the list must be in memory. The higher levels are used to select the number of the page containing the record. One disk access is required for each level of the table. The number of levels depends on the record length. If ORDER IS SORTED INDEXED has not been defined, UDS/SQL must search the set occurrence from the beginning. The number of disk accesses required for this depends to a large degree on the record length and the size of the set occurrence.

  • Insertion

If ORDER IS SORTED INDEXED, UDS/SQL finds the place where the record is to be inserted by means of direct access. Otherwise UDS/SQL requires a maximum of two disk accesses. Insertion of a record may necessitate re-storage of a number of records by UDS/SQL.

  • Deletion

In general, UDS/SQL need modify only the page from which the record is to be deleted.

  • Result

MODE IS LIST offers the fastest sequential access mode. If an updating operation causes a change in the record sequence, this may result in the physical relocation of records. The PPPs in SEARCH key tables pointing to these records are then no longer valid.

The access behavior depends to a large degree on the order and size of the set occur- rences.

Linkage methods SSL · List

Page 155 of the Fujitsu UDS/SQL V2.5 user manual — Assessing pointer array, list and chain
Page 155 · click to enlarge
Page 155
  • Sequential access

When records are processed in their logical order, a maximum of one disk access for each member record is required. The number of accesses can be considerably reduced by optimizing the placement of the records (see page 165). If the logical order is not adhered to, UDS/SQL will normally have to search large parts of the set occurrence which may involve a large number of disk accesses. It should be noted that for reading a preceding record UDS/SQL must search the set occurrence from the beginning unless backward chaining has been specified.

If the physical placement of the records changes frequently (e.g. if member records for a different set are stored as a list), it is advisable to perform occasional reorganization runs in order to keep the PPPs current (see the "Recovery, Information and Reorgani- zation" manual, BREORG).

  • Direct access

– ORDER IS SORTED INDEXED: Analogous to direct access in pointer array.

– ORDER IS LAST/FIRST/NEXT/PRIOR/SORTED: On average, UDS/SQL must search half a set occurrence to find a record. A maximum of one disk access per record is required.

  • Insertion

When a record is inserted, it is linked to the preceding and to the subsequent record by means of pointers. For this reason, UDS/SQL updates the records preceding and, in the case of backward chaining, following the record inserted.

– ORDER IS SORTED [INDEXED]: UDS/SQL finds the place where the record is inserted by direct access.

– ORDER IS LAST/FIRST/NEXT: A pointer points from the owner record to the preceding record, or the owner record is the preceding record, or the preceding record is immediately obtainable by means of the currency information. Insertion of the record requires a maximum of two disk accesses.

– ORDER IS PRIOR: UDS/SQL must search the set occurrence from the beginning unless backward chaining has been specified. If backward chaining has been specified, insertion of a record requires a maximum of three disk accesses.

SSL Linkage methods · Chain

Page 156 of the Fujitsu UDS/SQL V2.5 user manual — Assessing pointer array, list and chain
Page 156 · click to enlarge
Page 156
  • Deletion

UDS/SQL must find the record to be deleted and also the record preceding it. This requires less time if backward chaining has been specified. In the case of backward chaining, UDS/SQL must also update the pointer in the subsequent record. If ORDER IS SORTED INDEXED, the entry made for this record in the sort key table must be deleted.

  • Result

MODE IS CHAIN allows fast sequential access if the records are processed in the sequence defined in the ORDER clause.

If the ORDER clause specifies SORTED INDEXED, fast direct access is possible even in large set occurrences. If ORDER IS SORTED is specified, insertions are slower and depend on the number of member records in the set occurrence. Modifications of the primary key are relatively time consuming.

If the order of the member records is immaterial, the fastest mode of storing records is achieved by specifying MODE IS CHAIN and ORDER IS NEXT or ORDER IS FIRST.

Linkage methods SSL

Page 157 of the Fujitsu UDS/SQL V2.5 user manual — 5.3.3 Preventing redundancy in SEARCH key tables
Page 157 · click to enlarge
Page 157

5.3.3 Preventing redundancy in SEARCH key tables

TYPE IS DATABASE-KEY-LIST

In the description of the logical data structure drawn up using the schema DDL, the user decides if UDS/SQL is to set up a SEARCH key table (SEARCH KEY IS... USING INDEX). The form of this table can be influenced by means of the TYPE clause.

The UDS/SQL standard form of SEARCH key table is that of a multi-level pointer array: It consists of one line for every record of the associated record type or for each member record of the associated set occurrence. This line contains the key value of the record and the pointer to the record. (This standard form corresponds to the specification: TYPE IS REPEATED-KEY.)

Different records can often have the same key values (DUPLICATES ARE ALLOWED). In such cases, TYPE IS DATABASE-KEY-LIST can be specified; this ensures that a key value with duplicates is stored only once.

This type of SEARCH key table is referred to as a duplicates table. Duplicates tables are useful

– in the case of long keys,

– if several key values have between 5 and 2000 duplicates,

– when processing large numbers of records (see the "Application Programming" manual, FIND 7).

A third overflow page must be generated by UDS/SQL in the following cases:

– if there are more than approximately 2000 duplicates in a 2-Kbyte or 4-Kbyte database

– if there are more than approximately 4000 duplicates in an 8-Kbyte database.

This has an adverse effect on the access behavior (one additional access per overflow page), which should be weighed against the saving in space achieved. Duplicates tables are set up by UDS/SQL on the lowest level only. Higher table levels are comparable to those of a standard SEARCH key table.

SSL Linkage methods

Page 158 of the Fujitsu UDS/SQL V2.5 user manual — Preventing redundancy in SEARCH key tables
Page 158 · click to enlarge
Page 158
Fujitsu UDS/SQL V2.5 — Preventing redundancy in SEARCH key tables diagram (page 158)
Fig. 8 · Preventing redundancy in SEARCH key tables
Figure 39Comparison of standard SEARCH key table with duplicates table

The pointers in the duplicates table are the RSQs of the associated records. The pointers associated with the same key value are sorted in ascending order according to RSQs. Thus an additional access to the DBTT is required to find the pages containing the records.

Linkage methods SSL

Page 159 of the Fujitsu UDS/SQL V2.5 user manual — 5.3.4 Adding a pointer to link a member to its owner
Page 159 · click to enlarge
Page 159

5.3.4 Adding a pointer to link a member to its owner

MEMBER IS PHYSICALLY LINKED TO OWNER

This entry specifies that each member record of a set is provided with a pointer to the associated owner record. This pointer is a PPP. It optimizes access to the owner record if one of its member records has already been selected (see the "Application Programming" manual, FIND 6). Such accesses are often required in parts list processing, for example.

This must not be specified for a SYSTEM set.

SSL Linkage methods

Page 160 of the Fujitsu UDS/SQL V2.5 user manual — 5.4 Defining the placement of member records, tables and hash areas
Page 160 · click to enlarge
Page 160

5.4 Defining the placement of member records, tables and hash areas

The SSL provides options to define the placement of the following objects:

– member records – lists – pointer arrays – sort key tables – SEARCH key tables – DBTTs – hash areas.

These options include, in particular:

– For member records, lists, pointer arrays, sort key tables and set SEARCH key tables, you can define not only the realm that is to contain the records but also the concen- tration of data in one page or in contiguous pages within this realm.

– In the case of hash areas, DBTTs and record SEARCH key tables, it is only possible to define the realm in which they are to be stored.

5.4.1 Defining the placement of member records, associated tables and hash areas for secondary keys

This section covers the possibilities of defining the placement of data belonging to one set occurrence. Such data may be:

– an owner record – member records or list – a pointer array – a sort key table – a set SEARCH key table – a hash area for the set secondary key

Placement SSL

Page 161 of the Fujitsu UDS/SQL V2.5 user manual — Placement at realm level
Page 161 · click to enlarge
Page 161

5.4.1.1 Placement at realm level

The following clauses are used to allocate data to certain realms without specifying its position within the realm.

Owner record, member records

WITHIN clause of the schema DDL (see the section “Defining allocation of records to realms” on page 110).

MODE IS LIST DETACHED [WITHIN realm-name]

MODE IS POINTER-ARRAY DETACHED [WITHIN realm-name]

Sort key table, set SEARCH key table, hash area for set secondary key

INDEX NAME IS name PLACING IS DETACHED [WITHIN realm-name]

realm-name specifies the name of the realm that is to contain the list, pointer array, sort key table, set SEARCH key table or hash area.

If this entry is omitted, UDS/SQL places the lists, pointer arrays or sort key tables in the realm of the associated owner record, unless the set is a SYSTEM set. In the case of a non-dynamic SYSTEM set, these tables or hash areas are automatically placed in the first realm referred to in the DDL WITHIN clause for the member record type. A dynamic set is stored in the temporary realm by UDS/SQL.

The placement of a list is determined without a DETACHED WITHIN clause by the placement of the owner.

SSL Placement · List · Pointer array

Page 162 of the Fujitsu UDS/SQL V2.5 user manual — Placement at realm level
Page 162 · click to enlarge
Page 162

If no entry is made for a set SEARCH key table or hash area, UDS/SQL selects the realm according to the following principle:

Realm of the associated owner record

Is the set a SYSTEM set?

Has a realm name been defined for

the list, pointer array or sort key

Has a realm name been defined for

the first secondary key defined for

this set in the schema DDL?

First realm specified in the DDL WITHIN clause for the

Figure 40Default value for realm-name

name specifies the name of the sort or SEARCH key table to be placed. This name must have been assigned in the schema DDL (see the section “Assigning names to hash areas and tables” on page 107).

Show 10 more labels / short text on this page
Placement SSL · No · Yes · table of set? · Yes · No · Specified realm · Yes · No · member record type
Page 163 of the Fujitsu UDS/SQL V2.5 user manual — Placement within a realm
Page 163 · click to enlarge
Page 163

5.4.1.2 Placement within a realm

Within a realm, data belonging to one set occurrence can be stored contiguously. If, for example, member records are stored as list, they are physically stored in one page until the page is completely filled. The other possibilities relate to the storage of member records and the associated tables in the proximity of the owner record. These are:

– Natural optimization Owner proximity for lists, pointer arrays, sort key tables, set SEARCH key tables and member records

– PLACEMENT OPTIMIZATION Owner proximity for member records

– MODE clause Owner page contains pointer array or list

– INDEX clause Owner page contains sort key table or set SEARCH key table

SSL Placement

Page 164 of the Fujitsu UDS/SQL V2.5 user manual — MARTIN
Page 164 · click to enlarge
Page 164

If the user does not influence the placement of data within a realm by means of the DDL and SSL, UDS/SQL physically stores the data in the chronological order in which it is entered. Thus, at initial load time or later on when running unload or load programs, the user can select the load sequence in such a manner that a complete set occurrence with all associated tables is stored in contiguous pages. Unlike other optimization methods, natural optimization is effective over several levels of hierarchy. This method is especially useful if the user recognizes critical access paths. In this case, data must be stored in the same sequence as in the critical access path.

MARTIN

CUSTOM ER

WALKER

CUSTOMER-

ORDERS

ITEM

Figure 41Load sequence for natural optimization

In this example, the access behavior on the critical access path CUSTOMER, CUSTOMER- ORDER, ITEM is improved by the specified load sequence. The emphasis has been placed on the optimization of the CUSTOMER-ORDER, ITEM path.

Show 11 more labels / short text on this page
Placement SSL · Natural optimization · Example · Razor · Battery · Radio · Transistor · Battery · Iron · Radio · Razor
Page 165 of the Fujitsu UDS/SQL V2.5 user manual — PLACEMENT OPTIMIZATION
Page 165 · click to enlarge
Page 165

PLACEMENT OPTIMIZATION

PLACEMENT OPTIMIZATION FOR SET set-name

set-name specifies the name of the set to be optimized as an access path. It must not be a SYSTEM set. This entry is to be added to the member record type of the set. As a result of this entry, UDS/SQL reserves sufficient storage space immediately after the owner record (when storing it) to hold the following information:

– Number of member records as specified in the POPULATION clause (see the section “Storage space requirements for member records” on page 141).

– If member records are owners in other sets: all tables to be stored in the pages of these records using ATTACHED (see the sections “MODE clause” on page 166 and “INDEX clause” on page 167).

A prerequisite is that placement has not been specified for the owner record type of the specified set using:

– LOCATION MODE IS CALC – MODE IS LIST or – PLACEMENT OPTIMIZATION

In the case of a record type defined in the schema DDL with LOCATION MODE IS CALC, PLACEMENT OPTIMIZATION generates indirect CALC pages.

If the set is defined with MODE IS LIST then PLACEMENT OPTIMIZATION is ignored.

SSL Placement

Page 166 of the Fujitsu UDS/SQL V2.5 user manual — Placement within a realm
Page 166 · click to enlarge
Page 166

⎧POINTER-ARRAY⎫ MODE IS ⎨ ⎬ ATTACHED TO OWNER ⎩LIST ⎭

This entry is not permitted in SYSTEM sets.

If a set occurrence population greater than zero has been specified for the set (see the section “Specifying the size of the set occurrences of a set” on page 140), UDS/SQL sets up all the tables of a set occurrence subsequent to the owner record when the owner record is stored. A table for which ATTACHED has been specified takes precedence over other tables in that it is stored in the space immediately following the owner. Even if the owner is a member of a set for which space has been reserved with the PLACEMENT OPTIMIZATION clause, UDS/SQL takes into account the storage space requirements for an associated ATTACHED table so that the owner record can be stored contiguously with the table (see the section “PLACEMENT OPTIMIZATION” on page 165).

If zero has been specified as set occurrence population, UDS/SQL sets up a table when the first member record is stored. In this case, ATTACHED results in UDS/SQL setting up the table as close as possible to the owner record.

ATTACHED is thus a means of making the owner record and its associated table available in one disk access, provided there is enough space for the table in the owner page.

A prerequisite is that the owner record type has not been defined with LOCATION MODE IS CALC, as space reservation for member records and tables is not possible in hash areas.

Placement SSL · MODE clause

Page 167 of the Fujitsu UDS/SQL V2.5 user manual — Placement within a realm
Page 167 · click to enlarge
Page 167

INDEX NAME IS name PLACING IS ATTACHED TO OWNER

This entry is not permitted for SYSTEM sets. It is used to place tables of primary and secondary keys in the proximity of the associated owner.

For further details on the ATTACHED entry see the MODE clause.

name specifies the name of the table to be placed. It must have been assigned in the schema DDL (see the section “Assigning names to hash areas and tables” on page 107).

SSL Placement · INDEX clause

Page 168 of the Fujitsu UDS/SQL V2.5 user manual — DBTT
Page 168 · click to enlarge
Page 168

5.4.2 Defining the placement of record SEARCH key table, DBTT and record hash areas

For this data, the user can specify only the realm in which it is to be stored.

The following clauses are used to allocate data to specific realms:

Record SEARCH key table

NDEX NAME IS name PLACING IS WITHIN realm-name

DBTT

Hash area for primary key

POPULATION IS {integer WITHIN realm-name},...

Hash area for record secondary key

INDEX NAME IS name PLACING IS WITHIN realm-name

name specifies the name of the table or hash area to be placed. This name must have been assigned in the schema DDL (see the section “Assigning names to hash areas and tables” on page 107).

realm-name specifies the realm in which the table or the hash area is to be stored. If no realm name is specified, UDS/SQL stores the DBTT and the secondary keys in the realm specified first in the DDL WITHIN clause for this record type. The hash area for primary keys is always set up according to the DDL WITHIN specification.

Placement SSL · DATABASE-KEY-TRANSLATION-TABLE WITHIN realm-name

Page 169 of the Fujitsu UDS/SQL V2.5 user manual — SET NAME IS CUSTOMER-ORDERS-PLACED
Page 169 · click to enlarge
Page 169

DDL: SET NAME IS CUSTOMER-ORDERS-PLACED

. . . OWNER IS CUSTOMER. MEMBER IS CUSTOMER-ORDER

SSL: RECORD NAME IS CUSTOMER-ORDER

PLACEMENT OPTIMIZATION FOR SET CUSTOMER-ORDERS-PLACED.

SET NAME IS CUSTOMER-ORDERS-PLACED

POPULATION IS 10 MODE IS POINTER-ARRAY ATTACHED TO OWNER INDEX NAME IS SEARCH-TAB-C-ORD-PLCD

PLACING IS DETACHED.

In this example, UDS/SQL would arrange the records and table of the set as follows:

cust. 1 10-line pointer array

10 orders of cust. 1

10-line SEARCH key table cust. 2

10-line SEARCH key table . . .

cust. 3 10-line ptr. array

10 orders of cust. 2

Figure 42Placement of data based on the above definition

SSL Placement · Example

Page 170 of the Fujitsu UDS/SQL V2.5 user manual — POINTERARRAY/ CHAIN
Page 170 · click to enlarge
Page 170

5.4.3 Overview of placement statements

WITHIN realm- name,...

Member records in set with LOCA- TION MODE IS CALC

records OWNER IS SYSTEM

PLACEMENT OPTIMIZATION FOR SET

MODE IS ...

DETACHED - list in owner realm

LIST

DETACHED WITHIN

- list in DETACHED- WITHIN realm

yes hash area in WITHIN realm

DETACHED

POINTERARRAY

no in WITHIN realm

DETACHED WITHIN

yes hash area in WITHIN realm

no in WITHIN realm

yes in WITHIN realm

CHAIN -

no in WITHIN realm

ATTACHED - list of owner

DETACHED - list of owner

LIST

DETACHED WITHIN

hash area (indirect CALC) in WITHIN realm; record of owner

POINTERARRAY/ CHAIN

ATTACHED - list of owner

DETACHED - list in owner realm

LIST

DETACHED WITHIN

- list in DETACHED- WITHIN realm

POINTERARRAY/ CHAIN

yes hash area in WITHIN realm

no in WITHIN realm

Table 8Placement statements for records
Show 15 more labels / short text on this page
Placement SSL · Type of data · Placement of the · yes not permitted · ATTACHED not permitted · records manda- tory · ATTACHED not permitted · yes · no · not permitted · yes · yes · no with owner · no · no
Page 171 of the Fujitsu UDS/SQL V2.5 user manual — DBTT
Page 171 · click to enlarge
Page 171

MODE, INDEX or DBTT clause specifications

ATTACHED TO OWNER Owner realm next to owner

first realm in WITHIN clause for member record type

List Pointer array Sort key table Set SEARCH key table

SYSTEM DETACHED 1)

according to time of storage

not SYSTEM or SYSTEM DETACHED WITHIN realm-name

Pointer array dynamic temporary realm

first realm in WITHIN clause for member record type

- Hash area for set SEARCH key SYSTEM

DETACHED

DETACHED WITHIN realm-name realm specified

Record SEARCH key table

according to time of storage default first realm in WITHIN clause

WITHIN realm-name realm specified

Hash area for record SEARCH key

default first realm in WITHIN clause

Hash area for primary key

- realms in WITHIN clause

DBTT WITHIN realm-name realm specified

default first realm in WITHIN clause

DBTT

Table 9Placement statements for tables and hash areas

1 For set SEARCH key tables for a SYSTEM set, refer to the default values for realm-name in figure 40.

Show 8 more labels / short text on this page
SSL Placement · Placement · Type of data · Type of Set · Realm within realm · not SYSTEM · realm specified · WITHIN realm-name
Page 172 of the Fujitsu UDS/SQL V2.5 user manual — 5.5 Defining the extent of table reorganization desired
Page 172 · click to enlarge
Page 172

5.5 Defining the extent of table reorganization desired

DYNAMIC REORGANIZATION SPANS integer PAGES

If, when records are stored, the storage space requirements are formed to exceed those initially calculated on the basis of the POPULATION clause, UDS/SQL automatically performs a table extension. A table that is not quite the size of a page but that cannot be extended by at least two table lines within its page is continued in a further page by UDS/SQL. If a table spans several pages, however, and the part to be extended requires an entire page, UDS/SQL can search a certain number of the pages containing the logically adjacent parts of the table for free space.

integer denotes the number of table pages to be searched. In the case of pointer arrays, lists, sort key tables and set SEARCH key tables, this specification only takes effect if the set has not been defined with ORDER IS LAST/FIRST.

The pages to be searched are, at the same time, the pages submitted to UDS/SQL for dynamic reorganization.

If UDS/SQL finds free space for a new table entry within these pages, this space is relocated to the place where the table entry is to be inserted.

If, however, all pages searched are completely filled with table entries, UDS/SQL extends the table by one empty page after the searched pages. Further reorganization depends on the place at which the table entry is inserted.

1. The table entry is to be inserted in the table but not at the beginning or at the end: UDS/SQL evenly distributes the contents of the searched pages and the new table entry over the storage space which has been extended by one page.
2. The table entry is to be appended at the end of the table. The new page contains the last table entry and the new table entry.
3. The table entry is to be inserted at the beginning of the table: UDS/SQL moves the contents of the first table page, with the exception of the first entry, to the new page. The table entry to be inserted is stored in the first page.

By this method, a high occupancy level is achieved for the table pages. In cases 2) and 3), the occupancy level is obtained using the following formula:

n-1 Occupancy level [%] = LRLRLR x 100 n

where n is the maximum number of table entries per page.

REORGANIZATION clause SSL

Page 173 of the Fujitsu UDS/SQL V2.5 user manual — DYNAMIC REORGANIZATION SPANS 1 PAGES
Page 173 · click to enlarge
Page 173

In case 1), the occupancy level is dependent on the integer specified. It must not fall below the following value:

integer Minimum occupancy level [%] = LRLRLRLRLRLRLRLRLR x 100. integer+1

This means that high occupancy levels are most easily obtained if records are stored in sorted order. High occupancy levels reduce storage space requirements for tables and result in shorter access paths.

In order to obtain high occupancy levels by dynamic reorganization, the following must be taken into consideration:

High values for integer

– are more acceptable for pointer arrays, sort and SEARCH key tables than for lists; – are more acceptable for records that remain unchanged than for frequently changing records.

Dynamic reorganization cannot be used for dynamic sets; for multi-level tables it can only be applied on the lowest table level. Duplicates tables cannot be dynamically reorganized.

The default value for integer is 2.

DYNAMIC REORGANIZATION SPANS 1 PAGES

Page 1 Page 2 Page 3 Page 4

Figure 43Inserting a record without reorganization

Record 854 can be inserted without reorganization.

SSL REORGANIZATION clause · Examples

Page 174 of the Fujitsu UDS/SQL V2.5 user manual — Defining the extent of table reorganization desired
Page 174 · click to enlarge
Page 174

In order to insert record 650 (see below), UDS/SQL must set up a new page, since page 2 is completely occupied. The new page accepts as many entries from page 2 as is necessary to ensure even distribution of records over the two pages.

Page 1 Page 2 Page 4 Page 5

Figure 44Inserting a record with table extension and subsequent reorganization
Show 4 more labels / short text on this page
REORGANIZATION clause SSL · 1011 854 611 · 470 950 · Page 3
Page 175 of the Fujitsu UDS/SQL V2.5 user manual — DYNAMIC REORGANIZATION SPANS 3 PAGES
Page 175 · click to enlarge
Page 175

DYNAMIC REORGANIZATION SPANS 3 PAGES

Based on figure 43, the following situation results from inserting record 650.

Page 1 Page 3 Page 4

Figure 45Inserting a record by shifting free space
Show 4 more labels / short text on this page
SSL REORGANIZATION clause · Page 2 · 650 894 · 470 950
Page 176 of the Fujitsu UDS/SQL V2.5 user manual — COMPRESSION FOR ALL ITEMS
Page 176 · click to enlarge
Page 176

5.6 Storing the records of a record type in compressed form

COMPRESSION FOR ALL ITEMS

A record type containing an item of variable length may not be compressed. Under CALL DML, records can be compressed by storing only part of the items belonging to the record type (see the "Application Programming" manual, STORE 2). The COMPRESSION clause is used if UDS/SQL is not to fill the omitted items with standard values, but is to store records in the compressed form in which they exist at the CALL interface.

For record types defined with LOCATION MODE IS CALC in the schema DDL compression generates indirect CALC pages.

If this clause is specified, no records of the record type can be updated with SQL.

COMPRESSION clause SSL

Page 177 of the Fujitsu UDS/SQL V2.5 user manual — 5.7 Formulas for calculating the storage space requirements for records and tables
Page 177 · click to enlarge
Page 177

5.7 Formulas for calculating the storage space requirements for records and tables

The storage space requirement for records varies depending on whether they are stored in a direct hash area, whether an indirect hash area is set up for them and which type of connection has been specified for them. table 10 and table 11 contain formulas to calculate the storage space requirement. These formulas differ, depending on whether the page length of the database is 2048 bytes, 4000 bytes or 8096 bytes.

Calculation formulas for a database with a 2048-byte page length

in the data page 2028 LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR record length1+8

in the direct CALC page 2018 LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR record length+key length+15

Number of entries in the indirect CALC page 2018 LRLRLRLRLRLRLRLRLRLRLRLR key length+7

List 2002 LRLRLRLRLRLRLRLRLRLRLRLR key length+8

Number of table entries per page in a:

sort key table 3

2002 LRLRLRLRLRLRLRLRLRLRLRLR key length+7

SEARCH key table (TYPE IS REPEATED-KEY)

Table 10Calculation formulas for a database with a 2048-byte page length

SSL Calculation formulas · Number of records · pointer array 2

Page 178 of the Fujitsu UDS/SQL V2.5 user manual — Formulas for calculating the storage space requirements for records and tables
Page 178 · click to enlarge
Page 178

Calculation formulas for a database with a 4000 or 8096-byte page length

in the data page page length-20 LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR record length1 +12

in the direct CALC page page length-30 LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR record length+key length+22

Number of entries in the indirect CALC page page length-30 LRLRLRLRLRLRLRLRLRLRLRLRLRLR key length+10

List page length-50 LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR record length+12

Number of table entries per page in a:

sort key table 3

page length-50 LRLRLRLRLRLRLRLRLRLRLRLRLRLR key length+10

SEARCH key table (TYPE IS REPEATED-KEY)

Table 11Calculation formulas for a database with a 4000 or 8096-byte page length

The record length is the length of a record according to the schema DDL plus the length of its pointers (see page 224, SCD)

⎧LAST ⎫ FIRST NEXT If ORDER IS ⎨ ⎬ key length = 0 PRIOR IMMATERIAL ⎩SORTED INDEXED BY DATABASE-KEY⎭

If ORDER IS SORTED INDEXED BY DATABASE-KEY key length = 0

Calculation formulas SSL · Number of records · pointer array 2

Page 179 of the Fujitsu UDS/SQL V2.5 user manual — DATABASE-KEY-TRANSLATION-TABLE IS 1000. * RECORD NAME IS INSTALMENT
Page 179 · click to enlarge
Page 179

5.8 Comprehensive example of SSL application

STORAGE STRUCTURE OF SCHEMA MAIL-ORDERS. * * RECORD NAME IS CUSTOMER

DATABASE-KEY-TRANSLATION-TABLE IS 100. * RECORD NAME IS CST-ORDERS

DATABASE-KEY-TRANSLATION-TABLE IS 400 PLACEMENT OPTIMIZATION FOR SET CST-ORD-PLACED. * RECORD NAME IS ORD-ITEM

DATABASE-KEY-TRANSLATION-TABLE IS 1000. * RECORD NAME IS INSTALMENT

DATABASE-KEY-TRANSLATION-TABLE IS 50 INDEX NAME IS SEARCH-TAB-INSTALMENT TYPE IS DATABASE-KEY-LIST. * RECORD NAME IS ART-TYPE

DATABASE-KEY-TRANSLATION-TABLE WITHIN ARTICLE-RLM INDEX NAME IS SEARCH-TAB-ART-TYPE PLACING IS WITHIN ARTICLE-RLM. * RECORD NAME IS ART-SELECTION

DATABASE-KEY-TRANSLATION-TABLE WITHIN ARTICLE-RLM INDEX NAME IS SEARCH-TAB-ARTICLE-SELECTION PLACING IS WITHIN ARTICLE-RLM DYNAMIC REORGANIZATION SPANS 5 PAGES. * RECORD NAME IS ART-DESCR

DATABASE-KEY-TRANSLATION-TABLE IS 300 WITHIN ARTICLE-RLM POPULATION IS 200 WITHIN CLOTHING, 100 WITHIN HOUSEHOLD-GOODS, 200 WITHIN SPORTS-ARTICLES, 70 WITHIN FOOD, 200 WITHIN LEISURE, 100 WITHIN STATIONERY. * RECORD NAME IS ARTICLE

DATABASE-KEY-TRANSLATION-TABLE IS 600 WITHIN ARTICLE-RLM POPULATION IS 400 WITHIN CLOTHING, 100 WITHIN HOUSEHOLD-GOODS, 400 WITHIN SPORTS-ARTICLES, 150 WITHIN FOOD, 400 WITHIN LEISURE,

SSL SSL example

Page 180 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS CHAIN LINKED TO PRIOR. *
Page 180 · click to enlarge
Page 180

250 WITHIN STATIONERY INDEX NAME IS SEARCH-TAB-ARTICLE-1 PLACING IS WITHIN ARTICLE-RLM INDEX NAME IS SEARCH-TAB-ARTICLE-2 PLACING IS WITHIN ARTICLE-RLM. * RECORD NAME IS MATERIALS

INDEX NAME IS SEARCH-TAB-MATERIAL-1 DYNAMIC REORGANIZATION SPANS 5 PAGES INDEX NAME IS SEARCH-TAB-MATERIAL-2 DYNAMIC REORGANIZATION SPANS 5 PAGES. * RECORD NAME IS SUPPLIER

DATABASE-KEY-TRANSLATION-TABLE IS 500 POPULATION IS 200 WITHIN PURCHASE-ORDER-RLM. * RECORD NAME IS PURCHASE-ORDER

DATABASE-KEY-TRANSLATION-TABLE IS 200. * RECORD NAME IS P-ORD-ITEM

DATABASE-KEY-TRANSLATION-TABLE IS 500. * * SET NAME IS CST-ORD-PLACED

MODE IS POINTER-ARRAY ATTACHED TO OWNER POPULATION IS 10 INDEX NAME IS SEARCH-TAB-C-O-PLCD PLACING IS DETACHED. * SET NAME IS OFFER

MODE IS POINTER-ARRAY DETACHED WITHIN ARTICLE-RLM WITH PHYSICAL LINK POPULATION IS 100 INCREASE IS 5 DYNAMIC REORGANIZATION SPANS 5 PAGES. * SET NAME IS SHORT-LIST

MODE IS POINTER-ARRAY DETACHED WITHIN ARTICLE-RLM POPULATION IS 100 INCREASE IS 20 DYNAMIC REORGANIZATION SPANS 5 PAGES. * SET NAME IS P-ORD-SPEC

MODE IS LIST DETACHED WITH PHYSICAL LINK POPULATION IS 15 MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS MIN-STOCK-LEVEL

MODE IS CHAIN LINKED TO PRIOR. *

SSL example SSL

Page 181 of the Fujitsu UDS/SQL V2.5 user manual — SET NAME IS CONTAINING
Page 181 · click to enlarge
Page 181

SET NAME IS CONTAINING

POPULATION IS 10 MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS CONTAINED-IN

MODE IS CHAIN LINKED TO PRIOR MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS ARTICLES-AVAILABLE

POPULATION IS 500 DYNAMIC REORGANIZATION SPANS 5 PAGES INDEX NAME IS SEARCH-TAB-ART-AVAIL PLACING IS DETACHED TYPE IS DATABASE-KEY-LIST MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS ORDERED-ARTICLES

MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS REORDERED-ARTICLES

MEMBER IS PHYSICALLY LINKED TO OWNER. * SET NAME IS P-ORD-CONTENTS

MODE IS LIST DETACHED WITH PHYSICAL LINK POPULATION IS 20.

SSL SSL example

Page 182 of the Fujitsu UDS/SQL V2.5 user manual — ALL AREA
Page 182 · click to enlarge
Page 182

Reserved words of the SSL compiler SSL

5.9 Reserved words of the SSL compiler

ALL AREA

ASSIGNED ATTACHED

CHAIN COMPRESSION

DATABASE-KEY-LIST DATABASE-KEY-TRANSLATION-TABLE

DBKEY-TRANSLATION-TABLE DBTT

DCB-NAME DETACHED

DYNAMIC FOR

INCREASE INDEX

INDICATOR IS

ITEMS LINK

LINKED LIST

MEMBER MODE

NAME OF

OPTIMIZATION OWNER

PAGES PHYSICAL

PHYSICALLY PLACEMENT

PLACING POINTER-ARRAY

POPULATION PRIOR

RECORD REORGANIZATION

REPEATED-KEY SCHEMA

SET SPANS

STORAGE STRUCTURE

TO TYPE

WITH WITHIN

Page 183 of the Fujitsu UDS/SQL V2.5 user manual — 6.1.1 Introduction
Page 183 · click to enlarge
Page 183

6 Definition of the user interface to the database

6.1 Subschema DDL

6.1.1 Introduction

All data the database requires to perform its tasks must be defined in the UDS/SQL schema. The UDS/SQL schema has no direct interface with the user, however; aspects of user-oriented data editing must not be considered when designing the UDS/SQL schema.

The user interface is created when the subschema is defined. The subschema describes that section of the schema which is adapted to the requirements of a particular application.

This is advantageous in so far as the database programmer need know only that part of the database required for a particular application. The subschema plays its part in data protection as it prevents the user from becoming acquainted with the entire data resources contained in the database.

The following functions are available for changing the data structure of the schema to produce a subschema data structure designed for a particular application:

– exclusion of record types, – exclusion of sets, – exclusion of realms, – exclusion of record elements from a record type, – reduction of repetition factor of vectors and repeating groups, – grouping of record elements into new group items, – definition of conditions.

This chapter describes how these functions are implemented by the definition of a subschema.

The metalanguage used is described on page 22, and the general syntax rules are summa- rized on page 234.

Page 184 of the Fujitsu UDS/SQL V2.5 user manual — 6.1.3 Unlocking a schema for creating a subschema
Page 184 · click to enlarge
Page 184

Subschema DDL User interface

6.1.2 Assigning name and privacy to a subschema

SUB-SCHEMA NAME IS subschema-name OF SCHEMA NAME schema-name [PRIVACY LOCK FOR COMPILE IS literal-1[ OR literal-2]]

subschema-name specifies the name of the subschema and is assigned by the user. Within one DB configuration, subschema-name must be unique in the first 6 characters.

schema-name specifies the schema from which the subschema is derived.

Access to the data in a database by means of a subschema is dependent on a user’s access rights. Data protection can be enhanced by the assignment of passwords.

With literal-1 and literal-2, the user can assign passwords that prevent the unauthorized compilation of a DML program by means of this subschema. Compilation is only possible if at least one password is known.

6.1.3 Unlocking a schema for creating a subschema

PRIVACY KEY FOR COPY IS literal.

If a schema has been provided with password protection to prevent the unauthorized creation of a subschema, users must prove their access authorization.

For literal, the user must specify one of the passwords defined to protect the schema (see the section “Assigning name and privacy to a schema” on page 111).

Page 185 of the Fujitsu UDS/SQL V2.5 user manual — 6.1.4 Copying entire record types from the schema into the subschema
Page 185 · click to enlarge
Page 185

User interface Subschema DDL

6.1.4 Copying entire record types from the schema into the subschema

Format 1:

COPY ALL RECORDS.

Format 2:

COPY record-name,

Format 1 is used if all record types in the schema are to be copied in their entirety into the subschema.

Format 2 is used if only part of the record types in the schema are to be copied into the subschema.

record-name denotes the record types to be copied in their entirety into the subschema. All record types belonging to sets contained in the subschema must be copied either in their entirety or in part.

6.1.5 Copying part of a record type from the schema into the subschema

01 record-name. {level-number record-element-name[ PICTURE ][ USAGE ] [ OCCURS ].}...

record-name specifies the name of the record type that is to be copied in part into the subschema. This must not be a record type containing an alphanumeric item of variable length. Such record types can only be copied in their entirety into the subschema (see above).

record-element-name denotes:

– a record element of the record type to be copied into the subschema. It is to be copied as described on pages 186 and 188 if it is an item, as described on page 189 if it is a vector or as described on page 190 if it is a repeating group.

– a group item defined as described on page 191.

All items comprising the record type as it is contained in the subschema must be specified in the same order as they appear in the schema description.

Page 186 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 186 · click to enlarge
Page 186

Subschema DDL User interface

Copying a numeric item, an alphanumeric item of fixed length or a national item

level-number item-name PICTURE IS mask-string

⎧DISPLAY ⎫ COMPUTATIONAL-3 [USAGE IS ⎨ ⎬]. COMPUTATIONAL ⎩NATIONAL ⎭

In level-number, the user specifies if an item is to belong to a group item. If the item is not to belong to a group item, the level number specified must be the lowest of any record element in the record type. It may not be lower than 02.

If the item is already part of a repeating group in the schema, it must be defined as part of the same group item in the subschema. For selection of the appropriate level number, refer to page 190.

If the item is to be included in a newly defined group item, refer to page 191.

item-name is the name assigned to the item in the schema.

Page 187 of the Fujitsu UDS/SQL V2.5 user manual — BINARY 31
Page 187 · click to enlarge
Page 187

User interface Subschema DDL

The item definition with PICTURE and USAGE clauses can be derived from the following table 12, where n, m and l denote integers.

Item type Item definition in schema Item definition in subschema

numeric, unpacked PICTURE IS mask-string

PICTURE IS mask-string [USAGE IS DISPLAY]

mask-string identical with mask-string in schema

TYPE IS CHARACTER m PICTURE IS X(m) [USAGE IS DISPLAY]

national PICTURE IS N(m) PICTURE IS N(m) [USAGE IS NATIONAL]

TYPE IS FIXED REAL DECIMAL n,m

PICTURE IS S9(l)V9(m) USAGE IS COMPUTATIONAL-3 l:= n - m

for n > m, m > 0

for n > 0, m < 0 PICTURE IS S9(n)P(-m) USAGE IS COMPUTATIONAL-3

PICTURE IS SP(l)9(n) USAGE IS COMPUTATIONAL-3 l:= m - n

for n < m

for n = m PICTURE IS SV9(n) USAGE IS COMPUTATIONAL-3

for m = 0 PICTURE IS S9(n) USAGE IS COMPUTATIONAL-3

TYPE IS FIXED REAL

PICTURE IS S9(l) USAGE IS COMPUTATIONAL l: = 1,2,3,4

BINARY 15

PICTURE IS S9(l) USAGE IS COMPUTATIONAL l: = 5,6,7,8,9

BINARY 31

Table 12Item definition with PICTURE and USAGE clauses

If no entry is specified for USAGE and the mask string does not contain the symbol N, DISPLAY is assumed by default. If the mask string contains the symbol N, NATIONAL is assumed if the USAGE clause is missing.

alphanumeric, fixed length · numeric, packed · binary

Page 188 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 188 · click to enlarge
Page 188

Subschema DDL User interface

Copying a database key item

⎧DATABASE-KEY ⎫ level-number item-name USAGE IS ⎨ ⎬. ⎩DATABASE-KEY-LONG⎭

In level-number, the user specifies if an item is to belong to a group item. If the item is not to belong to a group item, the level number specified must be the lowest of any record element in the record type. It may not be lower than 02. If the item is already part of a repeating group in the schema, it must be defined as part of the same group item in the subschema. To select the appropriate level number, proceed as described on page 190. If the item is to be included in a newly defined group item, proceed as described on page 191.

item-name is the name assigned to the database key item in the schema. An item that is copied into the subschema with USAGE IS DATABASE-KEY-LONG must be defined in the schema as a DATABASE-KEY-LONG item.

Page 189 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 189 · click to enlarge
Page 189

User interface Subschema DDL

Copying a vector and reducing it if required

level-number vector-name PICTURE IS mask-string

⎧DISPLAY ⎫ COMPUTATIONAL-3 [USAGE IS ⎨COMPUTATIONAL ⎬] NATIONAL DATABASE-KEY ⎩DATABASE-KEY-LONG⎭

[OCCURS integer TIMES].

A vector is an item with a repetition factor. The repetition factor indicates how many dupli- cates of the item are grouped into the vector.

Copying a vector into a subschema requires the same steps as copying an item (see section “Copying a numeric item, an alphanumeric item of fixed length or a national item” on page 186 and section “Copying a database key item” on page 188).

integer specifies the repetition factor, which must be at least 1, but no greater than that specified in the schema. A vector can thus be reduced to any number of items, even down to one item, when copying it into the subschema.

The default value for integer is 1.

Page 190 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 190 · click to enlarge
Page 190

Subschema DDL User interface

Copying a repeating group and reducing it if required

level-number-1 group-item-name[ GROUP-USAGE IS NATIONAL]

[ OCCURS integer TIMES].

{level-number-2 record-element-name PICTURE USAGE OCCURS }

A repeating group is a group item with repetition factor. The repetition factor indicates the number of duplicates of this group item to be grouped into the repeating group.

A repeating group must be copied into a subschema if one of its items is to be copied.

When copied into a subschema, the repeating group can be reduced as follows:

– by specifying a lower repetition factor. It is possible to reduce a group item down to a single occurrence.

– by excluding record elements that are part of the repeating group from the subschema.

group-item-name specifies the name assigned to the repeating group by the user in the schema.

integer specifies the repetition factor. It must be at least 1 and may not exceed that specified in the schema. The default value for integer is 1.

record-element-name denotes a record element which is defined as part of the repeating group in the schema and which is to be copied into the subschema. It is copied as described on page 186 and page 188 if it is an item, as described on page 189 if it is a vector or as described in this section if it is a repeating group.

level-number-2 defines the record element as part of a repeating group in the subschema. level-number-2 must be greater than level-number-1.

The following applies for all record elements to be copied from a repeating group in the schema into a subschema: Record elements must have the same level number if they have the next higher group item in common.

You use the GROUP-USAGE clause to declare a national repeating group, i.e. a repeating group which is treated in its entirety like a national data item. The GROUP-USAGE clause may only be specified if all lower-ranking record elements are of the type NATIONAL and level-number-1 is not equal to 01.

Page 191 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 191 · click to enlarge
Page 191

User interface Subschema DDL

Grouping record elements into a group item

level-number-1 group-item-name[ GROUP-USAGE IS NATIONAL] [ OCCURS integer TIMES].

{level-number-2 record-element-name PICTURE USAGE OCCURS }

A group item is a named group of record elements within a record type. A record element can be an item, a vector or even a group item.

group-item-name specifies the name of a group item.

record-element-name specifies the record element to be declared part of the group item. This can be:

– a record element to be copied from the schema into the subschema. It is copied as described on pages 186 and 188 if it is an item, as described on page 189 if it is a vector or as described on page 190 if it is a repeating group.

– a group item, which is defined as described in this section.

level-number-2 must be greater than level-number-1.

The following applies for all record elements which are to be grouped into a group item: Record elements must have the same level number if they have the next higher group item in common.

You use the GROUP-USAGE clause to declare a national data group, i.e. a data group which is treated in its entirety like a national data item. The GROUP-USAGE clause may only be specified if all lower-ranking record elements are of the type NATIONAL and level- number-1 is not equal to 01.

Page 192 of the Fujitsu UDS/SQL V2.5 user manual — Copying entire record types from the schema into the subschema
Page 192 · click to enlarge
Page 192

Subschema DDL User interface

Detailed information is provided in the COBOL2000 “Language Reference Manual”.

⎧VALUE IS ⎫ ⎨ ⎬ {literal-1[ THROUGH literal-2]}, ⎩VALUES ARE⎭

The database programmer can make the execution of program statements dependent on conditions. A condition can be that certain items have certain item contents. Such items are then referred to as condition variables.

condition-name specifies the name assigned to the condition by the database programmer for reference purposes. The name must be assigned immediately following the description of the item which is to be the condition variable.

literal-1, literal-2, etc. denote value ranges applicable for the condition. The condition is fulfilled if the item assumes a value within the specified value range. The value range can be described by several individual values as well as smaller value ranges within the larger ranges. It must be within the value range defined for the item.

Several condition names and associated value ranges may be specified for one condition variable.

01 ORDERS . . . 02 ORDER-STATUS PICTURE IS S9. 88 FINISHED VALUE IS 1. 88 OPEN VALUE IS 0.

The condition FINISHED is met if the ORDER-STATUS item contains value 1. If it contains value 0, the OPEN condition is fulfilled.

Defining a condition · 88 condition-name · Example

Page 193 of the Fujitsu UDS/SQL V2.5 user manual — 6.1.6 Copying sets from the schema into the subschema
Page 193 · click to enlarge
Page 193

User interface Subschema DDL

6.1.6 Copying sets from the schema into the subschema

Format 1:

COPY ALL SETS.

Format 2:

COPY set-name-1,

Format 1 is used if all the sets in the schema are to be copied into the subschema.

Format 2 is used if only some of the sets in the schema are to be copied into the subschema.

set-name specifies the sets to be copied. All owner and member records of such sets must be present in the subschema.

If key items referencing the sets to be changed, the corresponding sets must have been defined in the subschema.

When SQL is used to access a record type that is a member record type in several sets, all the sets for the record type must be present in the subschema.

Page 194 of the Fujitsu UDS/SQL V2.5 user manual — 6.1.7 Copying realms from the schema into the subschema
Page 194 · click to enlarge
Page 194

Subschema DDL User interface

6.1.7 Copying realms from the schema into the subschema

Format 1:

COPY ALL AREAS.

Format 2:

COPY realm-name,

Format 1 is used if all the realms in the schema are to be copied into the subschema.

Format 2 is used if only some of the realms in the schema are to be copied into the subschema.

realm-name specifies the realms to be copied. All realms that contain data relating to the record types and sets of the subschema and that the subschema user requires, must be copied. The table 13 indicates which realms this may be. When SQL is used, the temporary realm must always be copied.

Type of data Realm(s) from

Records WITHIN clauses (DDL)

Hash areas for primary keys Record POPULATION clauses (SSL)

Hash areas for record secondary keys

Record INDEX clauses (SSL) Record SEARCH key tables

MODE clauses (SSL) Lists

Set SEARCH key tables Set INDEX clauses (SSL)

Hash areas for set secondary keys

Table 13Realms to be copied

DBTTs DBTT clauses · Pointer arrays · Sort key tables

Page 195 of the Fujitsu UDS/SQL V2.5 user manual — COPY ALL SETS. * * *
Page 195 · click to enlarge
Page 195

User interface Subschema DDL (example)

6.1.8 Comprehensive example of subschema DDL

IDENTIFICATION DIVISION.

SUB-SCHEMA NAME IS ADMIN OF SCHEMA MAIL-ORDERS PRIVACY KEY FOR COPY IS "SHIP-KEY". * * * DATA DIVISION. * AREA SECTION.

COPY ALL AREAS. * RECORD SECTION.

COPY ALL RECORDS. * SET SECTION.

COPY ALL SETS. * * *

Page 196 of the Fujitsu UDS/SQL V2.5 user manual — 6.2 Relational schema
Page 196 · click to enlarge
Page 196

Relational schema User interface

6.2 Relational schema

The schema DDL can be used to create a schema complying with relational rules or with CODASYL rules. A schema defined according to relational rules contains no set relation- ships, and the primary and foreign keys are defined by the user.

If a schema was defined according to CODASYL rules, the utility routine BPSQLSIA can be used to provide SQL programmers with a relational view of the CODASYL subschema.

The BPSQLSIA utility routine analyzes all the objects in a subschema and represents them as objects in a relational database.

The list resulting from the conversion by BPSQLSIA contains all the information that programmers need to work with SQL.

If a CODASYL subschema is to be processed on a completely relational basis with SQL, it must satisfy certain requirements. Restrictions and notes on DDL, SSL and subschema DDL can be found in the relevant chapters.

A description of the BPSQLSIA utility routine, including an overview of the relevant restric- tions and an example, is provided in another UDS/SQL manual (see the "Recovery, Infor- mation and Reorganization" manual, BPSQLSIA).

Page 197 of the Fujitsu UDS/SQL V2.5 user manual — 7 Structure of pages
Page 197 · click to enlarge
Page 197

7 Structure of pages

When creating a database using DDL and SSL, the user does not usually require infor- mation on the structure of pages, records and tables. The following two chapters are intended as a reference section for users interested in special details.

The entire storage space provided for the data in a database is divided into realms. Every realm consists of a specific number of pages that is specified when creating the database. This number may be subsequently modified (see the "Creation and Restructuring" manual).

The length of a page may be 2048, 4000 or 8096 bytes and must be uniform within a database. This page length is defined when creating the database with the BCREATE utility routine and can be subsequently extended with BPGSIZE (see the "Creation and Restruc- turing" manual for details).

Pages with a length of 4000 or 8096 bytes are each embedded in a page container, which consists of a 64-byte header that precedes the page itself, and a 32-byte trailer at the end.

The following types of pages can be distinguished in the structure of a realm. These pages differ in their data contents and structure:

contains realm-specific data; is always the first page in a realm

contains realm-specific data; is always the last page in a realm

serves free place administration (FPA) on realm level. At least one FPA page is always present.

manages the DBTT areas of a record type (DBTT: Database Key Translation Table).

page of a DBTT area. Manages the records of a record type.

contains a hash area

contains records which are not stored in a hash area, and tables (except DBTT)

Show 7 more labels / short text on this page
Act-key-0 page · Act-Key-N page · FPA page · DBTT anchor page · DBTT page · CALC page · Data page
Page 198 of the Fujitsu UDS/SQL V2.5 user manual — Structure of pages
Page 198 · click to enlarge
Page 198

The following sections describe the page container and the various types of pages in detail. These descriptions of the individual page types are restricted to the pages themselves, i.e. the header and trailer for pages with a length of 4000 or 8096 bytes are not shown. Displacement values for individual page areas are always with reference to the start of the page. Unless explicitly specified otherwise, the given description applies to pages with lengths of 2048, 4000 and 8096 bytes. Specific differences, if any, are explained separately.

Structure of pages

Page 199 of the Fujitsu UDS/SQL V2.5 user manual — 7.1 Page container
Page 199 · click to enlarge
Page 199

Structure of pages Page container

7.1 Page container

Fujitsu UDS/SQL V2.5 — 7.1 Page container diagram (page 199)
Fig. 9 · 7.1 Page container

Figure 46: Structure of the page container for pages with a length of 4000 or 8096 bytes

Meaning of the bytes

Fujitsu UDS/SQL V2.5 — 7.1 Page container diagram (page 199)
Fig. 10 · 7.1 Page container

65-4064 or 65-8160 Page with a length of 4000 or 8096 bytes

Trailer; bytes 4089-4096 (for 4000-byte pages) and bytes 8185-8192 (for 8096-byte pages) contain a version number.

Table 14Meanings of the bytes in a page container

Headers and trailers are used by UDS/SQL for administration purposes. Consistent pages have a matching version number in their header and trailer.

Page 200 of the Fujitsu UDS/SQL V2.5 user manual — 7.2 Act-key-0 and act-key-N page
Page 200 · click to enlarge
Page 200

Act-key-0 page / act-key-N page Structure of pages

7.2 Act-key-0 and act-key-N page

Fujitsu UDS/SQL V2.5 — 7.2 Act-key-0 and act-key-N page diagram (page 200)
Fig. 11 · 7.2 Act-key-0 and act-key-N page
Figure 47Structure of the act-key-0 and act-key-N page
Page 201 of the Fujitsu UDS/SQL V2.5 user manual — Act-key-0 and act-key-N page
Page 201 · click to enlarge
Page 201

Structure of pages Act-key-0 page / act-key-N page

Meaning of the bytes

1-4 The act-key specifies the address of the page. Since the act-key-0 page is always the first page in a realm, the act-key of this page always contains page number 0.

19-20 The page length can be 2048, 4000 or 8096 bytes.

21-24 Specifies the act-key of the first FPA base page. For a description of the layout of an FPA base page, see section “FPA page” on page 202.

25-28 Specifies the number of pages in the realm.

33-40 These fields are only filled in the DBDIR1 realm.

47-76 contains the name of the realm.

109-126 These fields are only filled in the DBDIR1 realm.

from 1137 Contains the FPA extent table. For a description of the layout of an FPA extent and an FPA extent page, see section “FPA page” on page 202.

Table 15Meanings of the bytes of the act-key-0 and act-key-N page

1 DBDIR is the database directory.

Byte Meaning

Page 202 of the Fujitsu UDS/SQL V2.5 user manual — 7.3 FPA page
Page 202 · click to enlarge
Page 202

FPA page Structure of pages

7.3 FPA page

FPA pages constitute one level of the three-level UDS/SQL Free Place Administration and are used to administer free place on the realm level. There is also a free place adminis- tration facility on the page and table levels.

Every FPA page contains a separate act-key, which specifies the address of the page. The pair associated with a given act-key (i.e. the FPA page and entry within the page) can be specifically defined with the help of the information about the FPA base and the FPA extent table in the act-key-0 page.

Depending on which page length was defined for the database, the length of an FPA page may be 2048 bytes, 4000 bytes or 8096 bytes.

Additional free place administration tables (FPA extents) may be present in a realm in addition to the base free place administration table (FPA base).

The FPA base consists of the FPA pages created when the realm is created or when the realm is converted by BPGSIZE. FPA extents may be created when the realm is extended. It does not matter in this case if the realm is extended online or offline mode using the BREORG utility routine.

Every FPA extent is 128 KB in size. In 2 KB databases it consists of 64 pages, in 4 KB databases of 32 pages and in 8 KB databases of 16 pages. FPA extents are managed through the act-key-0 page. The BPRECORD utility routine can be used to output infor- mation on the FPA base and the FPA extents (see the “Recovery, Information and Reorga- nization“ manual).

Page 203 of the Fujitsu UDS/SQL V2.5 user manual — FPA page
Page 203 · click to enlarge
Page 203

Structure of pages FPA page

Structure of an BASE FPA page with a length of 2048 bytes

number of free bytes in

Figure 48Structure of a FPA base page with a length of 2048 bytes

Meaning of the bytes

1-4 The address of the page is contained in the act-key

5 Starting from this byte there is an entry of 2 bytes for every page of the realm, indicating the number of free bytes contained in the page. This number is 0 for: – the act-key-0 page, the act-key-N page – FPA pages – DBTT anchor pages – DBTT pages – CALC pages as these pages are exclusively reserved for a particular purpose and no further data can be allocated to them by the Free Place Administration. The entry for empty pages is 2028 bytes, which can actually be used, 20 bytes being reserved for the page header.

Table 16: Meanings of the bytes of a FPA base page with a length of 2048 bytes

Show 6 more labels / short text on this page
own act-key · page 0=0 · page 1 · page n · free · Byte Meaning
Page 204 of the Fujitsu UDS/SQL V2.5 user manual — FPA page
Page 204 · click to enlarge
Page 204

FPA page Structure of pages

Structure of an FPA extent page with a length of 2048 bytes or of an FPA page with a length of 4000 or 8096 bytes

5th. byteX‘03‘

(identifier for FPA page)

number of free bytes in

Figure 49: Structure of an FPA extent page with a length of 2048 bytes or of an FPA page with a length of 4000 or 8096 bytes

Meaning of the bytes

1-20 Page control information; type=FPA_PAGE; contains, among other things, the act-key that indicates the page address.

25 Starting with this byte, there is a 2-byte entry for each page of the realm indicating the number of free bytes in the respective page. This is equal to 0 for – the act-key-0 page, the act-key-N page, – FPA pages, – DBTT anchor pages – DBTT pages, – CALC pages, since these pages are exclusively reserved for specific purposes and cannot therefore be assigned additional data via the Free Place Administration. The effectively usable storage space for empty pages is indicated as 2048 bytes, 3980 bytes or 8076 bytes, respectively, due to the 20 bytes taken up by the the page header.

Table 17: Meanings of the bytes of an FPA extent page with a length of 2048 bytes or of an FPA page with a length of 4000 or 8096 bytes

Show 7 more labels / short text on this page
page control information · page 0=0 · page 1 · page n · free · 4000/8096 · Byte Meaning
Page 205 of the Fujitsu UDS/SQL V2.5 user manual — 7.4.1 DBTT anchor page
Page 205 · click to enlarge
Page 205

Structure of pages DBTT pages

7.4 DBTT pages

For each record type, UDS/SQL requires a table - known as the DBTT (Database Key Translation Table) - in which all the currently stored records are administered via a database key. Basically, this is an index in the DBTT which points to the physical address of the record in the database as recorded in the table. The structure of the DBTT anchor pages and the actual DBTT pages are described below.

7.4.1 DBTT anchor page

Only for the SSIA-RECORD there is no DBTT anchor page. For all other record types, the DBTT is administered via DBTT anchor pages. The first DBTT- anchor page is recorded in the SIA and shown in the output of utilty routine BPSIA. In order to manage the largest possible DBTT for a record type - in a 4-Kbyte database this means more than 2 billion DB keys - multiple chained DBTT anchor pages may be required. DBTT anchor pages are located in the realm containing the DBTT. They are only set up in the length that is required at the time of creation. In the great majority of cases, no more than one DBTT anchor page is required for each record type. The DBTT itself consists of the DBTT base with a variable number of DBTT pages and possibly DBTT extents each of which consists of 128 consec- utive PAM pages.

Page 206 of the Fujitsu UDS/SQL V2.5 user manual — DBTT pages
Page 206 · click to enlarge
Page 206

DBTT pages Structure of pages

Fujitsu UDS/SQL V2.5 — DBTT pages diagram (page 206)
Fig. 12 · DBTT pages
Figure 50Layout of a DBTT anchor page
Page 207 of the Fujitsu UDS/SQL V2.5 user manual — 7.4.2 DBTT page
Page 207 · click to enlarge
Page 207

Structure of pages DBTT pages

7.4.2 DBTT page

This section describes the layout of a DBTT page and the structure of the DBTT entries in terms of lines and columns. There is precisely one DBTT line for each record of a record type.

In the case of record types which are not owner record types, the DBTT consists of only column 0, which contains the act-keys of the records. Otherwise, one column each is added for every reference to

– a pointer array (MODE IS POINTER-ARRAY),

– a list (MODE IS LIST),

– a sort key table (MODE IS CHAIN, ORDER IS SORTED INDEXED), and

– an indexed set SEARCH key table.

UDS/SQL uses the DBTT line length and the database key value specifying the line in the DBTT, together with the block number of the associated DBTT component, DBTT base or DBTT extent to calculate the location of the associated DBTT line.

Depending on which page length was defined for the database, the length of a DBTT page may be 2048 bytes, 4000 bytes or 8096 bytes.

Page 208 of the Fujitsu UDS/SQL V2.5 user manual — DBTT page
Page 208 · click to enlarge
Page 208

DBTT pages Structure of pages

Structure of a DBTT page with a length of 2048 bytes

For record types which are not owner In owner record types

Rec. act key

Rec. act key

Figure 51Structure of a DBTT page with a length of 2048 bytes
Show 14 more labels / short text on this page
Own act key · Column 0 · Column 1 · Table act key · DBTT line · Set 1 · Column 0 · Table act key · DBTT line · Free · Table act key · Set m · Table act key · Column n
Page 209 of the Fujitsu UDS/SQL V2.5 user manual — DBTT page
Page 209 · click to enlarge
Page 209

Structure of pages DBTT pages

Structure of a DBTT page with a length of 4000 or 8096 bytes

For record types which are not owner In owner record types

25 Rec act key

Figure 52Structure of a DBTT page with a length of 4000 or 8096 bytes
Show 20 more labels / short text on this page
Own act key · X'02' (Identifier · for DBTT) · Free · Column 0 · Page length · Table act key · Column 1 · Rec act key · DBTT line · Set 1 · Column 0 · Table act key · DBTT line · Free · 4000/8096 · Table act key · Set m · Table act key · Column n
Page 210 of the Fujitsu UDS/SQL V2.5 user manual — 7.5 Direct CALC page
Page 210 · click to enlarge
Page 210

Direct CALC page Structure of pages

7.5 Direct CALC page

Depending on which page length was defined for the database, the length of a direct CALC page may be 2048 bytes, 4000 bytes or 8096 bytes.

Direct CALC pages with a length of 2048 bytes differ from those consisting of 4000 or 8096 bytes with respect to the lengths of entries for the database key value, record sequence number (RSQ) and page index:

– In the case of direct CALC pages with a length of 2048 bytes, the entry for the database key value occupies 4 bytes; the length of the RSQ entry is 3 bytes, and that of the page index entry is 8 bytes.

– For direct CALC pages with a length of 4000 or 8096 bytes, the entry for the database key value occupies 8 bytes; the length of the RSQ entry is 6 bytes, and that of the page index entry is 12 bytes.

– “number1” indicates the applicable value for direct CALC pages with a length of 2048 bytes.

– “number2” indicates the applicable value for direct CALC pages with a length of 4000 or 8096 bytes.

All other length and displacement entries are equally applicable to direct CALC pages with a length of 2048 bytes and direct CALC pages with a length of 4000 or 8096 bytes.

Page 211 of the Fujitsu UDS/SQL V2.5 user manual — Direct CALC page
Page 211 · click to enlarge
Page 211

Structure of pages Direct CALC page

Fujitsu UDS/SQL V2.5 — Direct CALC page diagram (page 211)
Fig. 13 · Direct CALC page
Figure 53Structure of a direct CALC page
Page 212 of the Fujitsu UDS/SQL V2.5 user manual — Direct CALC page
Page 212 · click to enlarge
Page 212

Direct CALC page Structure of pages

Meanings of bytes 1-28 or 1-32

1-4 specifies the address of the page

13-16 contains the length and the beginning of the free space. Since the free place is filled with records starting from the CALC table header, the first record stored in the page borders on the CALC table header. The free place begins after the last page index entry and ends before the first record. This information on free place represents the second level of the three-level Free Place Administration facility.

17-18 contains the number of page index entries and thus the number of records contained in the page.

19-20 indicates the beginning of the CALC table header.

contains the database key value of the first record stored in the page.

25 or 29 Since the page index entries in CALC pages always refer to records, the corre- sponding DBTT column is column 0.

26 or 30 Status=3 identifies the record associated with the page index entry as a CALC record.

points to the first stored CALC record.

Table 18Meanings of bytes 1-28 or 1-32 of the CALC page

The “chaining” items are used to link the overflowing pages to their overflow pages.

Based on the record length and the length of the key item, UDS/SQL calculates the maximum number of records that can be stored in a page. Then UDS/SQL sets up a CALC table at the end of the page with the calculated number of table lines, where each line refers to exactly one record. The table entries are sorted in ascending order by key values, and by RSQs for duplicate key values.

There is also a page index entry for each record. If UDS/SQL knows the key value of a record, it can find the record in the page via the CALC table and the associated page index entry. If UDS/SQL knows the database key value, it locates the record via the page index entry alone.

Byte Meaning · 21-24 or 21-28 · 27-28 or 31-32

Page 213 of the Fujitsu UDS/SQL V2.5 user manual — 7.6 Indirect CALC page
Page 213 · click to enlarge
Page 213

Structure of pages Indirect CALC page

7.6 Indirect CALC page

Indirect CALC pages are created for a record type stored with LOCATION MODE IS CALC if the record type was simultaneously defined with the SSL as one of the following:

– as a member with MODE IS LIST or – with PLACEMENT OPTIMIZATION or – with COMPRESSION FOR ALL ITEMS.

Indirect CALC pages are always set up when SEARCH KEY USING CALC has been specified.

Depending on which page length was defined for the database, the length of an indirect CALC page may be 2048 bytes, 4000 bytes or 8096 bytes.

Indirect CALC pages with a length of 2048 bytes differ from those consisting of 4000 or 8096 bytes with respect to the lengths of entries for the record sequence number (RSQ):

– In the case of indirect CALC pages with a length of 2048 bytes, the RSQ entry is 3 bytes long.

– For indirect CALC pages with a length of 4000 or 8096 bytes, the RSQ entry is 6 bytes long.

The structure of indirect CALC pages differs from that of direct CALC pages in that they contain no records or page index entries. The CALC table line therefore contains the PPP to the associated record. In every other respect, the description of the direct CALC page also applies to the indirect CALC page.

Page 214 of the Fujitsu UDS/SQL V2.5 user manual — Indirect CALC page
Page 214 · click to enlarge
Page 214

Indirect CALC page Structure of pages

Fujitsu UDS/SQL V2.5 — Indirect CALC page diagram (page 214)
Fig. 14 · Indirect CALC page
Figure 54Structure of an indirect CALC page
Page 215 of the Fujitsu UDS/SQL V2.5 user manual — 7.7 Data page
Page 215 · click to enlarge
Page 215

Structure of pages Data page

7.7 Data page

Depending on which page length was defined for the database, the length of a data page may be 2048 bytes, 4000 bytes or 8096 bytes.

Data pages with a length of 2048 bytes differ from those consisting of 4000 or 8096 bytes with respect to the lengths of entries for the database key value and the page index:

– In the case of data pages with a length of 2048 bytes, the entry for the database key value is 4 bytes in length and that of the page index entry is 8 bytes.

– For data pages with a length of 4000 or 8096 bytes, the entry for the database key value is 8 bytes in length and that of the page index entry is 12 bytes.

The following data may be placed in a data page:

– pointer arrays – lists – sort key tables – SEARCH key tables – records that are not stored in a hash area

The values given in the form “number1/number2“ (e.g. 25/29) in figure 53 must be inter- preted as follows:

– “number1” indicates the applicable value for data pages with a length of 2048 bytes. – “number2” indicates the applicable value for data pages with a length of 4000 or 8096 bytes.

All other length and displacement entries are equally applicable to data pages with a length of 2048 bytes and those with a length of 4000 or 8096 bytes.

Page 216 of the Fujitsu UDS/SQL V2.5 user manual — Data page
Page 216 · click to enlarge
Page 216

Data page Structure of pages

1 Database key value

Page header Own act key

Beginning of record or table

Figure 55Structure of a data page
Show 19 more labels / short text on this page
4/8 · 25/29 · DBTT column · Free · Page index entry · 26/30 · 8/12 · Status · Free space length · 27/31 · beginning · Number of page · index entries · Page length · Page index entry · 8/12 · Free space · Record or table · Record or table
Page 217 of the Fujitsu UDS/SQL V2.5 user manual — Data page
Page 217 · click to enlarge
Page 217

Structure of pages Data page

Meanings of bytes 1-28 or 1-32

1-4 contains the address of the page.

13-16 specifies the length and the beginning of the free space. Since the free space is filled with records and tables starting at the end of the page, the beginning of the free space borders on the last stored record or table. This information on free place represents the second level of the UDS/SQL three-level Free Place Administration facility.

17-18 contains the number of page index entries.

19-20 The page length may be 2048 bytes, 4000 bytes or 8096 bytes.

Database key value of the record Database key value of the associated owner record

25/29 DBTT column=0 DBTT column=1-n

26/30 Status=0: Record is not part of a list (anchor record) Status=2: Record is part of a list

indicates the beginning of the record or table.

Table 19Meanings of bytes 1-28 or 1-32 of a data page

There is a page index entry for each record and each table in the page, indicating the position of the record or table. In the case of lists, there is a page index entry for the list itself and for every record contained in it. The logical sequence of records in a list is not based on their physical sequence, but on the sequence of the page index entries.

A data page must not contain two anchor records at the same time.

Show 5 more labels / short text on this page
Byte Meaning · Record Table · 21-24 or 21-28 · Status=1 · 27-28 or 31-32
Page 218 of the Fujitsu UDS/SQL V2.5 user manual — Data page
Page 218 · click to enlarge
Page 218

Data page Structure of pages

Page 219 of the Fujitsu UDS/SQL V2.5 user manual — 8.1 Structure of records
Page 219 · click to enlarge
Page 219

8 Structure of records and tables

In general, the user requires no information on the structure of records and tables when defining a database by means of DDL and SSL. This chapter is a reference chapter for users interested in particular details.

8.1 Structure of records

As a rule, the physical structure of a record defined in the schema DDL comprises more than the items specified for this record type. In most cases, set connection data (SCD) is automatically added when a record is stored. The SCD can consist of the following components:

– the pointers UDS/SQL requires for storing a set occurrence as a chain, – the pointer from the owner to its associated pointer array or list, – the pointer from the member to the associated owner, and – an indication if the record is part of a SYSTEM set.

User-defined record

Page 220 of the Fujitsu UDS/SQL V2.5 user manual — SCD
Page 220 · click to enlarge
Page 220

Record structure Structure of records and tables

If a variable item or compression has not been defined for a record type, its records are stored in the format below:

SCD

Record (as per schema)

Figure 56Standard format of a user-defined record

The following format is used to store the records of a record type if a variable item or compression has been specified for it:

No. of comp. entries Rec. length

Beginning of item after comp. before comp.

Figure 57Compressed format of a user-defined record
Show 10 more labels / short text on this page
Set · Set 1 n · SCD Compression · Compression · Compression · Compressed · header · entry · entry · record
Page 221 of the Fujitsu UDS/SQL V2.5 user manual — Structure of records and tables
Page 221 · click to enlarge
Page 221

Structure of records and tables Record structure

In addition to the records defined in the schema DDL, UDS/SQL automatically generates one anchor record for each SYSTEM set. In SYSTEM sets, the anchor record assumes the function that the DBTT of an owner record type performs in a normal set. The anchor record contains its own act-key as well as the act-keys of the tables belonging to the SYSTEM set. It is extended by SCD if the records of the SYSTEM set are stored as a chain.

Anchor record

Page 222 of the Fujitsu UDS/SQL V2.5 user manual — Structure of records and tables
Page 222 · click to enlarge
Page 222

Record structure Structure of records and tables

When a record is stored, UDS/SQL automatically adds set connection data (SCD) if the record has to be connected with other records or tables. table 20 shows what the SCD consists of in each case.

The length of the SCD may vary, depending on which page length was defined for the database. The effect of the database page length on that of the SCD is indicated in table 20 in the column “SCD length in bytes” by means of 2 values (e.g. 8/12):

– The first value shows the SCD length for databases with a page length of 2048 bytes. – The second value shows the SCD length for databases with a page length of 4000 or 8096 bytes.

Set connection data

Page 223 of the Fujitsu UDS/SQL V2.5 user manual — LIST
Page 223 · click to enlarge
Page 223

Structure of records and tables Record structure

MODE IS RECORD TYPE

OWNER IS SYSTEM

ORDER IS LAST

LINKED TO PRIOR

MEMBER LINKED

PHYSICAL LINK

SCD length in bytes

N Y Y/N

N N Y

CHAIN

Y N Y

- - 8/12 16/24 3 3,4

N N Y Y

N Y N Y

11/18 15/22 19/30 23/34

3,5 3,5,6 3,4,5 3,4,5,6

N

Y - - - 0 -

POINTERARRAY

N - - N Y

Y - - - 1 8

N - N Y

- 3/6 7/10 5 5,6

LIST

Table 20Overview of the possible SCD combinations per set

1 Database key value + PPP of the first member record ... 8/12 bytes

2 Database key value + PPP of the last member record ... 8/12 bytes

3 Database key value + PPP of the following record ... 8/12 bytes

4 Database key value + PPP of the preceding record ... 8/12 bytes

5 RSQ of the owner ... 3/6 bytes

6 PPP of the owner ... 4 bytes

7 Act-key of the beginning of the table ... 4 bytes

8 Indicator for SYSTEM set ... 1 byte This byte contains X'00' if the member record belongs to the set and X'FF' if it is not part of the set. In the case of “MODE IS CHAIN”, the byte is redefined as shown in point 3 (see above).

Show 8 more labels / short text on this page
SCD content · 8/12 16/24 16/24 · 1 1,2 1,2 · Owner Y/N · Member · Owner · or · Member
Page 224 of the Fujitsu UDS/SQL V2.5 user manual — RSQ
Page 224 · click to enlarge
Page 224

Table structure Structure of records and tables

8.2 Structure of tables

No. of reserv.

lines No. of occupied

prev. page

RSQ

PPP or act key

PPP or act key

Figure 58Structure of tables
Show 29 more labels / short text on this page
Page header · Page index entry · 8/12 · 29/33 · lines · next page · Page index entry · 8/12 · Chaining · Free space · 1 2) · Type · Occupied space · Level · 1) · Table header · next higher level · 3) · Chaining · Table line · last page · 4) · Record · Key · 3) · Table line · 3/6 · Occupied space RSQ · 3/6
Page 225 of the Fujitsu UDS/SQL V2.5 user manual — Structure of tables
Page 225 · click to enlarge
Page 225

Structure of records and tables Table structure

Explanation of figure 58:

1. follows the last table line in the case of lists.
2. bit 2 7 =1: list
2 6 =1multi-level table 2 5 =1: table ATTACHED TO OWNER 2 4 =1: duplicates table
3. does not apply to duplicates tables (see figure 60 and figure 61 ).
4. applies to the highest table page of a multi-level table or to the first table page of a single-level table only.

The length of the entries for the record sequence number (RSQ) and page index depend on the page length that was defined for the database:

– In tables of a database with a 2048-byte page length, the RSQ entry is 3 bytes long, and the page index entry is 8 bytes.

– In tables of a database with a 4000-byte or 8096-byte page length, the RSQ entry is 6 bytes long, and the page index entry is 12 bytes.

Pointer arrays, lists, sort key tables and standard SEARCH key tables are structured according to the principle shown in figure 58. (The representation of the table line does not apply to duplicates tables.) They are always stored in data pages. If a table does not fill a page completely, the remaining space can be used for records or further tables. The table headers contain the space reservations specified in the POPULATION clauses. This repre- sents the third level of the three-level UDS/SQL Free Place Administration facility. Furthermore, the table header contains pointers to other table parts if the table exceeds one page and a pointer to the next higher table level if the page belongs to a lower level. Two further indicators show the table level of the page itself and the type of the table.

Page 226 of the Fujitsu UDS/SQL V2.5 user manual — MODE IS LIST ORDER IS LAST/ FIRST/NEXT/PRIOR
Page 226 · click to enlarge
Page 226

Table structure Structure of records and tables

The following overview shows which of the three available table lines corresponds to which table type:

DDL/SSL clauses Table type Content of a table line:

Name of the table lowest level higher level

MODE IS POINTER-ARRAY ORDER IS LAST/ FIRST/NEXT/PRIOR

single-level RSQ, PPP - single-level pointer array

MODE IS POINTER-ARRAY ORDER IS SORTED INDEXED BY DATABASE-KEY

multi-level RSQ, PPP RSQ, act-key

multi-level pointer array MODE IS POINTER-ARRAY ORDER IS SORTED INDEXED BY DEFINED KEYS ASCENDING/ DESCENDING KEY IS...

key value, RSQ, PPP

key value, RSQ, act-key

MODE IS LIST ORDER IS LAST/ FIRST/NEXT/PRIOR

single-level member record -

MODE IS LIST ORDER IS SORTED INDEXED BY DATABASE-KEY

multi-level member record RSQ, act-key

multi-level pointer array MODE IS LIST ORDER IS SORTED INDEXED BY DEFINED KEYS ASCENDING/ DESCENDING KEY IS...

multi-level member record key value, RSQ, act-key

Table 21Overview of the table types (part 1 of 2)

multi-level · single-level list

Page 227 of the Fujitsu UDS/SQL V2.5 user manual — TYPE IS DATABASEKEY-LIST
Page 227 · click to enlarge
Page 227

Structure of records and tables Table structure

DDL/SSL clauses Table type Content of a table line:

Name of the table lowest level higher level

MODE IS CHAIN ORDER IS SORTED INDEXED BY DATABASE-KEY

multi-level RSQ, PPP RSQ, act-key

sort key table MODE IS CHAIN ORDER IS SORTED INDEXED BY DEFINED KEYS ASCENDING/ DESCENDING KEY IS...

multi-level key value, RSQ, PPP

key value, RSQ, act-key

SEARCH KEY IS... USING INDEX

multi-level key value, RSQ, PPP

key value, RSQ, act-key

TYPE IS REPEATED-KEY (on set or record type level)

SEARCH KEY IS... USING INDEX

multi-level see figure 60 and figure 61

TYPE IS DATABASEKEY-LIST

Table 21Overview of the table types (part 2 of 2)

The table lines of a higher table level contain act-keys pointing to the associated pages of the next lower table level. The table lines of the lowest table level contain PPPs which indicate the pages where the associated records are stored. If a PPP is not current, UDS/SQL finds the record by means of the RSQ via the DBTT.

The hierarchic structure of a multi-level table is shown in Figure 59 below. The illustrated example applies to pointer arrays, sort key tables and SEARCH key tables. In the case of a list, level 0 contains the records themselves.

SEARCH key table · key value, ACT_KEY · duplicates table

Page 228 of the Fujitsu UDS/SQL V2.5 user manual — Structure of tables
Page 228 · click to enlarge
Page 228

Table structure Structure of records and tables

Fujitsu UDS/SQL V2.5 — Structure of tables diagram (page 228)
Fig. 15 · Structure of tables
Figure 59Hierarchic structure of a multi-level table
Page 229 of the Fujitsu UDS/SQL V2.5 user manual — ATTACHED TO OWNER
Page 229 · click to enlarge
Page 229

Structure of records and tables Table structure

Fujitsu UDS/SQL V2.5 — Structure of tables diagram (page 229)
Fig. 16 · Structure of tables

Beginning of duplicates header

No. of table index entries

prev. page

Fujitsu UDS/SQL V2.5 — Structure of tables diagram (page 229)
Fig. 17 · Structure of tables

page Preceding overflow page

No. of free bytes

Free space Length of table

1. Applies only in the highest table page of a multi-level table or in the first table page of a single-level table

RSQ

2. bit 2 = 1: Multi-level table 2 = 1: Table

ATTACHED TO OWNER

2 = 1Duplicates table
3. Calculated from the start of the table header
Figure 60Structure of a duplicates table
Show 34 more labels / short text on this page
Duplicates table · Page header · Page index entry · 8/12 · 29/33 2 · 3) · Page index entry · next page · 8/12 · Chaining · Free space · Type · 1 2) · Occupied space · Level · Table header · next level · Key value · Chaining · Table index entry · last page · 1) · Beginning of · table line · 3) · Next overflow · Table index entry · line RSQ · Duplicates header · 3/6 · Table line · 3/6 · Table line · Occupied space
Page 230 of the Fujitsu UDS/SQL V2.5 user manual — Structure of tables
Page 230 · click to enlarge
Page 230

Table structure Structure of records and tables

The lengths of the entries for the database key value, the record sequence number (RSQ), and for the page index entries depend on the page length that was defined for the database:

– In tables of a database with a 2048-byte page length, the entry for the database key value is 4 bytes long; the RSQ entry is 3 bytes, and the page index entry is 8 bytes.

– In tables of a database with a 4000-byte or 8096-byte page length, the entry for the database key value is 8 bytes long; the RSQ entry is 6bytes, and the page index entry is 12 bytes.

Page 231 of the Fujitsu UDS/SQL V2.5 user manual — RSQ
Page 231 · click to enlarge
Page 231

Structure of records and tables Table structure

Overflow page of a duplicates table

Free (only for 4000/ 8096-byte pages) 25 4

Beginning of duplicated header

RSQ

No. of free bytes

RSQ

Figure 61Overflow page for a duplicates table

Depending on which page length was defined for a database, the length of an overflow page may be 2048 bytes, 4000 bytes or 8096 bytes. The following applies with respect to the lengths of entries for the record sequence number (RSQ) and page index:

– In a 2048-byte overflow page, the RSQ entry is 3 bytes long, and the page index entry is 8 bytes.

– In an overflow page of 4000 or 8096 bytes, the RSQ entry comprises 6 bytes, and the page index entry is 12 bytes.

A duplicates table is a special type of SEARCH key table in which key values that occur several times are represented only once. When a part of a duplicates table that contains only one key value is to be extended to cover more than one page, UDS/SQL creates an overflow page, in which the table line related to the key is continued. The connection to the overflow page is not established via the table header but via the duplicates header.

Show 21 more labels / short text on this page
Internal information · Page number for · table header · 25/29 · DBTT Column · 26/30 · Status = 1 · Page header · 27/31 · Length of · Page index entry · table line · 8/12 · Nexxt overflow · Duplicated header · 3/6 8 · page Preceding overflow · Table line · page · Free · 3/6
Page 232 of the Fujitsu UDS/SQL V2.5 user manual — Structure of tables
Page 232 · click to enlarge
Page 232

Table structure Structure of records and tables

Page 233 of the Fujitsu UDS/SQL V2.5 user manual — 9 Reference section
Page 233 · click to enlarge
Page 233

9 Reference section

The previous chapters cover the functions and applications of the schema DDL, schema SSL and subschema DDL clauses. This chapter deals with the syntax rules you must observe in order to use the respective language correctly. The notational conventions are described on page 22.

Page 234 of the Fujitsu UDS/SQL V2.5 user manual — IN OF
Page 234 · click to enlarge
Page 234

General syntax rules Reference section

must be replaced by a current value when applying the format. Four categories of variables can be distinguished:

must begin with a letter and may consist of up to 30 characters. The characters used may include letters, digits and hyphens. One hyphen must not follow another it must not be the last character. The current value must not be identical to optional word or keywords.

schema-name subschema-name realm-name set-name record-name record-element-name group-item-name vector-name item-name identifier hashroutine

record-element-name, group-item-name, vector-name and item-name must be unique within the record type only. By specifying

IN OF

the user can also refer to names which have already been assigned.

All other names must be unique within the entire database.

The first 6 characters of subschema-name must be unique within a database configuration.

must be enclosed in quotation marks (if QUOTE IS SINGLE, in apostrophes; see the "Creation and Restruc- turing" manual, Schema DDL compilation). They are not part of the value of the literal.

consists of up to 15 digits. The minus sign is also permitted in the TYPE clause (see page 236, TYPE clause).

mask-string see page “Defining an item” on page 55

is indicated by * in column 7. The text in columns 8 through 72 is then recognized as a comment by UDS/SQL.

may optionally be used as separator between clauses.

Show 8 more labels / short text on this page
General syntax rules · variable · Variable Current value · record-name · literal · integer · Comment · Semicolon
Page 235 of the Fujitsu UDS/SQL V2.5 user manual — Reference section
Page 235 · click to enlarge
Page 235

Reference section Reserved words

is indicated by / in column 7.

Entries exceeding column 72 can be continued in a new lines line that must start with a hyphen in column 7.

The COBOL compiler accepts uppercase letters only.

Each of the three languages is made up of clauses. Clauses are generally written starting at column 12. Entries starting at column 8 are:

– the first clause of an entry, – the MEMBER clause;

and in the subschema DDL

– the first line of a division, – the first line of a section, – level number 01.

The syntax description of each language starts with an overview of the entries and their clauses.

For the list of reserved words, see the reserved word list of the COBOL version that you are using in the manual "COBOL2000 (BS2000/OSD) - Reference manual".

Show 5 more labels / short text on this page
Page feed · Continuation line · Uppercase · Column conventions · Reserved words
Page 236 of the Fujitsu UDS/SQL V2.5 user manual — 9.1 Schema DDL syntax
Page 236 · click to enlarge
Page 236

Schema DDL Reference section

9.1 Schema DDL syntax

⎧SCHEMA NAME clause Schema entry ⎨ ⎩[PRIVACY LOCK clause].

⎧AREA NAME clause Realm entry ⎨ ⎩[TEMPORARY clause].

⎧RECORD NAME clause [LOCATION MODE clause] WITHIN clause [SEARCH KEY clause]. Record entry ⎨ record element name clause [PICTURE clause] [TYPE clause] ⎩[OCCURS clause].

⎧SET NAME clause [DYNAMIC clause] ORDER clause OWNER clause. Set entry ⎨ [MEMBER clause [ASCENDING/DESCENDING-KEY clause] [SEARCH KEY clause] ⎩[SET OCCURRENCE SELECTION clause]].

Figure 62Structure of schema DDL

The description of the logical data structure should always be started with the schema entry and at least one realm entry.

The following applies for the subsequent realm, record and set entries:

– The two associated record types must be defined before a set can be defined.

– All the realms mentioned in the WITHIN clause for the record must be defined before a record type can be defined.

Page 237 of the Fujitsu UDS/SQL V2.5 user manual — 9.1.2 Realm entry
Page 237 · click to enlarge
Page 237

Reference section Schema DDL

9.1.1 Schema entry

SCHEMA NAME IS schema-name [PRIVACY LOCK FOR COPY IS literal-1[ OR literal-2]].

may consist of up to 10 characters.

The schema entry is used to assign a name to the schema. Passwords can be specified to prevent unauthorized creation of subschemas from the schema.

9.1.2 Realm entry

AREA NAME IS realm-name [AREA IS TEMPORARY].

The realm entry is used to assign a name to a realm and, if necessary, to define it as a temporary realm.

A maximum of 123 realms may be defined in a database with a page length of 2048

bytes, and a maximum of 245 realms may be defined in databases with a page length of 4000 or 8096 bytes.

Only one temporary realm may be defined.

literal-1,-2

Page 238 of the Fujitsu UDS/SQL V2.5 user manual — 9.1.3 Record entry
Page 238 · click to enlarge
Page 238

Schema DDL Reference section

9.1.3 Record entry

RECORD NAME IS record-name ⎧ ⎧ ⎧IN⎫ ⎫⎫ ⎧DIRECT ⎫ item-name-1 ⎨ ⎬ record-name ⎨ ⎬ ⎨ ⎩OF⎭ ⎬ ⎩DIRECT-LONG⎭ [LOCATION MODE IS ⎨ ⎩identifier-1 ⎭⎬] CALC[ hash-routine] USING item-name-2,... ⎩ DUPLICATES ARE[ NOT] ALLOWED ⎭

WITHIN realm-name-1[,realm-name-2,... AREA-ID IS identifier-2]

⎧CALC[ hash-routine]⎫ [SEARCH KEY IS item-name-3,...USING ⎨ ⎬[ NAME IS name] ⎩INDEX ⎭

DUPLICATES ARE[ NOT] ALLOWED]

{[level-number ]record-element-name

⎧ ⎧mask-string ⎫ ⎫ PICTURE IS ⎨ ⎬ ⎩LX(integer-1) DEPENDING ON item-name-4⎭ ⎧ ⎧ ⎧15⎫ ⎫ ⎫ BINARY[ ⎨ ⎬] FIXED REAL ⎨ ⎩31⎭ ⎬ [⎨ ⎬] ⎩DECIMAL[ integer-2[,integer-3]] ⎭ TYPE IS⎨ ⎬ CHARACTER[ integer-4[ DEPENDING ON item-name-5]] DATABASE-KEY ⎩ ⎩DATABASE-KEY-LONG ⎭⎭

[OCCURS integer-5 TIMES].}...

The record entry is used to assign a name to a record type. At the same time, it can be used to define:

– the allocation of records to realms, – the sequence of records for sequential processing, – additional access paths for direct access via primary and secondary keys, – all record elements to be included in the record type.

Page 239 of the Fujitsu UDS/SQL V2.5 user manual — Record entry
Page 239 · click to enlarge
Page 239

Reference section Schema DDL

A maximum of 253 record types may be defined in a database with a page length

of 2048 bytes, and a maximum of 32 766 record types may be defined in databases with a page length of 4000 or 8096 bytes.

The individual clauses of the record entry are explained below.

RECORD NAME IS record-name

A name is assigned to a record type.

⎧ ⎧ ⎧IN⎫ ⎫⎫ ⎧DIRECT ⎫ item-name-1 ⎨ ⎬ record-name ⎨ ⎬ ⎨ ⎩OF⎭ ⎬ ⎩DIRECT-LONG⎭ [LOCATION MODE IS ⎨ ⎩identifier ⎭⎬] CALC[ has h-routine] USING item-name-2, ... ⎩ DUPLICATES ARE[ NOT] ALLOWED ⎭

must designate a database key item. If you specify LOCATION MODE IS DIRECT, you must define item-name-1 as a DATABASE-KEY item. If you specify LOCATION MODE IS DIRECT-LONG, you must define item-name-1 as a DATABASE-KEY-LONG item.

must specify an item of fixed length belonging to the record type.

You use LOCATION MODE IS DIRECT/DIRECT-LONG to enable you to assign the database key of a record which is to be saved and to specify the sequence for sequential processing.

You use LOCATION MODE IS CALC to specify a primary key to permit direct access to a particular record or to a set of records with the same key values.

item-name-1 · item-name-2

Page 240 of the Fujitsu UDS/SQL V2.5 user manual — Record entry
Page 240 · click to enlarge
Page 240

Schema DDL Reference section

WITHIN realm-name-1[,realm-name-2,... AREA-ID IS identifier]

realm-name-1,-2,...

must not be temporary realms.

The records of the record type are allocated to certain realms.

⎧CALC[ hash-routine]⎫ [SEARCH KEY IS item-name,... USING ⎨ ⎬[ NAME IS name] ⎩INDEX ⎭

DUPLICATES ARE[ NOT] ALLOWED]

specifies an item of fixed length belonging to the record type.

name specifies tables for SEARCH keys; referred to in the SSL statements.

Additional direct access paths via secondary key are specified and a name is assigned to the SEARCH KEY table or the hash area, which can be referenced in the SSL.

[level-number ]record-element-name

must be an integer between 1 and 99. Default value: 1

A name is assigned to a record element and optionally a level number can be defined.

The total length of all record elements of one record type must not exceed the

maximum record length. The maximum record length is equal to:

– 2020 bytes in a database with a page length of 2048 bytes (2-Kbyte format) – 3968 bytes in a database with a page length of 4000 bytes (4-Kbyte format) – 8064 bytes in a database with a page length of 8096 bytes (8-Kbyte format)

Depending on the length of the SCD, the maximum record length may also be somewhat lower.

item-name · level-number

Page 241 of the Fujitsu UDS/SQL V2.5 user manual — A
Page 241 · click to enlarge
Page 241

Reference section Schema DDL

⎧mask-string ⎫ PICTURE IS ⎨ ⎬ ⎩LX(integer-1) DEPENDING ON item-name⎭

may consist of the following symbols:

S can be specified once only at the beginning of the mask string.

X at least one of these symbols must be entered. Each can be specified more than once or followed by a repetition symbol. 9 may not be placed to the left of A or X. N may not be combined with other characters.

A

N

V cannot be specified in combination with X, N or A.

P cannot be specified in combination with X, N or A. P can be specified more than once or followed by a repetition symbol. P may be specified either to the left or right of 9, but not both at the same time.

(integer) may be added after X, N, A, 9 or P.

Table 22Mask string

The mask string may define an item length of up to 255 bytes. This generally corre- sponds to the number of characters. However, you may only repeat the symbol N up to 127 times because in this case a character occupies 2 bytes. 9 may be repeated up to 18 times.

must be greater than 0. The maximum value depends on the record structure.

must refer to an item that has just been defined with TYPE IS BINARY 15.

The PICTURE IS clause is used to define unpacked numeric items or alphanumeric items of fixed or variable length or national items.

Show 4 more labels / short text on this page
mask-string · Symbol Syntax rule · integer-1 · item-name
Page 242 of the Fujitsu UDS/SQL V2.5 user manual — BINARY
Page 242 · click to enlarge
Page 242

Schema DDL Reference section

⎧ ⎧ ⎧15⎫ ⎫⎫ BINARY[ ⎨ ⎬] FIXED REAL ⎨ ⎩31⎭ ⎬ ⎩DECIMAL[ integer-1[,integer-2]] ⎭ TYPE IS ⎨ ⎬ CHARACTER[ integer-3[ DEPENDING ON item-name]] DATABASE-KEY ⎩DATABASE-KEY-LONG ⎭

BINARY

If no number is specified, the default value used by UDS/SQL is 15.

must be an integer between 1 and 18. Default value: 18

must not be greater than 18 and not less than {integer-1} - 18. Default value: 0.

Unless DEPENDING ON is used, integer-3 must be between 1 and 255. Otherwise, the maximum value depends on the record structure.

specifies the item which has just been defined with TYPE IS BINARY 15.

This clause is used to define

– packed numeric items, – binary items, – alphanumeric items of fixed or variable length, or – database key items

must be greater than 0. The maximum value depends on the record structure.

A repetition factor is defined for a vector or a repeating group.

Show 6 more labels / short text on this page
integer-1 · integer-2 · integer-3 · item-name · [OCCURS integer TIMES] · integer
Page 243 of the Fujitsu UDS/SQL V2.5 user manual — [SET OCCURRENCE SELECTION IS
Page 243 · click to enlarge
Page 243

Reference section Schema DDL

9.1.4 Set entry

SET NAME IS set-name

[SET IS DYNAMIC]

⎧LAST ⎫ FIRST NEXT PRIOR ORDER IS ⎨ ⎬ IMMATERIAL SORTED[ INDEXED[ NAME IS name]] ⎧DATABASE-KEY ⎫ BY ⎨ ⎬ ⎩ ⎩DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED⎭⎭

⎧record-name⎫ OWNER IS ⎨ ⎬. ⎩SYSTEM ⎭

⎧MANDATORY⎫ ⎧AUTOMATIC⎫ [MEMBER IS record-name ⎨ ⎬ ⎨ ⎬ ⎩OPTIONAL ⎭ ⎩MANUAL ⎭

⎧ASCENDING ⎫ [⎨ ⎬ KEY IS item-name-1,...] ⎩DESCENDING⎭

⎧CALC[ hash-routine]⎫ [SEARCH KEY IS item-name-2,... USING ⎨ ⎬ ⎩INDEX ⎭

[NAME IS name]

DUPLICATES ARE[ NOT] ALLOWED]...

[SET OCCURRENCE SELECTION IS

⎧CURRENT OF SET ⎫ ⎧item-name-3 ⎫ THRU ⎨LOCATION MODE OF OWNER[ ALIAS FOR ⎨ ⎬⎬]]. ⎩identifier-1⎭ ⎩ IS identifier-2]...⎭

Page 244 of the Fujitsu UDS/SQL V2.5 user manual — [SET IS DYNAMIC]
Page 244 · click to enlarge
Page 244

Schema DDL Reference section

This clause is used to assign a name to a set and to

– declare the set a dynamic set if required,

– define the sequence of the member records within the set occurrences for sequential processing,

– define additional access paths via primary and secondary keys,

– declare a record type to be the owner record type of the set,

– declare a record type to be a member record type of the set if required, and define the type of membership of member records in a set, and

– specify the selection option for the set occurrences.

A maximum of 32 766 sets can be defined per database.

For each record type which is owner of a set you can generate a maximum of 255 tables in these sets. A table is created when the set mode pointer array or list or chain is of the type sorted indexed, also for each secondary key in these sets.

Irrespective of this you may define up to 255 secondary keys per record type on record type level and per singular set on set level; hash routines are not counted here.

The individual clauses of the set entry are explained below.

SET NAME IS set-name

A name is assigned to the set.

[SET IS DYNAMIC]

The set is declared a dynamic set.

Page 245 of the Fujitsu UDS/SQL V2.5 user manual — Set entry
Page 245 · click to enlarge
Page 245

Reference section Schema DDL

⎧LAST ⎫ FIRST NEXT PRIOR ORDER IS ⎨ ⎬ IMMATERIAL SORTED[ INDEXED[ NAME IS name]] ⎧DATABASE-KEY ⎫ BY ⎨ ⎬ ⎩ ⎩DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED⎭⎭

This clause is used to define

– the sequence of the records within the set occurrences for sequential processing. – an additional direct access path via the primary key.

⎧record-name⎫ OWNER IS ⎨ ⎬. ⎩SYSTEM ⎭

A record type defined by the user or a symbolic record type SYSTEM is declared owner record type of the set.

⎧MANDATORY⎫ ⎧AUTOMATIC⎫ MEMBER IS record-name ⎨ ⎬ ⎨ ⎬ ⎩OPTIONAL ⎭ ⎩MANUAL ⎭

A description of the member record type is not required for dynamic sets. In all other cases, the above clause is used to declare a record type member record type and to specify the type of membership of the member records in the set.

Page 246 of the Fujitsu UDS/SQL V2.5 user manual — Set entry
Page 246 · click to enlarge
Page 246

Schema DDL Reference section

⎧ASCENDING ⎫ [⎨ ⎬ KEY IS item-name,...] ⎩DESCENDING⎭

item-name,...

denotes an item of fixed length that belongs to the record type.

This clause is used to define an item or a combination of items of the member record type as sort key. The member records within the set occurrence are sorted in ascending or descending order, according to the values of this key.

⎧CALC[ hash-routine]⎫ [SEARCH KEY IS item-name,... USING ⎨ ⎬[ NAME IS name] ⎩INDEX ⎭

DUPLICATES ARE[ NOT] ALLOWED]...

item-name,...

must specify an item of fixed length that belongs to this record type.

name specifies the name of the table; referred to in the SSL statements.

This clause is used to define additional direct access paths via secondary keys and to assign a name to the SEARCH key table or the hash area, which can be referenced in the SSL.

SEARCH KEY ... USING CALC is permitted only with a SYSTEM set.

Page 247 of the Fujitsu UDS/SQL V2.5 user manual — [SET OCCURRENCE SELECTION IS
Page 247 · click to enlarge
Page 247

Reference section Schema DDL

[SET OCCURRENCE SELECTION IS

⎧CURRENT OF SET ⎫ ⎧item-name ⎫ THRU ⎨LOCATION MODE OF OWNER[ ALIAS FOR ⎨ ⎬⎬] ⎩identifier-1⎭ ⎩ IS identifier-2]...⎭

must denote an item specified in the LOCATION MODE clause for the owner record type.

must be an identifier specified in the LOCATION MODE clause for the owner record type.

identifier-2 assigns a name for the additional item to be generated. UDS/SQL automatically creates this item with the same item type and length as item-name or identifier-1.

This clause must be specified if the set is not a SYSTEM set. It is used to define the selection option for the set occurrences.

item-name · identifier-1 · identifier-2

Page 248 of the Fujitsu UDS/SQL V2.5 user manual — 9.2.1 Schema entry
Page 248 · click to enlarge
Page 248

9.2 SSL syntax

Schema entry STORAGE clause.

⎧[RECORD NAME clause [DATABASE-KEY-TRANSLATION-TABLE clause] [record POPULATION clause] Record entry ⎨ [PLACEMENT-OPTIMIZATION clause] [INDEX clause] ⎩[COMPRESSION clause]].

⎧[SET NAME clause [set POPULATION clause] Set entry ⎨[MODE clause] [INDEX clause] ⎩[PHYSICALLY LINKED clause]].

Figure 63Structure of SSL

The description of the physical storage structure is optional. If it is omitted, UDS/SQL uses the default values indicated in the explanations for the individual syntax elements.

Otherwise, the description always starts with the STORAGE clause. The sequence of the record and set descriptions is arbitrary. All names referred to in the storage structure description must have been previously defined in the schema DDL.

9.2.1 Schema entry

STORAGE STRUCTURE OF SCHEMA schema-name.

The schema entry is used to specify the name of the schema to which the storage structure description applies.

SSL Reference section

Page 249 of the Fujitsu UDS/SQL V2.5 user manual — 9.2.2 Record entry
Page 249 · click to enlarge
Page 249

9.2.2 Record entry

RECORD NAME IS record-name

[DATABASE-KEY-TRANSLATION-TABLE[ IS integer-1][ WITHIN realm-name-1]]

[POPULATION IS {integer-2 WITHIN realm-name-2},...]

[PLACEMENT OPTIMIZATION FOR SET set-name]

[INDEX NAME IS name

[PLACING IS WITHIN realm-name-3]

⎧DATABASE-KEY-LIST ⎫ [TYPE IS ⎨REPEATED-KEY MU]]... ⎩ [DYNAMIC REORGANIZATION SPANS integer-3 PAGES]⎭

[COMPRESSION FOR ALL ITEMS].

The record entry is used to specify the name of the record type to which the storage structure description applies and

– to describe the size and physical position of the DBTT and the size of the hash areas for record SEARCH keys,

– to specify the number of records of the record type or the size of the hash area for the primary key within certain realms,

– to describe the physical position of the records within a realm if the record type is a member of a set,

– to describe the physical position, the type and the extent of reorganization employed for record SEARCH key tables or the physical position of hash areas for record SEARCH keys, and

– to indicate compression.

The individual clauses of the record entry are explained below.

RECORD NAME IS record-name

This clause is used to specify the name of the record type to which the record entry applies.

Reference section SSL

Page 250 of the Fujitsu UDS/SQL V2.5 user manual — Record entry
Page 250 · click to enlarge
Page 250

[DATABASE-KEY-TRANSLATION-TABLE[ IS integer][ WITHIN realm-name]]

must be greater than 0. If this entry is omitted, UDS/SQL reserves one page each for the DBTT and the hash area of a record SEARCH key.

must not denote a temporary realm. If this entry is omitted, the DBTT is placed in the realm first mentioned in the DDL WITHIN clause for this record type.

This clause is used to describe the size and position of the DBTT and at the same time the size of the hash areas for the record SEARCH keys.

[POPULATION IS {integer WITHIN realm-name},...]

must be greater than 0.

must be a realm name specified in the DDL WITHIN clause for this record type. All realm names specified in the DDL WITHIN clause for this record type must be listed.

This clause is used to describe size and position of the hash areas for the primary key (LOCATION MODE IS CALC). In addition, UDS/SQL bases its assessment of the realm sizes on this entry.

If this clause is omitted, UDS/SQL reserves one page for the hash area in each of the realms mentioned in the WITHIN clause.

Show 5 more labels / short text on this page
SSL Reference section · integer · realm-name · integer · realm-name
Page 251 of the Fujitsu UDS/SQL V2.5 user manual — Record entry
Page 251 · click to enlarge
Page 251

[PLACEMENT OPTIMIZATION FOR SET set-name]

must not denote a SYSTEM set.

This clause is used to store the member records of the set set-name in the vicinity of their owner record.

The record type must be an AUTOMATIC member of the set set-name.

Each realm referenced in the DDL WITHIN clause for this record type must also be specified in the WITHIN clause for the owner record type of the set set-name.

integer-1 in the set POPULATION clause of the set set-name must be greater than 0.

An indirect hash area is created if LOCATION MODE IS CALC has been defined for this record type.

This clause has no effect

– if the record type is a member of a set for which MODE IS LIST has been defined,

– if the owner record type of the set set-name is a member of a set for which MODE IS LIST has been defined,

– if LOCATION MODE IS CALC or PLACEMENT OPTIMIZATION has been defined for the owner record type of the set set-name.

Reference section SSL · set-name

Page 252 of the Fujitsu UDS/SQL V2.5 user manual — Record entry
Page 252 · click to enlarge
Page 252

[INDEX NAME IS name

[PLACING IS WITHIN realm-name]

⎧DATABASE-KEY-LIST ⎫ [TYPE IS ⎨REPEATED-KEY ⎬]]... ⎩ [DYNAMIC REORGANIZATION SPANS integer PAGES]⎭

name must have been defined in the schema DDL for a record SEARCH key table or a

hash area of this record type.

must not be a temporary realm. If this entry is omitted, UDS/SQL places the record SEARCH key table or the hash area in the first realm referenced in the DDL WITHIN clause for this record type.

must be an integer between 1 and 20. Default value: 2

This clause is used to specify the name of the record SEARCH key table or the hash area to which the description applies and to define

– for a record SEARCH key table; the physical placement, the type and the extent of reorganization,

– for a hash area; the physical placement.

If the description applies to a hash area, only PLACING can be specified. i

SSL Reference section · realm-name · integer

Page 253 of the Fujitsu UDS/SQL V2.5 user manual — [COMPRESSION FOR ALL ITEMS]
Page 253 · click to enlarge
Page 253

[COMPRESSION FOR ALL ITEMS]

This clause causes UDS/SQL to store the records in compressed form, provided they are made available in this form at the DML interface.

If the record type has been defined with LOCATION MODE IS CALC, indirect CALC

pages are created due to the compression.

Compression is not allowed if the record type contains an item of variable length or is a member of a set which has been defined with MODE IS LIST.

Reference section SSL

Page 254 of the Fujitsu UDS/SQL V2.5 user manual — 9.2.3 Set entry
Page 254 · click to enlarge
Page 254

9.2.3 Set entry

SET NAME IS set-name

[POPULATION IS integer-1[ INCREASE IS integer-2]]

⎧CHAIN[ LINKED TO PRIOR] ⎫ ⎧POINTER-ARRAY⎫ ⎧ATTACHED TO OWNER ⎫ [MODE IS ⎨ ⎬] ⎨ ⎬ ⎨DETACHED[ WITHIN realm-name-1]⎬ ⎩⎩LIST ⎭ ⎩ [ WITH PHYSICAL LINK] ⎭⎭

[DYNAMIC REORGANIZATION SPANS integer-3 PAGES]

[INDEX NAME IS name

⎧ATTACHED TO OWNER ⎫ [PLACING IS ⎨ ⎬] ⎩DETACHED[ WITHIN realm-name-2]⎭

⎧DATABASE-KEY-LIST ⎫ [TYPE IS ⎨REPEATED-KEY ⎬]]... ⎩ [DYNAMIC REORGANIZATION SPANS integer-4 PAGES]⎭

[MEMBER IS PHYSICALLY LINKED TO OWNER].

The set entry is used to specify the set to which the storage structure description applies as well as

– to indicate the average size of the set occurrences

– to give information on the connection of the records within the set occurrences

– to define placement and extent of reorganization for pointer arrays, lists, sort key tables and set SEARCH key tables

– to indicate the type of set SEARCH key tables

– to add a pointer from member to owner.

The individual clauses of the set entry are explained below.

SSL Reference section

Page 255 of the Fujitsu UDS/SQL V2.5 user manual — CHAIN [LINKED TO PRIOR]
Page 255 · click to enlarge
Page 255

SET NAME IS set-name

This clause is used to specify the name of the set to which the set entry applies.

[POPULATION IS integer-1[ INCREASE IS integer-2]]

must be greater or equal to 0. Default value: 0

must be greater than 0. Default value: 1

This clause is used to indicate the average number of member records which are expected to be in the set occurrences when the database is initially loaded or when the set occur- rences are extended at a later date.

⎧CHAIN[ LINKED TO PRIOR] ⎫ ⎧POINTER-ARRAY⎫ ⎧ATTACHED TO OWNER ⎫ [MODE IS ⎨ ⎬] ⎨ ⎬ ⎨DETACHED[ WITHIN realm-name]⎬ ⎩⎩LIST ⎭ ⎩ [WITH PHYSICAL LINK]⎭⎭

[DYNAMIC REORGANIZATION SPANS integer PAGES]

CHAIN [LINKED TO PRIOR]

is the only valid specification if the set was defined with ORDER IS SORTED (without INDEXED) in the schema DDL.

POINTER-ARRAY DETACHED WITHIN realm-name

is the only valid specification if the set is a dynamic set.

Reference section SSL · integer-1 · integer-2

Page 256 of the Fujitsu UDS/SQL V2.5 user manual — ATTACHED
Page 256 · click to enlarge
Page 256

LIST may be specified only if the following conditions are satisfied:

– The membership of the member record type in the set was defined as MANDATORY AUTOMATIC.

– Member records (including pointers, see page 219, SCD) are no longer than – 993 bytes for databases with a page length of 2048 bytes, – 1963 bytes for databases with a page length of 4000 bytes, and – 4011 bytes for databases with a page length of 8096 bytes.

LIST ATTACHED or LIST DETACHED (without WITHIN)

may be specified only if the same realms were specified in the DDL WITHIN clauses for the owner and the member record types of this set, provided the set is not a SYSTEM set. The placement of a list is determined without a DETACHED WITHIN clause by the placement of the owner.

ATTACHED

may be specified only if the set is not a SYSTEM set.

must denote a temporary realm if the set is dynamic. In the case of LIST, it must be identical to that specified in the DDL WITHIN clause for the member record type.

specifies an integer between 1 and 20. Default value: 2

This clause is used to specify the linking of records within the set occurrences. When setting up a pointer array, list or sort key table, the user can also define the extent of reorganization for such tables.

If this clause is omitted, the following default values apply for:

– dynamic sets: POINTER-ARRAY DETACHED WITHIN realm-name – ORDER IS SORTED INDEXED: POINTER-ARRAY DETACHED – ORDER IS LAST/FIRST/NEXT/PRIOR/SORTED: CHAIN – non-dynamic sets if ORDER IS IMMATERIAL: CHAIN

SSL Reference section · realm-name · integer

Page 257 of the Fujitsu UDS/SQL V2.5 user manual — MEMBER IS PHYSICALLY LINKED TO OWNER
Page 257 · click to enlarge
Page 257

[INDEX NAME IS name

⎧ATTACHED TO OWNER ⎫ [PLACING IS ⎨ ⎬] ⎩DETACHED[ WITHIN realm-name]⎭

⎧DATABASE-KEY-LIST ⎫ [TYPE IS ⎨REPEATED-KEY ⎬]]... ⎩ [DYNAMIC REORGANIZATION SPANS integer PAGES]⎭

name must be the name of a table or of a hash area specified in the Schema DDL.

ATTACHED

may be specified only if the set is not a SYSTEM set.

must not denote a temporary realm. If this entry is omitted, UDS/SQL selects the default value as indicated on page 162, figure 40.

integer must be an integer between 1 and 20. Default value: 2

If a table of this set has been specified in the Schema DDL, this table can be referenced here in order to define its placement, type and extent of reorganization. If a SEARCH key has been defined for storage in a hash area, the realm which is to contain this hash area can be specified here.

– for PLACINGDETACHED – for TYPE: REPEATED-KEY

MEMBER IS PHYSICALLY LINKED TO OWNER

This clause is used to include an additional pointer to its owner in each member record of the set. The SCD of a member record also contains the PPP of the associated owner record.

Reference section SSL · realm-name · Default values

Page 258 of the Fujitsu UDS/SQL V2.5 user manual — 9.3 Subschema DDL syntax
Page 258 · click to enlarge
Page 258

Subschema DDL Reference section

9.3 Subschema DDL syntax

IDENTIFICATION DIVISION. SUB-SCHEMA NAME clause [PRIVACY LOCK clause] [PRIVACY KEY clause]. DATA DIVISION. AREA SECTION. COPY clause. RECORD SECTION. [COPY clause.]

⎧[record name clause. record element name clause [GROUP-USAGE clause] [PICTURE clause] Record entry ⎨ [USAGE clause] [OCCURS clause]. [condition name clause ⎩VALUE clause.]]

[SET SECTION. COPY clause.]

Figure 64Structure of subschema DDL

The sequence of clauses shown in figure 64 must be observed, with the following exceptions:

– The sequence of PICTURE and USAGE clauses is arbitrary.

– In the RECORD SECTION, a COPY clause may also follow a record entry.

Names used in the definition of the subschema must have been defined in the schema DDL. This does not apply to group item and condition names, which are newly defined in the subschema.

Page 259 of the Fujitsu UDS/SQL V2.5 user manual — 9.3.2 AREA SECTION
Page 259 · click to enlarge
Page 259

Reference section Subschema DDL

9.3.1 IDENTIFICATION DIVISION

IDENTIFICATION DIVISION. SUB-SCHEMA NAME IS subschema-name OF SCHEMA NAME schema-name [PRIVACY LOCK FOR COMPILE IS literal-1[ OR literal-2]] [PRIVACY KEY FOR COPY IS literal-3].

may consist of up to 10 characters.

must be a password defined in the schema entry of the schema DDL.

This entry is used to assign a name to the subschema, and

– to indicate from which schema the subschema is to be copied,

– to define passwords to prevent unauthorized compilation of a DML program with this subschema, and

– to enter, where appropriate, one of the passwords preventing unauthorized copying of a subschema from the schema.

9.3.2 AREA SECTION

DATA DIVISION. AREA SECTION.

⎧COPY ALL AREAS. ⎫ ⎨ ⎬ ⎩{COPY realm-name, }...⎭

This entry is used to copy all realms or a selection of realms from the schema into the subschema.

literal-1,-2 · literal-3

Page 260 of the Fujitsu UDS/SQL V2.5 user manual — GROUP-USAGE
Page 260 · click to enlarge
Page 260

Subschema DDL Reference section

9.3.3 RECORD SECTION

RECORD SECTION.

⎧COPY ALL RECORDS. ⎫ [⎨ ⎬] ⎩{COPY record-name-1,...} ⎭

[01 record-name-2. {level-number record-element-name[ PICTURE IS mask-string]

[ GROUP-USAGE IS NATIONAL]

⎧DISPLAY ⎫ COMPUTATIONAL-3 COMPUTATIONAL [ USAGE IS ⎨ ⎬] NATIONAL DATABASE-KEY ⎩DATABASE-KEY-LONG⎭

[ OCCURS integer TIMES].}...

⎧VALUE IS ⎫ ⎨ ⎬ {literal-1[ THROUGH literal-2]}, ]...]... ⎩VALUES ARE⎭

must not be identical with record-name-1 and must not be used in combination with COPY ALL RECORDS.

must be an integer between 02 and 49.

See page 241, table 22.

GROUP-USAGE

If the GROUP-USAGE clause is specified, all lower-ranking record elements must be of the type NATIONAL.

Show 4 more labels / short text on this page
[88 condition-name · record-name-2 · level-number · mask-string
Page 261 of the Fujitsu UDS/SQL V2.5 user manual — 9.3.4 SET SECTION
Page 261 · click to enlarge
Page 261

Reference section Subschema DDL

USAGE

If this entry is omitted, DISPLAY is assumed by default.

Exception: if the PICTURE clause contains the symbol N, NATIONAL is assumed if the USAGE clause is missing.

must be less than literal-2.

The user has the choice of either completely copying all record types contained in the schema into the subschema or only a selection of records or items. In the latter case, the user specifies the record types that are to be copied completely or in part. For records to be copied in part, the user must specify all record elements that are to be copied. It is also possible to define group items and conditions.

9.3.4 SET SECTION

SET SECTION.

⎧COPY ALL SETS. ⎫ ⎨ ⎬ ⎩{COPY set-name, }...⎭

This entry is used to copy all sets or a selection of sets from the schema.

literal-1

Page 262 of the Fujitsu UDS/SQL V2.5 user manual — SET SECTION
Page 262 · click to enlarge
Page 262

Subschema DDL Reference section

Page 263 of the Fujitsu UDS/SQL V2.5 user manual — A
Page 263 · click to enlarge
Page 263

Glossary

This Glossary contains the definitions of some of the important terms and concepts used in the UDS/SQL manuals. Terms that appear in italics within a particular definition have also been defined in this Glossary. In cases where two or more terms are used synonymously, a “See” reference points to the more commonly used term in these manuals.

A

See contending access.

See direct access.

See sequential access.

The rights of a specified user group with regard to access to the database. Access rights are defined during live database operation using ONLINE- PRIVACY utility routine or, in offline mode, using the BPRIVACY utility routine.

Means of finding a certain subset of all records qualified by a search query, without having to carry out a sequential search of the whole database.

Right of access to a database as defined in the BPRIVACY utility routine.

Type of access, e.g. read, update etc.

Show 7 more labels / short text on this page
access, contending · access, direct · access, sequential · access authorization · access path · access rights · access type
Page 264 of the Fujitsu UDS/SQL V2.5 user manual — AFIM
Page 264 · click to enlarge
Page 264

(actual key) Actual address of a page, consisting of realm number and page number.

First page of a realm; contains general information on the realm such as – when the realm was created, – when the realm was last updated, – internal version number of the realm, – system break information – if applicable, warm start information.

Characteristic page of a realm, with the highest page number. Copy of the act-key-0 page.

See act-key or PPP.

Task of the independent DBH; The database administrator can control execution of the independent DBH via this task.

AFIM

See after-image.

Modified portion of a page after its content has been updated. The DBH writes after-images to the RLOG file as well as the ALOG file.

The after-images are written to the ALOG file when the ALOG buffer is full. The purpose of the after-images in the ALOG file is to secure the data contained in the database and thus they must be maintained for a long period of time. They are used to reconstruct an original database or update a shadow database.

After-images are logged in the RLOG file before the updates are applied to the database. The after-images held in the RLOG file are required for warm start only. They are thus periodically overwritten.

File for securing the data contained in the database in the long term; see after- image.

Show 10 more labels / short text on this page
A Glossary · act-key · act-key-0 page · act-key-N page · address, physical · administrator task · after-image · after-image, ALOG file · after-image, RLOG file · ALOG file
Page 265 of the Fujitsu UDS/SQL V2.5 user manual — Glossary
Page 265 · click to enlarge
Page 265

See sequence number.

Record automatically created by UDS/SQL as owner record for SYSTEM sets. It cannot contain any items defined with the schema DDL and cannot be accessed.

Realization of a job in one or several user programs working with UDS/SQL databases.

E.g. COBOL DML program or IQS.

See realm.

ascending key (ASC key)

Primary key of a set. Defines the sequence of member records in the set occurrences by ascending key values.

Identification used for user groups.

Specified user groups who are authorized to access the database.

Some utility routines automatically extend the number of records possible for a record type if too few are available; no separate administration is required to do this. See also online DBTT extension.

Some utility routines automatically extend realms when insufficient free space is available; no separate administration is required to do this. See also online realm extension.

Show 10 more labels / short text on this page
Glossary A · ALOG sequence number · anchor record · application · application program (AP) · area · authorization · authorized users · automatic DBTT extension · automatic realm extension
Page 266 of the Fujitsu UDS/SQL V2.5 user manual — BIB
Page 266 · click to enlarge
Page 266

B

See shadow database.

base interface block (BIB)

(Base Interface Block) Standard interface between UDS/SQL and each individual user; it contains, among other things, the RECORD AREA (user records as defined in the subschema).

Copy of a page taken before its contents are updated. The DBH writes before-images to the RLOG files during database operation before the updates are applied to the database. A prerequisite is that the RLOG files exist.

BFIM

See before-image.

BIB

See base interface block.

See system buffer pools and exclusive buffer pool.

Key whose value is converted into a relative page number by means of a hash routine.

Page of a hash area.

Secondary key. Used as access path for direct access via hash routine.

Show 7 more labels / short text on this page
B Glossary · backup database · before-image · buffer pool · CALC key · CALC page · CALC SEARCH key
Page 267 of the Fujitsu UDS/SQL V2.5 user manual — CHECK-TABLE
Page 267 · click to enlarge
Page 267

Table in the direct/indirect CALC page whose entries point to the stored records. Each line contains: – the CALC key, – the record sequence number – the displacement to the related page index entry (direct CALC page) or the probable position pointer (indirect CALC page).

CALL DML

DML that is called by various programming languages (Assembler, COBOL, FORTRAN, PASCAL, PL/1) via the CALL interface.

Name of the public volume set (PVS) under which the BS2000/UDS/SQL files are stored. The catalog identifier is part of the database or file name and must be enclosed in colons: “:catid:”.

Storage mode for a set occurrence in which every record contains a pointer to the subsequent record.

Character Separated Values (CSV)

Output format in which the values are separated by a predefined character.

Consistency point, at which the ALOG file was changed and to which it is possible to return at any time using BMEND utility routine

Elements which provide information for checking the database. They vary in length from 20 to 271 bytes.

CHECK-TABLE

Check table produced by the DDL compiler during Subschema DDL compilation, and used by the COBOL compiler and CALL DML to check whether the DML statements specified in the application program are permitted. It is part of the COSSD or SSITAB module.

Show 6 more labels / short text on this page
Glossary C · CALC table · catalog identifier · chain · checkpoint · check records
Page 268 of the Fujitsu UDS/SQL V2.5 user manual — COBOL DML
Page 268 · click to enlarge
Page 268

clone pair, clone pubset, clone session, clone unit

A clone unit is the copy of an (original) unit (logical disk in BS2000/OSD) at a particular time (“Point-in-Time copy”). The TimeFinder/Clone component creates this copy optionally as a complete copy or as a “snapshot”. After they have been activated, the unit and clone unit are split; applications can access both. The unit and clone unit together form a clone pair. TimeFinder/Clone manages this pair in what is known as a clone session. If clone units exist for all units of a pubset, these clone units together form the clone pubset. Details of this are provided in the manual "Introductory Guide to Systems Support".

COBOL DML

DML integrated in the COBOL language.

Runtime system; sharable routines selected by the COBOL compiler (COBOL2000 or COBOL85) for the execution of complex statements.

COBOL Subschema Directory (COSSD)

Provides the COBOL compiler with subschema information for compilation of the DB application programs.

Shareable memory area used by several different tasks. In UDS/SQL, it always consists of the common pool and the communication pool and, depending on the application, the SSITAB pool (see SSITAB module) if CALL DML is used. If UDS-D is used, it also consists of the distribution pool and the transfer pool.

Communication area of the independent DBH. Enables DBH modules to commu- nicate with each other. Contains, among other things, an input/output buffer for pages (buffer pools).

Tasks or data display terminals.

Communication area of the independent DBH for application programs. One of its functions is to store base interface blocks (BIB).

compatible database interface (KDBS)

Show 7 more labels / short text on this page
C Glossary · COBOL runtime system · common memory · common pool · communication partners · communication pool · see KDBS
Page 269 of the Fujitsu UDS/SQL V2.5 user manual — COMPILER-SUBSCHEMA
Page 269 · click to enlarge
Page 269

The realms and files of the database which are required by the UDS/SQL compiler. They are – DBDIR (Database Directory) – DBCOM (Database Compiler Realm) – COSSD (COBOL Subschema Directory).

COMPILER-SCHEMA

UDS/SQL-internal schema of the compiler database.

COMPILER-SUBSCHEMA

UDS/SQL-internal subschema of the compiler database.

Key consisting of several key items.

Only the filled items of a record are stored (see SSL clause COMPRESSION).

See DB configuration.

User ID in which the database administrator starts the DBH.

Freely selectable name of the database configuration for a particular session. The DBH uses it to form: – the name of the Session Log File, – the names of the DB status file and its backup copy, – the names of the RLOG files, – the names of the temporary realms, – the names of session job variables, – the event names of P1 eventing, – the DCAM application name for the administration, – the names of the common pools – the names of the dump files.

Module that must be linked into every UDS/SQL application program and which establishes the connection with the DBH.

State of the database without conflicts in the data stored in it.

Show 9 more labels / short text on this page
Glossary C · compiler database · compound key · compression · configuration · configuration user ID · configuration name · connection module · consistency
Page 270 of the Fujitsu UDS/SQL V2.5 user manual — CRA
Page 270 · click to enlarge
Page 270

State of the database in which the stored data has no internal conflicts and reflects the real-world situation.

State of the database in which the stored data is consistent with regard to correct physical storage, access paths and description information.

See physical consistency.

A violation of the physical consistency of the stored data.

Point (in time) at which the database is consistent, i.e. all modifying transaction have been terminated and their modifications have been executed in the database.

Administration record with consistency time and date stamps in the DBDIR. For an update in a realm the DBH enters the date and time in the consistency record and in the updated realm. When realms or databases are attached for a session, the DBH uses this time stamp to check the consistency of the realms within each database.

Different transactions attempting to access a page simultaneously.

SQL-specific administration data is retained across transaction boundaries in an SQL application. This kind of data administration unit is called a conversation. In openUTM such an administrative unit is also called a service.

See database copy.

COSSD

See COBOL Subschema Directory.

CRA

(Current Record of Area) Record which is marked in the currency table as the current record of a particular realm (area).

Show 10 more labels / short text on this page
C Glossary · consistency, logical · consistency, physical · consistency, storage · consistency error · consistency point · consistency record · contending access · conversation · copy
Page 271 of the Fujitsu UDS/SQL V2.5 user manual — DAL
Page 271 · click to enlarge
Page 271

CRR

(Current Record of Record) Record which is marked in the currency table as the current record of a particular record type (Record).

CRS

(Current Record of Set) Record which is marked in the currency table as the current record of a particular set.

CRU

(Current Record of Rununit) Record which is marked in the currency table as the current record of the processing chain.

CSV

see Character Separated Values

The currency table contains: – CURRENT OF AREA table (table of CRAs), – CURRENT OF RECORD table (table of CRRs) and – CURRENT OF SET table (table of CRSs).

CURRENT OF AREA table

See currency table.

CURRENT OF RECORD table

See currency table.

CURRENT OF SET table

See currency table.

D

DAL

(Database Administrator Language) Comprises the commands which monitor and control a session.

Protection against loss of data as a result of hardware or software failure.

See deadlock.

Show 4 more labels / short text on this page
Glossary D · currency table · data backup · data deadlock
Page 272 of the Fujitsu UDS/SQL V2.5 user manual — D
Page 272 · click to enlarge
Page 272

Protection against unauthorized access to data. Implemented in UDS/SQL by means of the schema/subschema concept and access authorization. Access rights are granted by means of the BPRIVACY utility routine.

Related data resources that are evaluated, processed and administered with the help of a database system. A database is identified by the database name. An UDS/SQL database consists of the user database and the compiler database. To prevent the loss of data, a shadow database may be operated together with (i.e. parallel to) the original database.

Person who manages and controls database operation. The DB administrator is responsible for the utility routines and the Database Administrator Language (DAL).

Copy of a consistent database; may be taken at a freely selectable point in time.

database compiler realm (DBCOM)

Stores information on the realms, records and sets defined by the user in the Schema DDL and Subschema DDL.

Updating of a database copy to the status of a checkpoint by applying the appro- priate after-images.

Contains, among other things, the SIA, all the SSIAs and information on access rights.

Job variable in which UDS/SQL stores information on the status of a database.

database key (DB key)

Key whose value represents a unique identifier of a record in the database. It consists of the record reference number and the record sequence number. The database key values are either defined by the database programmer or automatically assigned by UDS/SQL.

Show 8 more labels / short text on this page
D Glossary · data protection (privacy) · database (DB) · database administrator · database copy · database copy update · database directory (DBDIR) · database job variable
Page 273 of the Fujitsu UDS/SQL V2.5 user manual — DBCOM
Page 273 · click to enlarge
Page 273

Item of type DATABASE-KEY or DATABASE-KEY-LONG that is used to accom- modate database key values. Items of type DATABASE-KEY and DATABASE-KEY-LONG differ in terms of the item length (4 bytes / 8 bytes) and value range.

See database key item.

See database key item.

See page.

DATABASE-STATUS

Five-byte item indicating the database status and consisting of the statement code and the status code.

Software system that supports all tasks in connection with managing and controlling large data resources. The database system provides mechanisms for stable and expandable data organization without redundancies. They allow many users to access databases concurrently and guarantee a consistent data repository.

(database status file) Contains information on the most recently reset transac- tions. openUTM-S or, in the case of distributed processing, UDS-D/openUTM-D needs this information for a session restart.

(database configuration) The databases attached to a DBH at any one point during session runtime. As the result of DAL commands or DBH error handling, the database configuration can change in the course of a session. At the session start, the DB configuration may be empty. Databases can be attached with DAL commands after the start of the session. They can also be disconnected during the session with DAL commands.

DBCOM

See database compiler realm.

Show 8 more labels / short text on this page
Glossary D · database key item · DATABASE-KEY item · DATABASE-KEY-LONG item · database page · database system · DB status file · DB configuration
Page 274 of the Fujitsu UDS/SQL V2.5 user manual — DBTT
Page 274 · click to enlarge
Page 274

DBDIR

See database directory.

DBH

Database Handler: program (or group of programs) which controls access to the database(s) of a session and assumes all the attendant administrative functions.

End of the DBH program run. DBH end can be either a session end or a session abort.

See independent DBH.

See database key.

See linked-in DBH.

See load parameters (DBH).

Start of the DBH program run. DBH start can be either a session start or a session restart.

DBTT

(Database Key Translation Table) Table from which UDS/SQL can obtain the page address (act-key) of a record and associated tables by means of the database key value. The DBTT for the SSIA-RECORD consists only of the DBTT base. For all other record types, the DBTT consists of a base table (DBTT base) and possibly of one or more extension tables (DBTT extents) resulting from an online DBTT extension or created by BREORG.

Page lying within the realm of the associated DBTT in which the DBTT base and DBTT extents are administered. Depending on the number of DBTT extents multiple chained DBTT anchor pages may be required for their administration.

Show 10 more labels / short text on this page
D Glossary · DBH end · DBH, independent · DB key · DBH, linked-in · DBH load parameters · DBH start · DBTT anchor page · DBTT base · see DBTT
Page 275 of the Fujitsu UDS/SQL V2.5 user manual — DDL
Page 275 · click to enlarge
Page 275

Page containing the DBTT or part of the DBTT for a particular record type.

DCAM

Component of the TRANSDATA data communication program.

Communication application using the DCAM communication method. A DCAM application enables communication between – a DCAM application and terminals. – different DCAM applications within the same or different hosts, and with remote configurations. – a DCAM and a openUTM application.

DDL

(Data Description Language) Formalized language for defining the logical data structure.

Mutual blocking of transactions. A deadlock can occur in the following situations: – Data deadlock: This occurs when transactions block each other with contending access. – Task deadlock: This occurs when a transaction that is holding a lock cannot release it, since no openUTM task is free. This deadlock situation can only occur with UDS/SQL-openUTM interoperation.

descending key (DESC key)

Primary key of a set. Determines the sequence of member records in the set occur- rences to reflect descending key values.

Access to a record via an item content. UDS/SQL supports direct access via the database key, hash routines and multi-level tables.

See hash area.

A logically connected set of data resources that is distributed over more than one UDS/SQL configuration.

Show 9 more labels / short text on this page
Glossary D · DBTT extent · see DBTT · DBTT page · DCAM application · deadlock · direct access · direct hash area · distributed database
Page 276 of the Fujitsu UDS/SQL V2.5 user manual — DML
Page 276 · click to enlarge
Page 276

Transaction that addresses at least one remote configuration. A transaction can be distributed over: – UDS-D, – openUTM-D, – UDS-D and openUTM-D.

Area in the independent DBH used for communication between UDSCT, server tasks, user tasks and the master task with regard to UDS-D-specific data. The distribution pool contains the distribution table and the UDS-D-specific system tables.

Table created by UDS-D using the input file assigned in the distribution pool. With the aid of the distribution table, the distribution component in the user task decides whether a processing chain should be processed locally or remotely. Assigned in the distribution table are: subschema - database database - configuration configuration - host computer.

DML

Data Manipulation Language: language for accessing a UDS/SQL database.

A primary subtransaction is created by UDS-D when the first READY statement in a transaction addresses a remote database. A dummy subtransaction is used to inform the local configuration of the trans- action so that the database can be recovered following an error.

Contains general information on a duplicates table or a page of a duplicates table, i.e. – chaining reference to the next and previous overflow page – the number of free bytes in the page of the duplicates table.

Show 6 more labels / short text on this page
D Glossary · distributed transaction · distribution pool · distribution table · dummy subtransaction · duplicates header
Page 277 of the Fujitsu UDS/SQL V2.5 user manual — FPA
Page 277 · click to enlarge
Page 277

Special SEARCH-KEY table in which a key value which occurs more than once is stored only once. For each key value, the duplicates table contains: – a table index entry with the key value and a pointer to the associated table entry – a table entry (DB key list), which can extend over several pages, containing the record sequence numbers of the records which contain this key value.

duplicates table, main level

Main level, Level 0. Contains a table index entry and the beginning of the associated table entry (DB key list).

Set which exists only for the life of a transaction and which stores member records retrieved as result of search queries.

E

ESTIMATE-REPORT

Report produced after BGSIA run. Used to estimate the size of the user realms.

Identification used in eventing.

Buffer which, in addition to the system buffer pools, is used exclusively for buffering pages of the specified database.

F

Record element whose value matches the primary key values of another table (UDS/SQL record type). Foreign keys in the sense of UDS/SQL are qualified as "REFERENCES owner record type" in the member record type of a set relati- onship in the BPSQLSIA protocol.

FPA

See free place administration.

Show 6 more labels / short text on this page
Glossary E · duplicates table · dynamic set · event name · exclusive buffer pool · foreign key
Page 278 of the Fujitsu UDS/SQL V2.5 user manual — H
Page 278 · click to enlarge
Page 278

See free place administration.

See free place administration.

Free place administration page.

free place administration (FPA)

Free space is managed both at realm level (FPA pages) and at page and table level. Free place administration of the pages is carried out in a base table (FPA base) and possibly in one or more extension tables (FPA extents) created by means of an online realm extension or BREORG.

Coding of a DML statement; included in information output by means of the DAL command DISPLAY or by UDSMON.

G

Nameable grouping of record elements.

H

Storage area in which UDS/SQL stores data and from which it retrieves data on the basis of key values which are converted into relative page numbers. A hash area may contain the record addresses as well as the records themselves. A direct hash area contains the records themselves; an indirect hash area, by contrast, contains the addresses of records stored at some other location.

Module which performs hashing.

Method of converting a key value into a page address.

Show 9 more labels / short text on this page
G Glossary · FPA base · FPA extent · FPA page · function code · group item · hash area · hash routine · hashing
Page 279 of the Fujitsu UDS/SQL V2.5 user manual — HASHLIB
Page 279 · click to enlarge
Page 279

HASHLIB

Module library for the storage of hash routines for one database.

Name allocated by the database designer to an item that UDS/SQL creates automatically. UDS/SQL adapts item type and length to the specified item usage.

SYSTEM set created by UDS/SQL when a SEARCH key is defined at record type level.

State of the database in which the data values contained in it are inconsistent.

Independent program system enabling more than one user to access a single database (mono-DB operation) or several databases (multi-DB operation) simulta- neously. The independent DBH is designed as a task family, consisting of – a master task (UDSSQL) – one or more server tasks (UDSSUB) – an administrator task (UDSADM)

Hierarchy level of an index page.

Page in which the highest (lowest) key values of the next-lower level of an indexed table are stored.

Secondary key. Used as access path for direct access via a multi-level table.

See hash area.

Show 9 more labels / short text on this page
Glossary I · identifier · implicit set · inconsistency · independent DBH · index level · index page · INDEX search key · indirect hash area
Page 280 of the Fujitsu UDS/SQL V2.5 user manual — KDBS
Page 280 · click to enlarge
Page 280

State of the database in which the data contained in it is complete and free of errors. – entity integrity – referential integrity – user integrity

Concerning at least one remote configuration.

A distributed transaction that has caused updates in at least one remote configu- ration is terminated in such a way that the updates are either executed on the databases in each participating DB configuration or on none at all. Interconfiguration consistency is assured by the two-phase commit protocol.

Situation where distributed transactions are mutually locked due to contending accesses.

In software: memory area used by several different programs for the transfer of data.

Each realm of the database, including DBDIR and DBCOM, has an internal version number which the utility routines (e.g. BREORG, BALTER) increment by one whenever a realm is updated. This internal version number is kept in the act-key-0 page of the realm itself and also in the PHYS VERSION RECORD in the DBDIR.

Smallest nameable unit of data within a record type. It is defined by item type and item length.

K

KDBS

Compatible database interface. Enables programs to be applied to applications of DB systems by different manufacturers.

Show 8 more labels / short text on this page
K Glossary · integrity · interconfiguration · interconfiguration consistency · interconfiguration deadlock · interface · internal version number · item
Page 281 of the Fujitsu UDS/SQL V2.5 user manual — L
Page 281 · click to enlarge
Page 281

Item used by the database programmer for direct access to records; an optimized access path is provided for the key by UDS/SQL in accordance with the schema definition.

Key consisting of several key items.

Item defined as a key in the schema.

Keys are numbered consecutively in ascending order, beginning at 1.

UDS/SQL component for linked-in DBH, responsible for control functions (corre- sponds to the subcontrol system of the independent DBH).

Module linked in to or dynamically loaded for the current DB application program and controlling access to a single database (mono-DB operation) or several databases simultaneously (multi-DB operation).

Table containing the member records of a set occurrence. Used for sequential and direct access to member records.

Parameters requested by the DBH at the beginning of the session. They define the basic characteristics of a session.

An application program is local with regard to a configuration if it was linked to the configuration using /SET-FILE-LINK LINK-NAME=DATABASE,FILE- NAME=conf-name

Show 10 more labels / short text on this page
Glossary L · key · key, compound · key item · key reference number · linked-in control system · linked-in DBH · list · load parameters (DBH) · local application program
Page 282 of the Fujitsu UDS/SQL V2.5 user manual — M
Page 282 · click to enlarge
Page 282

The configuration assigned to an application program before it is called using /SET-FILE-LINK LINK-NAME=DATABASE,FILE-NAME=conf-name. The application program communicates with the local configuration via the communication pool. The local configuration is in the same host as the appli- cation program.

Database in a local configuration.

A distribution table is considered local to a DBH if it is held in the DBH’s distribution pool.

Host computer containing the application program.

Transaction that only addresses the local configuration.

Recording of all updates in the database.

Assignment of two communication partners that enables them to exchange data. DCAM applications communicate via logical connections.

M

In the DBH the main reference is used to manage the resources required for processing a transaction’s requests, including those for transferring the requests from the application program to the DBH and back.

Number assigned to the transaction at READY. This number is unique only at a given time; at the end of the transaction, it is assigned to another transaction.

Task of the independent DBH in which the UDSQL module executes. Controls the start and end of a session and communicates with the database administrator directly or via the administrator task.

Show 11 more labels / short text on this page
M Glossary · local configuration · local database · local distribution table · local host · local transaction · logging · logical connection · main reference · mainref number · master task
Page 283 of the Fujitsu UDS/SQL V2.5 user manual — M
Page 283 · click to enlarge
Page 283

See member record or member record type.

Record is inserted at storage time.

Record cannot be removed.

Record is not inserted automatically at storage time.

Record can be removed.

Lower-ranking record in a set occurrence.

Lower-ranking record type in a set.

Type of configuration where only one database takes part in a session.

Mode of database operation where the DBH uses only one database of a configuration.

Type of configuration where several databases take part in a session.

Mode of database operation where the DBH uses several databases of a configuration.

Application program that addresses more than one database. The databases may be part of one or more mono-DB or multi-DB configurations.

SEARCH KEY table which contains a line for each record of the associated record type or each member record of the set occurrence, as appropriate. Each line comprises the key value of the record and the record pointer. It is also referred to as an indexed table.

Show 14 more labels / short text on this page
Glossary M · member · member, AUTOMATIC · member, MANDATORY · member, MANUAL · member, OPTIONAL · member record · member record type · mono-DB configuration · mono-DB operation · multi-DB configuration · multi-DB operation · multi-DB program · multi-level table
Page 284 of the Fujitsu UDS/SQL V2.5 user manual — OLTP
Page 284 · click to enlarge
Page 284

A mechanism that enables the DBH to fully exploit the CPU. Multithreading means that the DBH processes several jobs concurrently by using so-called threads. Each thread has information on the current status of a particular job stored in it. When a job needs to wait for the completion of an I/O operation, DBH uses the CPU to process some other job.

N

All computers linked via TRANSDATA.

O

OLTP

(Online Transaction Processing) In an OLTP application, a very large number of users access the same programs and data. This usually occurs under the control of a transaction monitor (TP monitor).

If AFIM logging is active, the database can be saved during a session. The ability to save a database online is determined with the BMEND utility routine.

Extension during ongoing database operation of the number of possible records of a record type. The DAL commands ACT DBTT-INCR, DEACT DBTT-INCR, DISPLAY DBTT-INCR and EXTEND DBTT can be used to administer the online extension of DBTTs. See also automatic DBTT extension.

Extension of user realms and DBDIR in ongoing database operation. For the purposes of administration of online extensibility of realms, you have the DAL commands ACT INCR, DEACT INCR, DISPLAY INCR and REACT INCR. See also automatic realm extension.

Transaction which has not been closed with FINISH or FINISH WITH CANCEL, or with COMMIT or ROLLBACK.

Show 7 more labels / short text on this page
N Glossary · multithreading · network · online backup · online DBTT extension · online realm extension · open transaction
Page 285 of the Fujitsu UDS/SQL V2.5 user manual — P
Page 285 · click to enlarge
Page 285

(universal transaction monitor) Facilitates the creation and operation of trans- action-oriented applications.

The term “original database” refers solely to the naming of the database files (dbname.dbfile), not to the status of the database content (see also shadow database).

Page in hash areas and duplicates tables for storing data that does not fit in the primary page. Their structure is the same as that of the pages of the hash area or duplicates table in question.

See owner record or owner record type.

Higher-ranking record in a set occurrence.

Higher-ranking record type in a set.

P

Physical subunit of a realm. UDS/SQL identifies pages by means of unique keys (act-key). The length of a page may be optionally 2048, 4000 or 8096 bytes. All pages within a database must have the same length. Pages with a length of 4000 or 8096 bytes are embedded in a page container.

In a page address, a distinction is made between the current address of a page, i.e. the act-key, and the probable address of a page, the PPP.

Show 11 more labels / short text on this page
Glossary P · openUTM · operator task (OT) · See master task · original database · overflow page · owner · owner record · owner record type · page · page address
Page 286 of the Fujitsu UDS/SQL V2.5 user manual — P
Page 286 · click to enlarge
Page 286

Pages with a length of 4000 or 8096 bytes are embedded in a so-called page container, which consists of a 64-byte header that precedes the page and a 32-byte trailer at the end of the page.

page header (page info)

The first 20 bytes of a database page (except for the FPA and DBTT pages with a length of 2048 bytes). They contain: – the act-key of the page itself, – the number of page index entries – the length and displacement of the bytes which are still vacant in this page. – the page type (ACT-Key-0 page, FPA page, DBTT page, DBTT anchor page, normal data page or CALC page)

Indicates the position of a record within a page.

In each realm the pages are numbered consecutively in ascending order starting starting from 0. The page number is part of the page address. Page number = PAM page number -1 for databases with a page length of 2048 bytes Page number = (PAM page number-1) / 2 for databases with a page length of 4000 bytes Page number = (PAM page number-1) / 4 for databases with a page length of 8096 bytes.

password for UDS/SQL files

Password serving to protect the files created by UDS/SQL (default: C’UDSË’). The DB administrator can define other passwords with PP CATPASS or MODIFY-FILE-ATTRIBUTES.

Symbolic representation of all possible item contents, used at item definition.

String defining a pattern.

Show 6 more labels / short text on this page
P Glossary · page container · page index entry · page number · pattern · pattern string
Page 287 of the Fujitsu UDS/SQL V2.5 user manual — PETA
Page 287 · click to enlarge
Page 287

PETA

Preliminary end of transaction: UDS-D or openUTM-D statement that causes a preliminary transaction end. The PETA statement belongs to the first phase of the two-phase commit protocol which terminates a distributed transaction. The PETA statement stores the following information failproof in the RLOG file of the local DBH: – each updated page – rollback and locking information – the names of all participating configurations. This information is required for any future warm start.

Table of pointers to the member records of a set occurrence. Used for sequential and direct access to member records.

prepared to commit (PTC)

Part of the two-phase commit protocol: State of a subtransaction after execution of a PETA statement and before receipt of the message that the complete transaction is to be terminated with FINISH or FINISH WITH CANCEL.

Distinguished from secondary keys for reasons of efficiency. Usually a unique identifier for a record.

The key of a record type which is defined by means of "LOCATION MODE IS CALC" or the key of an order-determining key of a set occurrence which is defined by means of "ORDER IS SORTED [ INDEXED]". Also used for direct access to a record or a set of records with the same key values or within a search interval.

In the broader sense (SQL), a record element uniquely identifying a record. In UDS-SQL, the database key of an owner record output as the "PRIMARY KEY" in the BPSQLSIA log (see also foreign key). A record element which uniquely identifies a record is flagged as "UNIQUE" in the BPSQLSIA log unless it is the aforementioned "PRIMARY KEY".

Show 5 more labels / short text on this page
Glossary P · pointer array · primary key · primary key (DDL) · primary key (SQL)
Page 288 of the Fujitsu UDS/SQL V2.5 user manual — PRIVACY-AND-IQF SUBSCHEMA
Page 288 · click to enlarge
Page 288

Subtransaction that runs in the local configuration. The primary subtransaction is opened by the first READY statement in a trans- action on a local database. If the first READY statement addresses a remote database, UDS-D generates a dummy subtransaction as the primary subtransaction.

PRIVACY-AND-IQF SCHEMA

UDS/SQL-internal schema for protection against unauthorized access.

PRIVACY-AND-IQF SUBSCHEMA

UDS/SQL-internal subschema for protection against unauthorized access.

See PPP.

Sequence of DML statements applied to a database within a transaction.

PPP (probable position pointer)

Probable address of a page, comprising realm number and page number. UDS/SQL does not always update PPPs when the storage location of data is changed.

See prepared to commit.

Siee UDS/SQL pubset declaration

pubset declaration job variable

Job variable in which a UDS/SQL pubset declaration is specified.

Manner in which tasks communicate with each other.

Show 7 more labels / short text on this page
P Glossary · primary subtransaction · probable position pointer · processing chain · PTC state · pubset declaration · P1 eventing
Page 289 of the Fujitsu UDS/SQL V2.5 user manual — READYC
Page 289 · click to enlarge
Page 289

R

READY

Start of a transaction or a processing chain in COBOL DML programs.

READYC

Start of a transaction or a processing chain in CALL DML programs.

Nameable physical subunit of the database. Equivalent to a file. Apart from the user realms for user data there are also the realms DBDIR and DBCOM, which are required by UDS/SQL.

Comprises all the database realms taking part in a session.

See database copy.

Realms are numbered consecutively in ascending order, starting with 1. The realm reference number (area reference) is part of the page address.

Regrouping of databases in a DB configuration after a session abort. A pre- requisite for reconfiguration is that the SLF has been deleted or that its contents have been marked as invalid.

Single occurrence of a record type; consists of one item content for each of the items defined for the record type and is the smallest unit of data managed by UDS/SQL via a unique identifier, the database key. The reserved word RECORD is used in DDL and SSL syntax to declare a record type.

Address of the page containing the record. See page address.

Show 8 more labels / short text on this page
Glossary R · realm · realm configuration · realm copy · realm reference number · reconfiguration · record · record address
Page 290 of the Fujitsu UDS/SQL V2.5 user manual — REC-REF
Page 290 · click to enlarge
Page 290

RECORD AREA

Area in the USER WORK AREA (UWA) which can be referenced by the user. The record area contains the record types and the implicitly defined items (IMPLICITLY-DEFINED-DATA-NAMES) of the database such as the AREA-ID items of the WITHIN clauses of the schema. The length of the record area is essentially defined by the record types contained in it.

Item, vector or group item.

Owner/member relationship between record types: the owner record type is the higher-ranking part of the relationship; the member record type is the lower-ranking part.

REC-REF

See record reference number.

Record types are numbered consecutively in ascending order, starting at 1. The record reference number is part of the database key.

record SEARCH KEY table

SEARCH KEY table for selection of a record from a record type.

record sequence number (RSQ)

The record sequence number can be assigned by the database programmer; if not, UDS/SQL numbers the records of a record type contiguously in ascending order, in the sequence in which they are stored; numbering starts at 1. The record sequence number is part of the database key.

Nameable grouping of record elements.

Record type that is neither the owner nor the member of a set (corresponds to record types of a conventional file).

Integrity of the relationships between tables (UDS/SQL record types).

Application program that is not local with regard to a particular configuration.

Show 8 more labels / short text on this page
R Glossary · record element · record hierarchy · record reference number · record type · record type, linear · referential integrity · remote application program
Page 291 of the Fujitsu UDS/SQL V2.5 user manual — R
Page 291 · click to enlarge
Page 291

DB-configurations that are not assigned to the application program via /SET-FILE- LINK LINK-NAME=DATABASE,FILE-NAME=conf-name but via the distribution table once the application program is running. The connection module of the appli- cation program communicates with the remote configurations via DCAM appli- cations. Remote configurations can be situated on local or remote hosts.

Database in a remote configuration.

Host computer that is not local.

Group item with repetition factor. The repetition factor, which must be greater than 1, specifies the number of duplicates of the group item to be incorporated in the repeating group.

The functions of the DAL commands ADD DB, ADD RN, DROP DB, DROP RN, NEW RLOG and CHECKPOINT are held in the DBH as "requests" and are not executed until the DAL command PERFORM is entered.

Resumption of an aborted BMEND run.

restart of a session

See session restart.

Modification of the Schema DDL or SSL for databases already containing data.

Internal code which the called program sends to the calling program; Return code ≠ 0 means an error has occurred.

Backup file used by the DBH during a session to store before-images (BFIMs) and after-images (AFIMs) of data which is updated. With the aid of the RLOG file, the DBH can cancel updates effected by incomplete transactions. There is one RLOG file per configuration. An RLOG file consists of two physical files.

Show 10 more labels / short text on this page
Glossary R · remote configuration · remote database · remote host · repeating group · request · restart of BMEND · restructuring · return code · RLOG file
Page 292 of the Fujitsu UDS/SQL V2.5 user manual — SEARCH KEY
Page 292 · click to enlarge
Page 292

Canceling of all updates effected within a transaction.

RSQ

See record sequence number.

RUNUNIT-ID

See transaction identification.

S

Formalized description of all data structures permitted in the database. A UDS/SQL schema is defined by means of the Schema DDL.

Formalized language for defining a schema.

Schema Information Area (SIA)

The SIA contains the complete database definition. The DBH loads the SIA into main memory at the start of DB processing.

SEARCH KEY

Secondary key; access paths using secondary keys are created by UDS/SQL by means of hash routines and multi-level tables.

Multi-level table used by UDS/SQL as an access path via a secondary key.

Any key which is not a primary key. Used for direct access to a record or a set of records with the same key values or within a search interval.

Subtransactions that address remote configurations.

Identifier in the name of the ALOG files (000000001 - 999999999). The first ALOG file of a database is always numbered 000000001.

Show 8 more labels / short text on this page
S Glossary · rollback · schema · Schema DDL · SEARCH KEY table · secondary key · secondary subtransactions · sequence number
Page 293 of the Fujitsu UDS/SQL V2.5 user manual — S
Page 293 · click to enlarge
Page 293

Accessing a record on the basis of its position within a predefined record sequence.

Task of the independent DBH in which the UDSSUB module executes; processes the requests of the DB application programs.

Period between starting and normal termination of the DBH (independent/ linked- in) in which it is possible to work with the databases of the configuration. Normally, a session consists of a sequence of session sections and session interrupts.

Occurs when the DBH is terminated abnormally after a successful session start. A session abort can be caused by: power failure, computer failure, BS2000 problems, DBH problems, %TERM.

Is the result of: – DAL when using independent DBH, – TERM in the DML application program when using linked-in DBH, – DBH error handling. During a session interrupt, the user can also effect session end by invalidating the SLF contents. Inconsistent databases can be made consistent again by a warm start, even without an SLF.

The period between a session abort and the related session restart.

Job variable in which UDS/SQL stores information about a session.

Session Log File (SLF)

File which is permanently assigned to a session and which is required by the DBH in the event of a session restart. It contains information on the current DB configuration, the number of current file identifiers and the current values of the DBH load parameters.

Show 8 more labels / short text on this page
Glossary S · sequential access · server task · session · session abort · session end · session interrupt · session job variable
Page 294 of the Fujitsu UDS/SQL V2.5 user manual — S
Page 294 · click to enlarge
Page 294

Starting of the DBH, under the same configuration name and configuration user ID, after a session abort. With the aid of the SLF, the DBH load parameters and the current file identifiers which existed when the session aborted are re-estab- lished, and the databases of the previous configuration are reconnected, if necessary by means of a warm start.

Period from the start of the DBH, either at the session start or a restart, to the normal session end or to a session abort.

Number which identifies a session section unambiguously.

State of a session in which the DBH is started under a configuration name for which there is no Session Log File (SLF) with valid contents.

Nameable relationship between two record types.

See dynamic set.

See implicit set.

See SYSTEM set.

See standard set.

Set Connection Data (SCD)

Linkage information for the records of a set occurrence.

Single instance of a set. Comprises exactly one owner record and any number of subordinate member records.

Sets are numbered contiguously in ascending order, beginning at 1.

Show 12 more labels / short text on this page
S Glossary · session restart · session section · session section number · session start · set · set, dynamic · set, implicit · set, singular · set, standard · set occurrence · set reference number
Page 295 of the Fujitsu UDS/SQL V2.5 user manual — SLF
Page 295 · click to enlarge
Page 295

set SEARCH KEY table

SEARCH KEY table for selecting a member record from a set occurrence.

See single feature pubset

Backup of all the files of a database, each saved under the name ”dbname.dbfile.copyname”. A shadow database can be created at any time and processed parallel to the original database in RETRIEVAL mode. In addition BMEND can be used to apply ALOG files that have already been closed to the database parallel to the UDS/SQL session.

Shared user buffer pool

Shared buffer of several databases which is used in addition to the System Buffer Pool, solely for buffering pages of the databases that have been assigned to it.

SIA

See Schema Information Area.

SIB

See SQL Interface Block.

A single feature pubset (SF pubset) consists of one or more homogeneous disks which must have the same major properties (disk format, allocation unit).

SLF

See session log file.

See system managed pubset

Show 5 more labels / short text on this page
Glossary S · SF pubset · shadow database · single feature pubset · SM pubset
Page 296 of the Fujitsu UDS/SQL V2.5 user manual — SQL DML
Page 296 · click to enlarge
Page 296

snap pair, snap pubset, snap session, snap unit

A snap unit is the copy of an (original) unit (logical disk in BS2000/OSD) at a particular time (“Point-in-Time copy”). The TimeFinder/Snap component creates this copy as a “snapshot” in accordance with the “Copy-On-First-Write strategy“: Only if data is modified is the original data concerned written beforehand into a central save pool of the Symmetrix system. The snap unit contains the references (track pointers) to the original data. In the case of unmodified data the references point to the unit, in the case of modified data to the save pool. After they have been activated, the unit and snap unit are split; applications can access both. The unit and snap unit together form a snap pair. TimeFinder/Snap manages this pair in what is known as a snap session. If snap units exist for all units of a pubset, these snap units together form the snap pubset. Details of this are provided in the manual "Introductory Guide to Systems Support".

Table pointing to the member records of a set occurrence.

Program written in a programming language and not yet translated into machine language.

Record exceeding the length of a page. Only UDS/SQL-internal records can be spanned records; User record types must not exceed – 2020 bytes for a page length of 2048 bytes – 3968 bytes for a page length of 4000 bytes – 8064 bytes for a page length of 8096 bytes.

SQL

SQL is a relational database language which has been standardized by ISO (International Organization for Standardization).

See conversation.

SQL DML

SQL Data Manipulation Language for querying and updating data.

Show 5 more labels / short text on this page
S Glossary · sort key table · source program · spanned record · SQL conversation
Page 297 of the Fujitsu UDS/SQL V2.5 user manual — SSL
Page 297 · click to enlarge
Page 297

SQL Interface Block (SIB)

Interface between UDS/SQL and SQL application program(s); contains the SQL statement, any existing parameters and the statement results.

Related sequence of SQL statements which is processed by UDS/SQL either as a whole or not at all. This method ensures that the database(s) is/are always in a consistent state.

SSIA

See Subschema Information Area.

SSIA-RECORD

UDS/SQL-internal record type, located in the DBDIR. Records belonging to this type are, for example, the Schema Information Area (SIA) and the Subschema Information Areas (SSIAs).

Module generated by the BCALLSI utility routine; makes available the subschema information required by CALL DML programs.

SSL

See Storage Structure Language.

A set other than a dynamic, implicit or SYSTEM set.

Number stored in the first part of the DATABASE-STATUS item. Its function is to indicate which DML statement resulted in an exception condition.

Number stored in the second part of the DATABASE-STATUS item. It indicates which exception condition has occurred.

Storage Structure Language (SSL)

Formalized language for describing the storage structure.

A series of consecutive alphanumeric characters.

Component for the independent DBH. Responsible for control functions.

Show 8 more labels / short text on this page
Glossary S · SQL transaction · SSITAB module · standard set · statement code · status code · string · subcontrol system
Page 298 of the Fujitsu UDS/SQL V2.5 user manual — SUB-SCHEMA SECTION
Page 298 · click to enlarge
Page 298

Section of a schema required for a particular application; it can be restructured, within limits, for the intended application; a subschema is defined by means of the Subschema DDL.

Formalized language for defining a subschema.

Subschema Information Area (SSIA)

The SSIA contains all subschema information required by the DBH to carry out, on behalf of the user, the database accesses permitted within the specified subschema. The DBH loads the SSIA into main memory when it is referenced in a READY command.

Module resulting from subschema compilation when a COBOL DML program is compiled. It must be linked in to the application program and includes the USER WORK AREA (UWA) as well as the RECORD AREA, which is also part of the base interface block (BIB). The name of the subschema module is the first 8 bytes of the subschema name.

Record defined in the Subschema DDL.

SUB-SCHEMA SECTION

In COBOL programs with DML statements: section of the DATA DIVISION used for specifying the schema name and the subschema name.

In a distributed transaction, all the processing chains that address the databases in one configuration form a subtransaction.

Realm required only by UDS/SQL. The system areas of a database include: – the Database Directory (DBDIR), – the Database Compiler Realm (DBCOM), – the COBOL Subschema Directory (COSSD)

Indicates whether the database is consistent or inconsistent.

Show 8 more labels / short text on this page
S Glossary · subschema · Subschema DDL · subschema module · subschema record · subtransaction · system area · system break information
Page 299 of the Fujitsu UDS/SQL V2.5 user manual — T
Page 299 · click to enlarge
Page 299

Input/output buffer for database pages (see page). The buffer is part of the common pool (independent DBH) or the DBH work area (linked-in DBH). Its size is determined by the DBH load parameters 2KB-BUFFER-SIZE, 4KB-BUFFER- SIZE or 8KB-BUFFER-SIZE.

A system managed pubset consists of one or more volume sets which, as with an SF pubset, comprise a collection of multiple homogeneous disks; here, too, homogeneity relates to particular physical properties such as disk format and allocation unit.

See anchor record.

Set whose owner record type is the symbolic record type SYSTEM.

T

See multi-level table.

A table in the context of SQL corresponds to a UDS/SQL record type.

Contains general information on a table or table page: – the table type and the level number of the table page, – the number of reserved and current entries in this table page, – the chaining reference to other table pages on the same level, – the pointer to the associated table page on the next higher level, – the pointer to the page containing the last table on the main level (for the highest-level table only).

Page containing a table or part of a table. If a table which does not extend over several pages or the highest level of a multi-level table is concerned, "table page" only refers to the object involved, not the entire page.

Show 9 more labels / short text on this page
Glossary T · system buffer pools · system managed pubset · SYSTEM record · SYSTEM set · table, multi-level · table (SQL) · table header · table page
Page 300 of the Fujitsu UDS/SQL V2.5 user manual — TCUA
Page 300 · click to enlarge
Page 300

TANGRAM

(Task and Group Affinity Management) Subsystem of BS2000/OSD that plans the allocation of processors for task groups which access large quantities of shared data in multi-task applications.

There are 4 task attributes in BS2000/OSD: SYS, TP, DIALOG and BATCH. Special runtime parameters that are significant for task scheduling are assigned to each of these task attributes. In contrast to the other task attributes, the TP attribute is characterized by optimized main memory management that is specially tailored to transaction processing requirements.

Communication between the DBH modules. See also common pool.

See deadlock.

In BS2000/OSD, it is possible to define a priority for a task. This priority is taken into account when initiating and activating the task. Priorities may be fixed or variable. Variable priorities are adapted dynamically; fixed priorities do not change. Note that UDS/SQL server tasks should be started with a fixed priority in order to ensure consistent performance.

TCUA

See Transaction Currency Area.

Message sent by the UDS-D task to the remote application program to indicate that there is still a DML statement being processed.

Related sequence of DML statements which is processed by UDS/SQL either as a whole or not at all. This method ensures that the database(s) is/are always in a consistent state. For UDS-D: The total set of subtransactions active at a given time.

Terminating a transaction with FINISH, i.e. all updates performed within the transaction are committed to the database.

Show 8 more labels / short text on this page
T Glossary · task attribute TP · task communication · task deadlock · task priority · time acknowledgment · transaction (TA) · transaction, committing a
Page 301 of the Fujitsu UDS/SQL V2.5 user manual — UDSSUB
Page 301 · click to enlarge
Page 301

transaction, rolling back a

Terminating a transaction with FINISH WITH CANCEL, i.e. all updates performed on the database within the transaction are rolled back.

Transaction Currency Area (TCUA)

Contains currency information.

Assigned by the DBH to identify a particular transaction. Can be requested with the DAL command DISPLAY.

UDS-D-specific storage area in which the UDSCT receives the BIBs from remote application programs.

Procedure by which a distributed transaction that has made changes in at least one remote configuration is terminated in such a way as to safeguard inter-config- uration consistency or UDS/SQL openUTM-D consistency. The two-phase commit is controlled – by the distribution component in the user task if the transaction is distributed via UDS-D. – by openUTM-D if the transaction is distributed via openUTM-D or via openUTM-D and UDS-D.

U

UDSADM

Module of the independent DBH; executes in the administrator task.

UDSHASH

Module generated by the BGSIA utility routine. It contains the names of all the hash routines defined in the Schema DDL.

UDSNET

Distribution component in the user task.

UDSSQL

Start module of the independent DBH; executes in the master task.

UDSSUB

Start module of the independent DBH; executes in the server task.

Show 4 more labels / short text on this page
Glossary U · transaction identification (TA-ID) · transfer pool · two-phase commit protocol
Page 302 of the Fujitsu UDS/SQL V2.5 user manual — UWA
Page 302 · click to enlarge
Page 302

Task started for each configuration by UDS/SQL so that it can participate in distributed processing with UDS-D.

UDS/SQL / openUTM-D consistency

A transaction that has updated both openUTM data and UDS/SQL databases is terminated in such a way that the openUTM data and the UDS/SQL databases are either updated together or not at all.

Declaration in a pubset declaration job variable for restricting the UDS/SQL pubset environment. This reduces or prevents the risk of file names being ambiguous.

unique throughout the network

Unique in all the computers that are included in the network.

The realms and files of the database required by the user in order to be able to store data in, and to retrieve data from a database are: – the Database Directory (DBDIR), – the user realms – the module library for hash routines (HASHLIB).

A realm defined in the realm entry of the Schema DDL. It contains, among other things, the user records.

Execution of an application program or openUTM program, including the parts linked by the system.

USER-WORK-AREA (UWA)

Transfer area for communication between the application program and the DBH.

UTM

See openUTM.

UWA

See USER-WORK-AREA (UWA).

Show 6 more labels / short text on this page
U Glossary · UDS-D task UDSCT · UDS/SQL pubset declaration · user database · user realm · user task
Page 303 of the Fujitsu UDS/SQL V2.5 user manual — W
Page 303 · click to enlarge
Page 303

Item with repetition factor. The repetition factor must be greater than 1. It specifies how many duplicates of the item are combined in the vector.

See internal version number.

W

A warm start is performed by UDS/SQL if an inconsistent database is attached to a session. For UDS/SQL this involves applying all updates of completed trans- actions to the database which have not yet been applied, rolling back all database transactions that are open, and making the database consistent. The related RLOG file and the DB status file are required for a warm start.

Show 4 more labels / short text on this page
Glossary V · vector · version number, internal · warm start
Page 304 of the Fujitsu UDS/SQL V2.5 user manual — V
Page 304 · click to enlarge
Page 304

W Glossary

Page 305 of the Fujitsu UDS/SQL V2.5 user manual — Abbreviations
Page 305 · click to enlarge
Page 305

Abbreviations

ACS Alias Catalog Service

BIB Base interface block

COBOL Common Business Oriented Language

CODASYL Conference on Data System Languages

CRA Current of Area

CRR Current of Record

CRS Current of Set

CRU Current of Rununit

COSSD COBOL Subschema Directory

DAL Database Administration Language

DBCOM DataBase COmpiler Realm

DBTT DataBase key Translation Table

DDL Data Description Language

DML Data Manipulation Language

DRV Dual Recording by Volume

DSA Database System Access

DSSM Dynamic Subsystem Management

Show 10 more labels / short text on this page
Act-Key Actual Key · AFIM After-Image · AP Application Program · ASC Ascending · BFIM Before-Image · DB DataBase · DBDIR DataBase DIRectory · DBH DataBase Handler · DB-Key DataBase KEY · DESC Descending
Page 306 of the Fujitsu UDS/SQL V2.5 user manual — Abbreviations
Page 306 · click to enlarge
Page 306

FPA Free Place Administration

HSMS Hierarchic Storage Management System

IQL Interactive Query Language

IQS Interactive Query System

KDBS Kompatible Datenbank-Schnittstelle (= compatible database interface)

KDCS Kompatible Datenkommunikationsschnittstelle (= compatible data communications interface)

LMS Library Maintenance System

MPVS Multiple Public Volume Set

OLTP Online transaction processing

openUTM Universal Transaction Monitor

PETA Preliminary End of Transaction

PPP Probable Position Pointer

PTC Prepared to Commit

PTT Primäre Teiltransaktion (= primary subtransaction)

PVS Public Volume Set

REC-REF Record Reference Number

RSQ Record Sequence Number

SCD Set Connection Data

SCI Software Configuration Inventory

SECOLTP SECure OnLine Transaction Processing

SECOS SEcurity COntrol System

SIA Schema Information Area

SIB SQL Interface Block

Show 10 more labels / short text on this page
Abbreviations · FC Function Code · GS Global Store · ID Identification · LM Lock Manager · MR-NR Mainref Number · MT Master task · OT Operator task · SC Subcontrol · SET-REF SET-REFerence
Page 307 of the Fujitsu UDS/SQL V2.5 user manual — Abbreviations
Page 307 · click to enlarge
Page 307

SLF Session Log File

SQL Structured Query Language

SSD Solid State Disk

SSIA SubSchema Information Area

SSITAB SubSchema Information TABle

SSL Storage Structure Language

STT Sekundäre Teiltransaktion (= secondary subtransaction)

TANGRAM TAsk aNd GRoup Affinity Management

TCUA Transaction CUrrency Area

UDS/SQL Universal Database System/Structured Query Language

UWA User Work Area

Show 4 more labels / short text on this page
Abbreviations · ST Server Task · TA TransAction · TA-ID TransAction IDentification
Page 308 of the Fujitsu UDS/SQL V2.5 user manual — Abbreviations
Page 308 · click to enlarge
Page 308

Abbreviations

Page 309 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 309 · click to enlarge
Page 309

Related publications

The manuals are available as online manuals, see http://manuals.fujitsu-siemens.com, or in printed form which must be paid for and ordered separately at http://FSC-manualshop.com.

UDS/SQL (BS2000/OSD) Application Programming User Guide

UDS/SQL (BS2000/OSD) Creation and Restructuring User Guide

UDS/SQL (BS2000/OSD) Database Operation User Guide

UDS/SQL (BS2000/OSD) Design and Definition User Guide

UDS/SQL (BS2000/OSD) Messages User Guide

UDS/SQL (BS2000/OSD) Recovery, Information and Reorganization User Guide

UDS/SQL (BS2000/OSD) Ready Reference

UDS (BS2000) Interactive Query System IQS User’s Guide

Page 310 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 310 · click to enlarge
Page 310

UDS-KDBS (BS2000/OSD) Compatible Database Interface User Guide

SQL for UDS/SQL Language Reference Manual

BS2000/OSD-BC Commands, Volumes 1 - 5 User Guide

BS2000/OSD-BC Commands, Volume 6, Output in S Variables and SDF-P-BASYS User Guide

BS2000/OSD-BC System Messages, Volumes 1 - 3 User Guide

BS2000/OSD-BC Introductory Guide to Systems Support User Guide

BS2000/OSD-BC Executive Macros User Guide

BS2000/OSD-BC Introductory Guide to DMS User Guide

SDF (BS2000/OSD) Introductory Guide to the SDF Dialog Interface User Guide

SORT (BS2000/OSD) User Guide

SPACEOPT (BS2000/OSD) Disk Optimization and Reorganization User Guide

Related publications

Page 311 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 311 · click to enlarge
Page 311

LMS (BS2000) SDF Format User Guide

DSSM/SSCM Subsystem Management in BS2000/OSD User Guide

ARCHIVE (BS2000/OSD) User Guide

DRV (BS2000/OSD) Dual Recording by Volume User Guide

HSMS / HSMS-SV (BS2000/OSD) Hierarchical Storage Management System Volume 1: Functions, Management and Installation User Guide

SECOS (BS2000/OSD) Security Control System User Guide

openNet Server (BS2000/OSD) BCAM Reference Manual

DCAM (BS2000/OSD, TRANSDATA) Program Interfaces Reference Manual

DCAM (BS2000/OSD, TRANSDATA) Macros User Guide

TransView-NMA/-NMAE, TransView-NTAC2, NTAC2E (TRANSDATA, BS2000) Network Management in BS2000 User Guide

OMNIS/OMNIS-MENU (TRANSDATA, BS2000/OSD) Functions and Commands User Guide

Related publications

Page 312 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 312 · click to enlarge
Page 312

OMNIS/OMNIS-MENU (TRANSDATA, BS2000) Administration and Programming User Guide

openUTM Concepts and Functions User Guide

openUTM (BS2000/OSD, UNIX, Windows) Programming Applications with KDCS for COBOL, C and C++ User Guide

openUTM (BS2000/OSD, UNIX, Windows) Generating Applications User Guide

openUTM (BS2000/OSD, UNIX, Windows) Administering Applications User Guide

openUTM (BS2000/OSD) Messages, Debugging and Diagnostics User Guide

COBOL2000 (BS2000/OSD) COBOL Compiler Reference Manual

COBOL2000 (BS2000/OSD) COBOL Compiler User’s Guide

COBOL85 (BS2000) COBOL Compiler Reference Manual

COBOL85 (BS2000) COBOL Compiler User’s Guide

CRTE (BS2000/OSD) Common Runtime Environment User Guide

Related publications

Page 313 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 313 · click to enlarge
Page 313

DRIVE/WINDOWS (BS2000) Programming System User Guide

DRIVE/WINDOWS (BS2000) Programming Language Reference Guide

DRIVE/WINDOWS (BS2000) System Directory of DRIVE Statements Reference Manual

DRIVE/WINDOWS (BS2000/SINIX) Directory of DRIVE SQL Statements for UDS Reference Manual

DAB (BS2000/OSD) Disk Access Buffer User Guide

Unicode in BS2000/OSD Introduction

XHCS (BS2000/OSD) 8-Bit Code and Unicode Processing in BS2000/OSD Benutzerhandbuch

BS2000/OSD Softbooks English CD-ROM

Related publications

Page 314 of the Fujitsu UDS/SQL V2.5 user manual — Related publications
Page 314 · click to enlarge
Page 314

Related publications

Page 316 of the Fujitsu UDS/SQL V2.5 user manual — D
Page 316 · click to enlarge
Page 316

CALC SEARCH key 266 CALC table 210, 267 CALC table header 210 calculation formulas, storage space

configuration name 269 connection data 222 connection module 269 consistency 42, 46, 47, 269 logical 270 physical 270 storage 270 consistency error 270 consistency point 270 consistency record 270 container

requirement 177 CALL DML 47, 267 catalog identifier 267 CC 39 CHAIN 130, 136, 144, 156, 223 chain 130, 144, 151, 155, 267 Character Separated Values (CSV) 267 check records 267 checkpoint 267 CHECK-TABLE 267 clone 268 COBOL DML 30, 47, 268 COBOL runtime system 268 COBOL Subschema Directory (COSSD) 268 CODASYL 53 CODASYL model 28, 35, 36 Codd 31 coexistence 36 column 32 column conventions 235 comment 234 common memory 268 common pool 268 communication partners 268 communication pool 268 compatible database interface 268, 280 compiler database 269 COMPILER-SCHEMA 269 COMPILER-SUBSCHEMA 269 compound key 87, 92, 269 compression 176, 269 COMPRESSION clause 176, 251 computer 48, 49 computer network 48 conceptional schema 44 condition 192, 261 condition name clause 192, 260 condition variable 192 configuration 46, 47, 48, 49, 269 configuration identification 269

see page container contending access 270 continuation lines 235 conversation 270 copy 270 COPY clause 185, 193, 259 Copying a database key item 188 copying a numeric item, an alphanumeric item of

fixed length or a national item 186 COSSD 270 CRA 270 CRR 271 CRS 98, 103 CSV 271 currency table 271 CURRENT

OF AREA table 271 OF RECORD table 271 OF SET table 271 Current

Record of Rununit 271 Record of Set (CRS) 271 cyclic data structure 82

D data analysis 44 data backup 271 data deadlock 271 Data Definition Language 50 Data Description Language 30, 50 data independence 32, 41 data manipulation 33 Data Manipulation Language 30

Index

Page 317 of the Fujitsu UDS/SQL V2.5 user manual — D
Page 317 · click to enlarge
Page 317

Data Manipulation Language (DML) 276 data modeling 43 data models 28 data organization 38 data page 197, 215 data privacy 54 data protection 42, 54, 183, 184 data protection (privacy) 272 data relationship 29, 30, 33, 50 data retrieval 33 data security 54, 108 data structure

DB status file 273 DBCOM 273 DBDIR 274 DBH 46, 47, 274 end 274 independent 274 linked-in 274 start 274 DBH load parameters 274 DBTT 86, 130, 131, 143, 274 column 133 line 133, 136 page 275 placement 160, 168 size 143 storage space requirement 136 DBTT anchor page 197, 205, 274 DBTT base 274 DBTT clause 143 DBTT extension

logical 130 physical 130 database (DB) 272 database administrator 272 Database Administrator Language (DAL) 271 database compiler realm (DBCOM) 272 database configuration 46, 47, 48, 49 database copy 272 database copy update 272 database description

automatic 265 online 284 DBTT extent 275 DBTT page 197, 207 DCAM 275 DCAM application 275 DDL 30, 50, 275 deadlock 42, 47, 275 decimal point symbol 56, 57 descending key (DESC key) 275 DESCENDING-KEY clause 98, 100, 245 Description 50 design 43 digit symbol 56, 60 direct access 62, 84, 100, 105, 153, 238, 245, 275 direct CALC page 210 direct hash area 275 distributed database 275 distributed transaction 276 distribution 45 distribution pool 276 distribution table 276 DML 30

relational 36 database directory (DBDIR) 272 database handler, see DBH database job variable 272 database key 68, 86, 99, 105, 132, 151, 242, 272 item 273 database key item 239 database key translation table 85, 130 database key translation table (DBTT) 249 placement 160, 168, 249 database key value 64, 86, 207, 210, 215 database page 273 database system 273 DATABASE-KEY item 64, 85, 86, 188, 239, 242, 273 DATABASE-KEY-LONG item 64, 86, 188, 239, 242, 273 DATABASE-KEY-TRANSLATION-TABLE

clause 136, 139, 250 DATABASE-STATUS 273 DB configuration 273 DB key 274

Index

Page 318 of the Fujitsu UDS/SQL V2.5 user manual — E
Page 318 · click to enlarge
Page 318

domain 32 DRIVE 40 DRV 42 dummy subtransaction 276 duplicate table 157 DUPLICATES clause 87 duplicates header 276 duplicates table 229, 277 main level 277 DYNAMIC clause 106, 244 dynamic set 106, 277

host computer 49 host network 47

I IDENTIFICATION DIVISION 259 identifier 279 implicit set 279 inconsistency 279 independent DBH 279 INDEX clause 160, 166, 251, 257 index level 279 index page 279 INDEX search key 279 indirect hash area 279 information analysis 43 integrity 280 referential 30, 33, 35, 38, 50 interconfiguration 280 consistency 280 deadlock 280 interface 280 internal version number 280 IQL 106 ISO 34 item 53, 280 alphanumeric 60, 186, 241, 242 binary 59, 61, 187, 242 fixed length 241 fixed-length 241 national 63, 187, 241 numeric 56, 186, 241 packed 58, 187, 242 unpacked 56, 187, 241 variable length 61, 149, 176, 241 variable-length 220, 241 item contents 55, 84 item name 53 item type 53, 187

E ESTIMATE-REPORT 277 event name 277 exclusive buffer pool 277

F FASTPAM access method 42 flexibility 35 foreign key 32, 33, 36, 50, 277 FPA 277 FPA base 202, 278 FPA extent 202, 278 FPA page 197, 202, 278 free place administration 197, 202, 212, 215, 225, 278 function analysis 43 function code 278

G group item 53, 66, 191, 261, 278

H hash area 87, 149, 168, 252, 278 name 92 naming 107, 240, 246 placement 129, 160, 168, 172, 252 position 107 size 136, 142, 249 hash routine 87, 89, 92, 100, 105, 137, 142, 278 hashing 278 HASHLIB 279 host 47, 48

K KDBS 268, 280 key 87, 92, 98, 145, 156, 281 compound 281 key item 85, 281

Index

Page 319 of the Fujitsu UDS/SQL V2.5 user manual — L
Page 319 · click to enlarge
Page 319

key reference number 281 keyword 22

member record 79, 94, 110, 129, 140, 144, 159, 160, 163, 165, 257, 283 member record type 70, 165, 244, 245, 283 microcosm 43 mirrored disks 42 MODE clause 145, 160, 166, 255 MODE-Klausel 136 mono-DB configuration 283 mono-DB operation 283 multi-DB configuration 283 multi-DB operation 46, 47, 283 multi-DB program 283 multi-level table 283 multithreading 284

L level 189 linkage of records 129, 144 linked-in control system 281 linked-in DBH 281 linking of records 256 LIST 136, 223 list 130, 136, 144, 148, 153, 154, 172, 225, 254, 256, 281 placement 160, 172 storage requirements 143 storage space requirement 140, 177 literal 234 load parameters DBH 281 local application program 281 local configuration 282 local database 282 local distribution table 282 local host 282 local transaction 282 LOCATION MODE clause 85, 86, 87, 239 logging 282 logical connection 282 logical structure 44

N N, PICTURE symbol 63, 187, 241 NATIONAL 63, 187, 241 natural optimization 163 network 47, 48, 284 network model 28, 35, 36 network structures 40 normalized 44 notational conventions 22

O occupancy level, table pages 172 OCCURS clause 65, 189, 241, 242 OLTP 40, 284 online backup 284 online DBTT extension 284 online realm extension 284 open transaction 284 openUTM 285 operator task (OT) 285 OPTIONAL 79 optional word 22 ORDER clause 94, 107, 145, 148, 153, 245 original database 285 overflow page

M main reference 282 mainref number 282 MANDATORY 79, 83, 149 manipulation 33 MANUAL 79 many-to-many relationship 83 mask 56 mask string 56, 60, 63 master task 282 member 29, 36, 283 AUTOMATIC 283 MANDATORY 283 MANUAL 283 OPTIONAL 283 MEMBER clause 79, 245

of CALC page 138, 142 of duplicate table 157 of duplicates table 231 overflow pages 285

Index

Page 320 of the Fujitsu UDS/SQL V2.5 user manual — P
Page 320 · click to enlarge
Page 320

owner 29, 36, 285 OWNER clause 105, 245 owner record 70, 103, 110, 140, 147, 150, 159, 161, 163, 165, 251, 285 owner record type 70, 244, 285

pointer array 130, 136, 144, 153, 172, 225, 254, 256, 287 placement 160, 172 storage requirements 143 storage space requirement 140, 177 POINTER-ARRAY 130, 136, 144, 145, 153, 223 population, declare 129, 136 PPP 131, 159 PPP (Probable Position Pointer) 145, 154, 155 PPP (probable position pointer) 288 prepared to commit (PTC) 287 primary key 32, 33, 36, 50, 87, 94, 98, 136, 143, 145, 156, 168, 172, 238, 244, 249, 287 primary key (DDL) 239, 287 primary key (SQL) 287 primary subtransaction 288 PRIVACY KEY clause 184 PRIVACY LOCK clause 111, 184 PRIVACY-AND-IQF SCHEMA 288 PRIVACY-AND-IQF SUBSCHEMA 288 probable position pointer (PPP) 288 processing chain 288 program interface 38 PTC state 288 pubset declaration 288 pubset declaration job variable 288

P P1 eventing 288 page 131, 197, 198, 285 overflow 138 structure 200 page address 131, 285 page container 197, 199, 286 page feed 235 page format 61, 68, 108, 149, 240 page header page header (page info) 286 page index entry 210, 215, 286 page length 61, 68, 108, 133, 149, 197, 202, 207, 210, 213, 215, 225, 230, 239, 240 page number 131, 286 relative 87, 92, 106 parts list 114, 159 parts list processing 40 password 111, 184, 237, 259 password for UDS/SQL files 286 pattern 286 pattern string 286 performance 35 PETA 287 physical

R RC 38 READY 289 READYC 289 realm 54, 108, 109, 131, 138, 161, 168, 183, 194, 259, 289 size 250 structure 197 temporary 106, 110, 161 realm configuration 289 realm copy 108, 289 realm entry

page address 131 PHYSICALLY LINKED clause 159, 257 PICTURE clause 56, 60, 63, 186, 189, 241 placement

data at realm level 161 data within realm 163 define 160 PLACEMENT OPTIMIZATION 143, 149, 163, 165 PLACEMENT OPTIMIZATION clause 251 pointer 92, 106, 131, 145, 150, 156, 219, 254, 257

DDL 237 realm extension

automatic 265 online 284

Index

Page 321 of the Fujitsu UDS/SQL V2.5 user manual — S
Page 321 · click to enlarge
Page 321

realm reference 131 realm reference number 289 REALM-REF (Realm Reference) 131 reconfiguration 289 record 32, 68, 110, 130, 136, 143, 149, 256, 289 structure 219 record address 92, 132, 138, 142, 289 RECORD AREA 290 record element 28, 32, 33, 53, 66, 185, 238, 240, 261, 290 record entry

remote application program 290 remote configuration 291 remote database 291 remote host 291 reorganization, dynamic 107, 129, 172, 249, 252, 255 repeating group 53, 66, 183, 190, 242, 291 repetition factor 53, 242 repetition symbol 56, 57, 60, 63 request 291 restart

DDL 238 SSL 249 subschema DDL 258 record hierarchy 290 record length item 62 RECORD NAME clause 110, 239, 249 record name clause 185 record POPULATION clause 136 record reference number 85, 132, 290 record SEARCH KEY table 290 record SEARCH key table 93, 130, 136, 143, 224, 249, 252 placement 160, 168, 172 record sequence 84, 94, 105, 148, 151, 154, 238, 244 record sequence number 85, 132, 133, 290 record sequence number (RSQ) 210, 213 record type 28, 53, 68, 130, 136, 183, 185, 238, 249, 261, 290 linear 290 record type reference 132 record-element-name clause 240 record-POPULATION clause 250 REC-REF 290 redundancy 107, 157 redundancy-free data storage 41 referential integrity 30, 33, 35, 38, 50, 290 relation 32 relational database description 36 relational model 31, 35, 36 relational schema 51 relational view 36, 51 relationship 29, 30, 33, 50

of a session 291 of BMEND 291 restructuring 291 result table 32 retrieval 33 return code 291 RLOG file 291 rollback 292 RR 39 RSQ 133, 145, 158, 210, 213, 292 RUNUNIT-ID 292

S SCD 219, 222 schema 292 conceptional 44 naming 237 relational 51 schema DDL 30, 50, 53, 138, 145, 149, 292 structure 236 schema entry

DDL 236 SSL 248 Schema Information Area (SIA) 292 SCHEMA NAME clause 111 SEARCH KEY 292 SEARCH key 92, 100, 102, 105, 143, 172, 240, 246, 249 naming 107 SEARCH KEY clause 92, 102, 105, 107, 240, 245 SEARCH KEY table 292

Index

Page 322 of the Fujitsu UDS/SQL V2.5 user manual — S
Page 322 · click to enlarge
Page 322

SEARCH key table 93, 102, 130, 136, 140, 154, 157, 172, 177, 225, 254, 257 form 157 naming 240, 246 placement 160, 167, 172 storage space requirement 177 secondary key 92, 100, 102, 107, 136, 139, 142, 161, 168, 172, 238, 240, 244, 246, 292 secondary subtransaction 292 security 42 security concept 42 selection method for set occurrences 103 selection option for set occurrences 244, 247 semicolon 234 sequence number 292 sequence of records 71 sequential access 293 server task 293 session 293 abort 293 end 293 interrupt 293 start 294 session job variable 293 Session Log File (SLF) 293 session restart 294 session section 294 session section number 294 set 53, 70, 105, 183, 193, 244, 254, 261, 294 dynamic 106, 110, 161, 244, 294 implicit 294 singular 294 standard 294 set connection data 219, 222 Set Connection Data (SCD) 294 set entry

SET OCCURRENCE SELECTION clause 103, 247 set operations 33 set POPULATION clause 139, 140, 255 set reference number 294 set relationship 29, 30, 33 set SEARCH KEY table 295 set SEARCH key table 102, 130, 136, 143, 172, 225, 254 placement 160, 167, 172 storage space requirement 140 SF pubset 295 shadow database 295 Shared User buffer pool 295 SIA 131, 295 SIB 295 sign symbol 56 single feature pubset 295 SLF 295 SM pubset 295 snap 296 sort key table 130, 136, 143, 151, 172, 225, 254, 256, 296 naming 107 placement 160, 167, 172 storage space requirement 140, 177 source program 296 spanned record 296 SQL 34, 36, 296 SQL access 57, 58, 62, 85, 97, 110, 176, 193, 194 SQL conversation 296 SQL DML 296 SQL Interface Block (SIB) 297 SQL transaction 297 SSIA 297 SSIA-RECORD 297 SSITAB module 297 SSL 51, 98, 107, 110, 129, 248, 297 structure 248 standard set 297 standardization 34 statement code 297 status code 297

DDL 243 SSL 254 set membership 79, 106, 149, 244, 245 SET NAME clause 70, 244, 255 set occurrence 70, 95, 130, 144, 148, 151, 160, 163, 254, 294 representation 71 size 140, 154

Index

Page 323 of the Fujitsu UDS/SQL V2.5 user manual — T
Page 323 · click to enlarge
Page 323

storage mode 99, 144 storage space reservation 143 storage structure 129 Storage Structure Language (SSL) 51, 297 string 297 structure, logical 44 subcontrol system 297 subschema 51, 183, 258, 298 naming 184, 259 Subschema DDL 298 subschema DDL 30, 51, 111, 183, 258 structure 258 Subschema Information Area (SSIA) 298 subschema module 298 SUB-SCHEMA NAME clause 184 subschema record 298 SUB-SCHEMA SECTION 298 subtransaction 298 suffixes data types 16 syntax rules 234 system area 298 system break information 298 system buffer pools 299 system managed pubset 299 SYSTEM record 299 SYSTEM set 100, 105, 106, 140, 221, 299

TEMPORARY clause 109, 237 temporary realm 110 time acknowledgment 300 time conversion, uninterrupted 42 transaction 300 committing a 300 roll back 301 Transaction Currency Area 301 transaction identification (TA-ID) 301 transfer pool 301 tuple 32 two-phase commit protocol 301 TYPE clause 58, 157, 241, 242

U UDS 301 UDS/SQL 302 UDS/SQL / openUTM-D consistency 302 UDS/SQL pubset declaration 302 UDSADM 301 UDS-D 47 UDS-D task UDSCT 302 UDSHASH 301 UDSNET 301 UDSSUB 301 uninterrupted time conversion 42 unique throughout the network 302 unit of data 53 uppercase letters 235 USAGE clause 188 user database 302 user realm 302 user task 302 user view 38 USER-WORK-AREA (UWA) 302 UTF-16 63, 187, 241 utility 109 utility routine 111, 137, 142 UWA 302

T table 32, 33, 160 multi-level 299 table (SQL) 299 table extension 140, 172 table header 224, 299 table level 146, 157 table line 141 table pages 299 table structure 224 TANGRAM 300 task attribute TP 300 task communication 300 task deadlock 300 task priority 300 TCUA 300

V value 32 VALUE clause 192

Index

Page 324 of the Fujitsu UDS/SQL V2.5 user manual — W
Page 324 · click to enlarge
Page 324

value range 32 of condition 192 of item 55 variable 22 vector 53, 65, 183, 189, 242, 303 version number

view 32 relational 51

W warm start 303 WITHIN clause 109, 161, 168, 240

Index · internal 303

Sources

References & links

Pages referenced in this manual — manufacturer, support and downloads.

Ask about the Fujitsu UDS/SQL V2.5

Owners and our team usually reply within a day — and your question helps the next person too.

Add your email to get notified when it’s answered — no spam, ever.

0 questions
No questions yet about the Fujitsu UDS/SQL V2.5

Be the first to ask — other owners or our team will answer.

Original document

Fujitsu UDS/SQL V2.5 manual PDF

324 pages·1.8 MB·Network Router·PDF
Click any page above to open it here
Page 1 / …
100%
Loading pages…