Overview of the IMS catalog
The IMS catalog contains trusted metadata and definitions of the IMS databases and application program views that are defined to IMS.
If the IMS management of ACBs is enabled, the IMS catalog also determines the active databases and program views (PSBs) in the IMS system, because ACB libraries are not used. When IMS uses ACB libraries, the ACB library determines which databases and program views are active, and you must ensure that the IMS catalog is always in synch with the ACB library.
The IMS catalog is itself a HALDB PHIDAM database. Each database and application program view that is defined to IMS is stored in a separate record in the IMS catalog. In each record, the root header segment identifies the type of resource that it contains: either a database definition (DBD) or a program view (PSB).
The header segment is followed in the hierarchy by a DBD or a PSB segment. The DBD or PSB segment and its dependent segments store the definition and metadata of the database or program view.
Subsequent definitions of a database or program view are stored in the same record as the previous definitions of the database or program view by inserting more instances of the DBD or PSB segment and its dependents. The different instances of a database or program view are differentiated by a time stamp.
The database and program view instances in a record can include an active instance that is being used by the online IMS system, previously defined instances, and draft instances that were never activated.
If database versioning is used, the DBD segments for a previous version of a database must be retained in the DBD record in the IMS catalog to provide application programs access to the previous version of the database.
Depending on whether you enable the IMS management of application control blocks (ACBs), you have different options for how you define databases and program views, add them to the IMS catalog, and activate them in the IMS system.
When IMS manages the ACBs, you can define databases and program views either by using SQL data definition language (DDL) statements or by using the input macros of the DBD Generation utility and PSB Generation utility.
When you use DDL statements, IMS can add the database and program view definitions to the IMS catalog, build the required runtime control blocks, and, in some cases, load them into the online IMS system automatically.
When you use the DBD and PSB Generation utilities to define databases and program views in an IMS system that manages ACBs, after you run the utilities, you must also run the ACB Generation and Populate utility (DFS3UACB) or equivalent utilities to build the ACBs, update the IMS catalog, and load the ACBs into the IMS system.
In an IMS system that manages ACBs, the IMS catalog completely replaces DBD, PSB, and ACB libraries as the component that determines which database and program view definitions are used by the online IMS system and by batch application programs.
When the IMS management of ACBs is disabled, you cannot use DDL to define databases and program views. Instead, you must define them by using the DBD and PSB Generation utilities, you must generate members into an ACB library, and you must use the online change process to activate the ACB library. You must also make sure that the IMS catalog remains in sync with the active ACB libraries.
Data is stored in the IMS catalog database as hexadecimal (type X) for numeric values, or Cp1047 EBCDIC character data. In some cases, values are truncated to save space. If a field contains blanks (for character data), that indicates that the field does not apply to that database or program specification block. Individual field definitions might indicate other meanings for a blank field.
IMS provides a skeletal COBOL copybook and skeletal PL/I program for accessing the catalog database. The COBOL copybook is called DFS3DCBL and can be found in IMS.ADFSISRC. The PL/I sample application is named DFS3DPL1 and can be found in the IMS sample library, IMS.ADFSSMPL.
When the catalog is enabled in the DFSDFxxx member of the IMS.PROCLIB data set, IMS automatically adds a PCB list for the IMS catalog to each user PSB at run time.
IMS provides two DBDs for the IMS catalog, one for the main IMS catalog database and the other for the secondary index. IMS provides several PSBs for the IMS catalog for different purposes and application program types. The DBDs and PSBs for the IMS catalog are defined as resident.
The catalog database segment types are grouped into four different data set groups (A - D) based on how frequently that segment type is accessed in database queries. The root segment type (HEADER) and the DBD and PSB segment types are in data set group A. The least frequently accessed segment types, such as user remarks, are grouped in data set D.
As a HALDB PHIDAM database, the IMS catalog can be queried with standard DL/I processing, with DL/I processing through the Universal DL/I driver, and with SQL through the Universal JDBC driver. IMS catalog database records cannot be updated, replaced, inserted, or deleted except with the provided utilities.