How to Map IMS DB Segment Data to COBOL Copy Book

IMS DB is a Hierarchical Database. Segments are like Tables(as in RDBMS). The fields in segments you can see as normal COBOL copy books.

Questions Asked on IMS DB

You might aware that IMS DB segment-data you can browse using File-aid for IMS DB. But some people asked how to map that data to COBOL copy book. Here’s the way:

  1. You need to create a COPY books that resembles segment fields. These copy book fields you can use 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. 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.