TurboIMAGE/XL Database Management System Reference Manual (30391-90012)
Table Of Contents
- 1 Introduction
- 2 Database Structure and Protection
- 3 Defining a Database
- 4 Using the Database
- 5 TurboIMAGE/XL Library Procedures
- Using TurboIMAGE/XL Intrinsics
- DBBEGIN
- DBCLOSE
- DBCONTROL
- DBDELETE
- DBEND
- DBERROR
- DBEXPLAIN
- DBFIND
- DBGET
- DBINFO
- INTRINSIC NUMBER 402
- Syntax
- Parameters
- Discussion
- Mode 101: Item Number
- Mode 102: Item Name
- Mode 103: Items in Database
- Mode 104: Items in Data Set
- Mode 113: BTREEMODE1 and Wildcard Character
- Mode 201: Set Number
- Mode 202: Set Name
- Mode 203: Sets in Database
- Mode 204: Sets with Item
- Mode 205: Set Capacity
- Mode 206: Number of Data Set Chunks
- Mode 207: Size of Data Set Chunks
- Mode 208: Primary and Actual Capacity
- Mode 209: B-Tree Attachment
- Mode 301: Paths
- Mode 302: Key or Search Item
- Mode 401: Logging
- Mode 402: ILR
- Mode 403: Dynamic Roll-Back
- Mode 404: Logging Subsystem Information
- Mode 406: Database Information
- Mode 501: Subsystem Access
- Mode 502: Critical Item Update
- Modes 8nn: Third-Party Indexing
- Mode 901: Language
- DBLOCK
- DBMEMO
- DBOPEN
- DBPUT
- DBUNLOCK
- DBUPDATE
- DBXBEGIN
- DBXEND
- DBXUNDO
- 6 Host Language Access
- Model Program
- ORDERS Database Model Program
- Main Body of Program
- Opening the Database
- Retrieving All the Records on a Chain (with Item Level Locking)
- Retrieving a Data Entry Using a Record Number
- Retrieving Master Data Using a Key Value
- Retrieving Data Serially (with Set Level Locking)
- Adding an Entry
- Updating an Entry
- Deleting an Entry
- Rewinding a Data Set
- Obtaining Database Information
- Obtaining Error Messages and Explanations
- Closing the Database
- C
- COBOL II
- Defining Data Types, Variables, and Intrinsics
- Main Body of Program
- Opening the Database
- Retrieving All the Records on a Chain (with Item Level Locking)
- Retrieving a Data Entry Using a Record Number
- Retrieving Master Data Using a Key Value
- Retrieving Data Serially (with Set Level Locking)
- Adding an Entry
- Updating an Entry
- Deleting an Entry
- Rewinding a Data Set
- Obtaining Database Information
- Obtaining Error Messages and Explanations
- Closing the Database
- FORTRAN 77
- Pascal
- RPG
- 7 Logging and Recovery
- Database Utilities Used in Logging and Recovery
- Recovery Options
- Logical Transactions
- Dynamic Roll-Back Recovery
- Intrinsic Level Recovery
- Logging Preparation
- Step 1--Checking MPE/iX Logging Configuration
- Step 2--Acquiring Logging Capability
- Step 3--Logging to Tape or Disk
- Step 4--Building a Log File for Logging to Disk
- Step 5--Creating the Log Identifier
- Step 6--Setting the Log Identifier
- Step 7--Setting Flags for the Database Backup Copy
- Step 8--Making a Database Backup Copy
- TurboSTORE/iX 7x24 True-Online Backup
- Logging Status
- Logging Maintenance
- Roll-Forward Recovery
- Roll-Back Recovery
- DBRECOV Commands Used with Roll-Forward and Roll-Back Recovery
- Recovery Tables
- Post-Recovery Options
- The Mirror Database
- 8 Using the Database Utilities
- Restructuring the Database with TurboIMAGE/XL Utilities
- Summary of Utility Routines
- Utility Program Operation
- DBLOAD
- DBRECOV
- >CONTROL
- >EXIT
- >FILE
- >RECOVER
- >ROLLBACK
- >RUN
- DBRESTOR
- DBSTORE
- DBUNLOAD
- DBUTIL
- >>ACTIVATE
- >>ADDINDEX
- >>CREATE
- >>DEACTIVATE
- >>DETACH
- >>DISABLE
- >>DROPINDEX
- >>ENABLE
- >>ERASE
- >>EXIT
- >>HELP
- >>MOVE
- >>PURGE
- >>REBUILDINDEX
- >>REDO
- >>RELEASE
- >>SECURE
- >>SET
- >>SHOW
- Syntax
- Parameters
- Example (Show Users)
- Example Discussion
- Example (Show All)
- Example Discussion
- Example (Show Capacity)
- Format of Show Device List
- Example (Show Device)
- Format of Show Indices
- Example (Show Indices)
- Format of Show Locks List
- Example 1 (Show Locks)
- Example 1 Discussion
- Example 2 (Show Locks)
- Example 2 Discussion
- >>VERIFY
- 9 Using a Remote Database
- 10 Internal Structures and Techniques
- 11 B-Tree Indices
- A Error Messages
- B Results of Multiple Access
- C Database Design Considerations
- D Multiple Calls to DBLOCK
- E TurboIMAGE/XL Log Record Formats
- F MPE/iX Log Record Formats
- G Recovery and Logging Quick Reference
- H TurboIMAGE/XL versus TurboIMAGE/V

