• Aucun résultat trouvé

ESDS RECO~DS ptr2

Dans le document The information contained in this (Page 22-25)

ptrl ptr2

o IRoot cIDcPcliDepc2101 0

3 1 :1

figure 6. HISAM data base records in ISAM/OSAM: 'Ptrl' is used for the Root Overflow Chain and 'Ptr2' is used for the Depend-ent Overflow Chain.

KSDS RECORDS

ptr2

Ptr2

!

0

IRoot 81 Dep.sl!ol////////I

II

Ptr2

ESDS

RECO~DS ptr2

ptr2

o

Dep.A5

figure 7. HISAM data base records in VSAM: 'Ptr2' .is used for the Dependent Overflow Chain.

In an HISAM data base, the data base records are maintained in root key sequence. As explained below, the maintenance of the root key sequence will be done using different methods in ISAM/OSAM and VSAM. The

Dependent

Overflow Chain, 'Ptr2' in Figure 6 and Figure 7, is used to link all of the logical records which comprise the data base record and allow access to all of the segments of that data base record in hierarchical sequence.

When ISAM/OSAM is used, roots inserted after initial load ('Root B' and 'Root C' in Figure 6 on page 14) are placed in new OSAM logical records in the Overflow data set. The

Root

Overflow Chnin, 'Ptr1', is used to main-tain the root segments in root key sequence.

When the data bases use VSAM, new roots which are inserted after initial load ('Root B' and 'Root C' in Figure 7 on page 14) are placed in new KSDS logical records in the Primary data set. This direct insertion into the Primary data set is possible because of the structure and design of the VSAM index. No Root Overflow Chain is necessary with the VSAM i~plementa­

tion and this saves on the amount of system overhead required in each logical record.

A Simple HISAM (SHISAM) d~ta base is only allowed with VSAM implementation. The SHISAM data base may contain only root segments. Since no dependent segments exist, no Dependent Overflow Chain need be main-tained nor is the ESDS Overflow data set required. A SHISAM data base, therefore, is totally equivalent to a VSAM KSDS.

2.3.3 Direct organizations

In the direct organizations , Hierarchical Direct Access Method (HDAM) and Hierarchical Indexed Direct Access Method (HIDAM), the data base records are stored in a diffeient format from that used in HISAM. For HISAM, each data base record has its, own individual set of logical records linked together by the Dependent Overflow ·Chain and the segments are stored in these records in hierarchical sequence thereby being related through physical adj acency. The direct organizations do not assign a logical record to a particular data base record but, will place segments from dif-ferent data base records into the same logical record. Furthermore, the segments in direct organizations are related through pointers associated with each segment rather than by physical adjacency.

These pointers are stored as part of each segment ~n the data base. As shown in Figure 8 on page 16, each segment consists of two portions:

• The prefix, containing a 1-byte segment code, a 1-byte delete flag and a number of 4-byte pointers, and

• The segment data which is the information actually passed to applica-tion programs in response to a request for this segment.

In an ISAM/OSAM data base these pointers are direct address type pointers.

In a VSAM data base, the pointers are Relative Byte Addresses (RBAs). For complete information on the pointers that may be used in HDAM and HIDAM, refer to the manuals IMS/VS VERSION 1 SYSTE~/APPLICATION DESIGN GUIDE, SH20-9025 and IHS/VS VERSION 1 UTILITIES REFERENCE MANUAL, SH20-9029.

Iscldbl Pointers

Segment Data

1 If

,

If

, ... ,

If

PREFIX

DATA

sc

=

segment type code db

=

delete. flag byte

Figure 8. Format of a segment in an HDAM or HIDAM data base.

2.3.3.1

HDAH

An HDAM data base consists of only one data set, either an OSAM data set or a VSAM E5DS. This data set is divided into two portions. the

Root

Addrc~s­

able Area

where root segments and dependents arc stored and the Ovcrflo~

Area

where root segments and dependents that do not f it into the Root Addressable Area are inserted after initial load. The sizes of thcse areas are defined by the user in the RUNAME parameter of the DATASET macro as explained in "RMNAME" on page 51 .

Access to root segments in the HDAM data base is. achieved through the use of a Randomizing Routine. This randomizing routine takes a root key as input and returns a relative block number for OSAM or a control i~terval

number for VSAM and a Root Anchor Point (RAP) number.

The number of RAPs in each block or control interval is also defined in the RHNAME parameter. A root segment is located by accessing the indi-cated block or control interval and following the pointer or chain of pointers from the specified RAP to the desired root segment.

Figure 9 on page 17 shows the pointers used in an HDAM data base to link from RAPs to root segments and to relate the segments. There is no real difference except for the use of blocks or control intervals between the implementation of an HDAM data base with OSAM or VSAM.

-In each block or control interval there is one

Free space Anchor Point

which points to the first Free Space Element in the block or control interval. The

Free space Elements

are used to track and control the unused areas "in the block or control interval and are referenced whenever a seg-ment is placed into or deleted from the block or control interval.

Dans le document The information contained in this (Page 22-25)