Writing SQL queries to access an IMS database with the IMS Universal JDBC driver

Use the IMS™ Universal JDBC driver to connect to an IMS database for writing SQL queries.

The IMS catalog provides metadata to your application program. You can write SQL queries to access IMS data based on the metadata information available in the catalog database.

If your IMS system does not use the IMS catalog, you can use the IMS Enterprise Suite Explorer for Development instead.

The IMS Explorer for Development generates a Java™ database metadata class. This class that contains the PSB and DBD metadata classes that the IMS Universal drivers use at runtime.

The metadata includes information about the IMS database, including segments, segment names, the segment hierarchy, fields, field types, field names, fields offsets, and field lengths.

The metadata is used by the IMS Universal JDBC driver to allocate program specification blocks (PSBs), issue DL/I calls, perform data transformation, and translate SQL queries to DL/I calls.

The following table summarizes the mapping between IMS database elements and relational database elements.

Table 1. Mapping between IMS database elements and relational database elements.
Hierarchical database elements in IMS Equivalent relational database elements
Segment name Table name
Segment instance Table row
Segment field name Column name
Segment unique key Table primary key
Foreign key field Table foreign key