LDA III and D-ISAM

A White Paper

By

Information Exchange Group, Inc.

(IEG)

June, 1998

Note: a full Word document containing pictures can be found at:
ftp://ftp.ieg-inc.com/ftp.ieg-inc.com/client/whitepapers/d-isam.doc
See our Support/File Exchange page for FTP details.


Introduction

This document describes the nature of the LDA III runtime database (D-ISAM). D-ISAM is provided to Unisys by a third party and has superseded C-ISAM which has limitations that are unacceptable in today's marketplace. Discussed in this document are:

IEG has developed several LDA runtime products and utilities requiring this information. Since Unisys did not provide this information, IEG has decided to make it public.

Disclaimer

The accuracy of information contained herein is not guaranteed. The information in this document has been discovered by experimentation and researching the resulting disk files. This document is subject to change as our understanding of D-ISAM evolves and as LDA III's usage of D-ISAM may change. Unless noted otherwise, the information relates to LDA 2.1 and later.

File "Cluster" Members

Each Usage I-O and Output ISPEC creates a "Cluster" of files in LDA III's run-time environment. All files in the cluster begin with the underscore character "_" and include the ISPEC name. Symbolic files are simple ASCII text files which describe the characteristics of the run-time database files.


Symbolic Files

_<Ispec>.DFN

_<Ispec>.DFN defines the file layout of _<Ispec>.DAT. It is created when you choose "Create Database" in run time. Its format is:


  V  0  0  2  .  0  0  1  .  0  0  0   
 56 30 30 32 2E 30 30 31 2E 30 30 30 0A
(not in 1.3 and prior)
 0  0  0  2  8
30 30 30 32 38 0A

      
 20 0A
(not in 1.3 and prior)
 s  t  d  i  o  f  l  a  g     0     A     1     0 
73 74 64 69 6F 66 6C 61 67 20 30 20 41 20 31 20 30 0A

 p  d  a  t  a  r  f  l  a  g     1     A     1     0
70 64 61 74 61 72 66 6C 61 67 20 31 20 41 20 31 20 30 0A

 D  A  T  A  R     2     A     1  5     0
44 41 54 41 52 20 32 20 41 20 31 35 20 30 0A

 M  A  I  N  T     1  7     A     1     0
4D 41 49 4E 54 20 31 37 20 41 20 31 20 30 0A

 O  R  D     1  8     A     1  0     0
4F 52 44 20 31 38 20 41 20 31 30 20 30 0A

_<Ispec>.PFN, if it exists, is the prior DFN file for the ISPEC when the layout has changed. It is created when you choose "Reorganize database" in run time and the layout of the ISPEC has changed.

_<ispec>_P.DFN

_<Ispec>_P.DFN is the Definition file for all Profiles that target <ISPEC>. It is created when you choose "Create database" in run time. Its format is:


 P  S  T  D  I  O                 0  1  0  1  0  0  0  0  F
50 53 54 44 49 4F 20 20 20 20 20 30 31 30 31 30 30 30 30 46 0A 

  I  S  T  D  I  O
 49 53 54 44 49 4F 0A

 O  O  R  D                       F  F
4F 4F 52 44 20 20 20 20 20 20 20 46 46 0A 

 P  P  D  A  T  A  R              0  1  0  1  0  0  0  0  T
50 50 44 41 54 41 52 20 20 20 20 30 31 30 31 30 30 30 30 54 0A 

 I  S  T  D  I  O
49 53 54 44 49 4F 0A 

 O  D  A  T  A  R                 F  F 
4F 44 41 54 41 52 20 20 20 20 20 46 46 0A 

 P  P  N  U  M  E  R  O           0  1  0  2  0  1  0  1  T
50 50 4E 55 4D 45 52 4F 20 20 20 30 31 30 32 30 31 30 31 54 0A 

 I  S  T  D  I  O 
49 53 54 44 49 4F 0A

 O  N  U  M  E  R  O              F  T
4F 4E 55 4D 45 52 4F 20 20 20 20 46 54 0A

 O  O  R  D                       F  F
4F 4F 52 44 20 20 20 20 20 20 20 46 46 0A

 C  M  A  I  N  T                 3  T     D
43 4D 41 49 4E 54 20 20 20 20 20 33 54 20 44 0A


_<Ispec>_P.PDF, if it exists, is the prior profile definition file. It is created when you choose "Reorganize database" in run time and the target ISPEC or a Profile has changed.

Database files

_<Ispec>.DAT

User data is stored in _<Ispec>.DAT files. A DAT file is created when you choose "Create database" in run time. DAT files are "square," that is all records within the same DAT file are the same length. Its format is described in the associated .DFN file. Data appears here in the order of record addition.


 Y  Y  F  i  r  s  t     D  a  t  a  r              A  F  i  r  s  t     O  r d
59 59 46 69 72 73 74 20 44 61 74 61 72 20 20 20 20 41 46 69 72 73 74 20 4F 72 64 20 0A

 Y  Y  3     D  a  t  a r                           A  3     O  r  d
59 59 33 20 44 61 74 61 72 20 20 20 20 20 20 20 20 41 33 20 4F 72 64 20 20 20 20 20 0A

 Y  Y  2     D  a  t  a r                           A  2     O  r  d
59 59 32 20 44 61 74 61 72 20 20 20 20 20 20 20 20 41 32 20 4F 72 64 20 20 20 20 20 0A

In 1.3 and priorall numeric data items are stored as double precision floating point using the IEEE 64 bit format thus taking up 8 bytes. In 2.1 and later, the numeric fields are simple character fields with lengths corresponding to the item’s length plus sign and decimal point, if any.

_<Ispec>.IDX Introduction

Data in the DAT file is always accessed through the _<Ispec>.IDX file. This is the heart of D-ISAM. The layout of the IDX file is quite complex compared to the other files in the cluster, so a little background is necessary. The IDX file:




Conceptually, the IDX file contains:

_<ispec>.IDX Layout

Block "0"

DK Table

Index Descriptors

Coarse/Fine Tables

D-ISAM limitations

These limits are not based on D-ISAM APIs or LDA III interpreter design - that information is not available. Hence, consider these limits as purely theoretical and more liberal than actual implementation limits.
Limited Item Limit Basis of Limit
Number of ISPECs unknown
File size 2,147,483,647 Size of byte pointer in file read/write operations
Number of Records 2,147,483,647 Fine table record # field is a "long"
Number of Records with Duplicate key values 2,147,483,647 Fine table duplicates resolver is a "long"
Record Size 2,147,483,647 Size of byte pointer in memory accesses
Key starting position within record 32,767 bytes Index descriptor key position field is an "integer"
Number of Profiles see below Index descriptor table size (32,767), number of Profiles and number of keys
Number of keys within a Profile 6,550 Index descriptor table size (32,767) less 12. Each key descriptor requires 5 bytes.
Total key size within a Profile with no duplicates allowed 16,372 bytes (Coarse table size less 4)/2 - 9.
Total key size within a Profile with duplicates allowed 16,376 bytes (Coarse table size less 4)/2 - 5

Remember that any numeric key requires 8 bytes in 1.3 and prior.

Number of Profiles is limited by a combination of factors. The following relationship must hold:



Implications on LINC

IEG Home