Databases and segments
FM/IMS allows you to work with the IMS data organization model. IMS uses a hierarchical model as the basic method of storing data. In this model, the individual entity types are implemented as segments in a hierarchical structure.
The basic building element of a hierarchical data structure is the parent/child relationship between segments of data. Each occurrence (or instance) of a parent segment has associated with it 0, 1, 2, or more occurrences of a child segment. Each child segment occurrence has associated with it one, and only one, occurrence of a parent segment. The segment with no parent segment, that is, the one at the top, is called the root segment. Sometimes it is necessary to distinguish between a segment type, that is, the kind of segment; and the segment occurrence, that is, the particular instance of the segment type.
In IMS, the term “database? is commonly used to describe the implementation of one hierarchy, that is, the various segment types defined in the structure and the relationships between them. In Hierarchical data structure, each PART segment with its dependent STOCK, ORDER, and DETAIL segments constitutes a database record. The collection of all these records for all PARTS is called a database, that is, the PARTS database.
The hierarchical structure is determined by the designer of the database, based on the relationship between the segments and the access paths required. This structure is defined in a Database Definition (DBD). To access a database through FM/IMS, you must specify the data set member in which the DBD is stored. The DBD also defines the database type (Access Method) and the DDNAMES for the data sets in which the segment data is stored. The names of data sets that are allocated to these DDNAMES are stored in DFSMDA dynamic allocation members (a must in BMP mode) or defined by the user. DL/I mode access accepts a dataset name specified by the user if it is allowed at the installation.
FM/IMS supports a number of different IMS database types, using the IMS model of data organization. These types are:
- HDAM - Hierarchical Direct Access Method
- HIDAM - Hierarchical Index Direct Access Method
- HISAM - Hierarchical Index Sequential Access Method
- SHISAM - Simple Hierarchical Index Sequential Access Method
- HSAM - Hierarchical Sequential Access Method (BSAM or QSAM only)
- SHSAM - Simple Hierarchical Sequential Access Method (BSAM or QSAM)
- INDEX - Index database
- DEDB - Data Entry Database (Fast Path)
- MSDB - Main Storage Database (Fast Path)
- PHDAM - Partitioned Hierarchical Direct Access Method (HALDB)
- PHIDAM - Partitioned Hierarchical Index Direct Access Method (HALDB)
- PSINDEX - Partitioned Secondary Index (HALDB)
FM/IMS does not support the use of Generalized Sequential Access Method (GSAM) databases. A GSAM database is a sequential dataset, so it can be accessed using File Manager base.
Segment data can be manipulated in any way as long as it adheres to the rules defined in the DBD in use. Segments can be displayed in a variety of formats, depending on your settings and the information you provide. The display formats, CHAR, HEX and LHEX, show segment data as it is stored. TABL and SNGL formats use templates and views to display data in columns or lines for each field.