---
title: "How to Map IMS DB Segment Data to COBOL Copy Book"
description: "Here is an idea how to view segment data using file-aid for IMS DB"
url: https://srinimf.com/2021/09/18/how-to-map-ims-db-segment-data-to-cobol-copy-book/
date: 2021-09-18
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-1994893.jpeg?fit=1880%2C1148&ssl=1
categories: ["IMS DB"]
type: post
lang: en
---

# How to Map IMS DB Segment Data to COBOL Copy Book

[IMS DB](https://srinimf.com/2016/02/23/the-9-best-things-about-ims-db-hdam-database/) 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.

Related[The Real Purpose of DBDGEN Utility in IMS DB](https://srinimf.com/2016/03/14/why-dbdgen-system-utility-you-need-in-ims-db-before-writing-a-program/)

## Questions Asked on IMS DB

The data in the Segments you can browse using File-[aid for](https://srinimf.com/2012/02/22/file-aid-for-imsdb-reference-guide/) IMS DB. But the question is [how to](https://srinimf.com/2016/07/14/cobol-66-level-new-information-must-read/) 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.

- [Tutorial: IMS DB Top Command codes](https://srinimf.com/2017/05/05/command-codes-in-ims-db/)

## 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

- [Sample IMS DB and COBOL Program](https://srinimf.com/2011/06/15/ims-cobol-sample-program/)DateJune 15, 2011
- [Essential DL/I Functions for Efficient IMS DB Operations](https://srinimf.com/2016/10/07/the-list-of-dli-functions-absolutely-need-for-ims-db-projects/)DateOctober 7, 2016
- [Ideas: How to Edit IMS DB Segments Using FileAid](https://srinimf.com/2015/08/22/mainframe-tip-editing-ims-db-database-with-file-aid/)DateAugust 22, 2015

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F18%2Fhow-to-map-ims-db-segment-data-to-cobol-copy-book%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-1994893.jpeg%3Ffit%3D1200%252C733%26ssl%3D1&description=How%20to%20Map%20IMS%20DB%20Segment%20Data%20to%20COBOL%20Copy%20Book)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2021/09/18/how-to-map-ims-db-segment-data-to-cobol-copy-book/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2021/09/18/how-to-map-ims-db-segment-data-to-cobol-copy-book/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2021/09/18/how-to-map-ims-db-segment-data-to-cobol-copy-book/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2021/09/18/how-to-map-ims-db-segment-data-to-cobol-copy-book/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Map%20IMS%20DB%20Segment%20Data%20to%20COBOL%20Copy%20Book&body=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F18%2Fhow-to-map-ims-db-segment-data-to-cobol-copy-book%2F&share=email)
-

### Like this:

Like Loading…