226 Chapter5
TurboIMAGE/XL Library Procedures
DBPUT
entry, it must have space to add one. This addition occurs automatically.
• The order of data item values in the new entry is determined by the set definition in the
schema and not by the order of the items' occurrence in the list and buffer arrays.
• Values for data items not included in the list array are filled with binary zeros.
• The new entry is linked into one chain for each search item, or path, defined according
to the search item value. It is linked to the end of chains having no sort items and into
its sorted position according to the collating sequence of the sort item values in the
chain. If two or more entries have the same sort item value, their position in the chain
is determined by the values of the items following the sort item in the entry. The
position of an entry on a sorted chain is determined by a backward search of the chain
beginning at the last entry. The position is maintained by logical pointers rather than
physical placement in the file.
• Proper Native Language collating sequence must be maintained for chain sorting.
• If dynamic capacity expansion is allowed for the detail data set, when the detail data
set reaches the end of the current allocation (that is, data set free count is zero),
expansion is requested by the incremental amount. If the expansion is successful, the
new record is added to the database. If the expansion is not successful, an error
message is displayed, and the record is not added to the database. If there is insufficient
disc space to expand the data set to the full incremental amount, DBPUT will perform a
partial expansion up to the disc space available. DBPUT will terminate if there is no
available group or account disc space even if there is enough system disc space. (The
current capacity for a data set can be displayed by the SHOW CAPACITY command in
DBUTIL or the output buffer from DBINFO modes 202 and 205.)
The record in which the new data entry is placed becomes the current record for the data
set. The forward and backward pointers reflect the new entry's position. Refer to the
description of status elements 7 through 10.
The record number of the new data entry is returned to status halfwords 3-4; and its
forward and backward pointers are returned in status halfwords 7-8 and 9-10, respectively.
If you intend to use these numbers for directed reads (see "Directed Access" in chapter 4),
save them because subsequent TurboIMAGE/XL procedure calls can overwrite the status
area.
The execution of a call to DBPUT could require extensive resources depending on the
amount of chain maintenance required. For example, when an entry is added to a detail
data set, the new entry must be linked to all other related entries with the same key
values and to all of its related master entries. This operation could involve many blocks of
data. TurboIMAGE/XL prevents data block access conflicts with all other users and
ensures data integrity by applying a temporary lock on other processes until the call to
DBPUT completes. The timing of this temporary lock can be controlled with the PREFETCH
option of DBUTIL. Refer to "Coordinating Additions to a Database" in chapter 4 for
considerations when enabling or disabling this option.
Performance may be impacted by the number of entries incremented when DBPUT is used
to dynamically expand the detail data set. The number of disc extents used for the data set
file may also impact the performance of TurboIMAGE/XL.
If the process is logging, a call to DBPUT causes a log record to be written with such