How to Map IMS DB Segment Data to COBOL Copy Book

IMS DB is a hierarchical database. The database comprises of segments. The Segments are like Tables as in RDBMS. The design of database is that the fields in segments are mapped to theCOBOL copy books.

Questions Asked on IMS DB

The data in the Segments you can browse using File-aid for IMS DB. But the question is how to map segments to COBOL copy book. Here’s the way:

  1. Create a COPY book that matches to segment fields. While writing program include the copy book in your program and File-aid as well.
  2. IMS DB architecture has two main components DBD and PSBGEN.
  3. The DBD contains information of segments/PSBGEN. And each PSBGEN points to one DBD only.
  4. PCB-mask is the interface between DLI calls and IMS database.

What You Will Learn Here

  • You can view IMS DB segments using File-aid with Segment copy book layout
  • This is how data pass-through during DL/I calls. The IO area is Copy book to hold data of particular segment.

CALL  ‘CBLTDLI’      USING           function code

                                                            PCB mask

                                                            I-O Area

                                                            SSA’s

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.