Accessing databases with your IMS application program
When designing your program, consider the type of database it must access. The type of database depends on the operating environment.
The program types you can run and the different types of databases you can access in a DB batch, TM batch, DB/DC, DBCTL, or DCCTL environment are shown in the following table.
Environment | Type of program you can run | Type of database that can be accessed |
---|---|---|
DB/DC | BMP |
|
IFP |
|
|
JBP |
|
|
JMP |
|
|
MPP |
|
|
DB Batch | DB Batch |
|
DBCTL | BMP (Batch-oriented) |
|
JBP |
|
|
DCCTL | BMP |
|
IFP |
|
|
JMP |
|
|
MPP |
|
|
TM Batch | TM Batch |
|
The types of databases that can be accessed are:
- IMS Databases
There are two types of IMS databases: full-function and Fast Path.
- Full-function databases
Full-function databases are hierarchic databases that are accessed through Data Language I (DL/I) call interface and can be processed by these types of application programs: IFP, JMP, JBP, MPP, BMP, and DB batch. DL/I calls make it possible for IMS application programs to retrieve, replace, delete, and add segments to full-function databases.
JMP and JBP applications use JDBC to access full-function databases in addition to DL/I.
If you use data sharing, online programs and batch programs can access the same full-function database concurrently.
Full-function database types include: HDAM, HIDAM, HSAM, HISAM, PHDAM, PHIDAM, SHSAM, and SHISAM.
- Fast Path databases
Fast Path databases are of two types: MSDBs and DEDBs.
- Main storage databases (MSDBs) are root-segment-only databases that reside in virtual storage during execution.
- Data entry databases (DEDBs) are hierarchic databases that provide a high level of availability for, and efficient access to, large volumes of detailed data.
MPP, BMP, and IFP programs can access Fast Path databases. In the DBCTL environment, BMP programs can access DEDBs but not MSDBs. JMP and JBP programs can access DEDBs but not MSDBs.
- Full-function databases
- Db2 for z/OS
databases
Db2 for z/OS databases are relational databases that can be processed by IMS batch, BMP, IFP, JBP, JMP, and MPP programs. An IMS application program might access only DL/I databases, both DL/I and Db2 for z/OS databases, or only Db2 for z/OS databases. Relational databases are represented to application programs and users as tables, and are processed using a relational data language called Structured Query Language (SQL).
Note: Programs running in 64bit JMP and JBP regions cannot access Db2 for z/OS databases.Related Reading: For information on processing Db2 for z/OS databases, see DB2® for z/OS Application Programming and SQL Guide.
- z/OS Files
BMPs (in DB/DC, DBCTL, and DCCTL environments) are the only type of online application program that can access z/OS files for their input or output. Batch programs can also access z/OS files.
- GSAM Databases (Generalized Sequential Access Method)
Generalized Sequential Access Method (GSAM) is an access method that makes it possible for BMPs and batch programs to access a sequential z/OS data set as a simple database. A GSAM database can be accessed by z/OS or by IMS.