In this topic, we described about the below sections -
Hierarchical sequential accessed databases are based on sequential storage and access of database segments.Hierarchic sequential databases are of simpler organization.
The root and dependent segments of a record are stored in physical sequential order. Access to dependent segments is always sequential from the root segment.
Direct deletions of segments are not possible. Deleted dependent segments are not physically removed but marked as deleted. Hierarchic sequential databases can be stored on tape or DASD. Hierarchic sequentially accessed databases include.
Let’s discuss in detail about each one.
Known as Hierarchical sequential access method. In a HSAM database, the segments in each record are stored physically adjacent in the database. Records are loaded sequentially in ascending key sequence with root segments.
Dependent segments are stored in hierarchic sequence. The record format is fixed-length. HSAM databases can be stored on DASD or tape.
IMS identifies HSAM segments by creating a two-byte prefix consisting of a segment code and a delete byte at the beginning of each segment. HSAM segments are accessed through two operating system access methods:
- Basic sequential access method (BSAM)
- Queued sequential access method (QSAM)
Because of the numerous limitations, HSAM databases see limited use and are reserved primarily for applications that require sequential processing only.
Known as Hierarchic indexed sequential access method. Each HISAM record is indexed, allowing direct access to each record. HISM allows random data access is considerably faster.
HISAM databases also provide a method for sequential access when that is required. HISAM databases are stored on DASD. All DL/I calls can be used against a HISAM database.
HISAM databases supported by a greater number of IMS and MVS options. HISAM is most commonly used for low insert activity. HISAM databases are ordered.
Sequential processing at the root level will result in the database records being retrieved in ascending sequence based on the key value. The database segments are stored sequentially.
A parent and all its children will be sorted in physical sequence. An overflow area is maintained for the addition of segments, and pointers are used when a dependent segment is stored in the overflow area.
DASD space is not immediately reusable. HISAM database is implemented as a VSAM KSDS for the prime area and an ESDS for overflow.
Known as Simple hierarchical sequential access method. SHSAM database contains only one fixed-length root segment. In SHSAM database, deletes are not allowed.
There is no need for prefix portion of SHSAM database segment. SHSAM databases can be accessed by BSAM and QSAM.
The GET DL/I call only used with SHSAM databases. SHSAM database segments can be deleted or inserted only during a reloads
Known as simple Hierarchic indexed sequential access method. SHISAM database contains only a root segment and its segment has no prefix portion.
SHISAM databases can use VSAM as their access method. The data must be stored in a KSDS for SHISAM database. All DL/I calls can be used with SHISAM databases.
Known as General sequential access method. GSAM is a special IMS access method which allows IMS applications to process ordinary sequential files as an IMS database.
These applications can run as either batch or BMPs. GSAM is treated as sequential, non hierarchical database. It has no segments, no keys, and no parentage.
GSAM can process the file using the standard IMS CALL interface. IMS automatically repositions the file for the program during restart processing. The below two MVS access methods that support the GSAM database:
- BSAM for DASD, tape, or unit record datasets.
- VSAM ESDS for DASD datasets.
IMS automatically OPENs the GSAM database when the application program issues the first call to it and CLOSEs it when the application program ends. If GSAM is an output database and the program doesn’t ISRT any records, the database is not created.
Subsequently attempts to read the database will result in an error. To avoid this, the program should explicitly OPEN the database.