---
title: "IMS DB-GSAM OPEN,CLOSE,GN Calls"
description: "Top IMS DB DLI calls to use in your projects."
url: https://srinimf.com/2012/02/09/imsdb-gsam-openclosegn-calls/
date: 2012-02-09
modified: 2026-10-05
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2012/02/pexels-photo-3769120.jpeg?fit=1880%2C1232&ssl=1
categories: ["IMS DB"]
tags: ["IMS DB Tips and Tricks"]
type: post
lang: en
---

# IMS DB-GSAM OPEN,CLOSE,GN Calls

Here is [my post#1](http://srinimf.com/2012/02/03/imsdb-gsam-tough-questions-1of-1/) if you miss it. Below are the [DLI CALLs](https://srinimf.com/2012/03/05/imsdb-chkpbasicsymbolic-xrst-calls/) commonly use in [IMS DB](https://srinimf.com/2016/10/07/the-list-of-dli-functions-absolutely-need-for-ims-db-projects/) with GSAM programs.

**Entry call:**

```
Entry 'DLITCBL'   Using   TPPCB
GSam-file-Input
Gsam-file-output
```

**Open call:**

```
Call 'CBLTDLI'  Using OPEN
GSam-file-Input
GSam-file-Output
```

**Read call:**

```
Call 'CBLTDLI'  Using GN
GSam-file-Input
```

**Insert call:**

```
Call 'CBLTDLI'  Using Insert
GSam-file-Record
```

**Close call:**

```
Call 'CBLTDLI'  Using Close
GSam-file-Input
GSam-file-Output
```

Finally, how do you know if the file is input or output? In PSB, look for the below syntax to know.

```
Indataset= GSam-file-Input
outdataset=GSam-file-Output.
```

You no need to give a SELECT statement in the [COBOL program](https://srinimf.com/2011/06/15/ims-cobol-sample-program/) because of the above PSB definitions.

[![](https://i0.wp.com/srinimf.com/wp-content/uploads/2020/04/ims-db-free-book.png?resize=1920%2C480&ssl=1)](http://www.exampleproblems.com/wiki/index.php/IMSDB)

**Don’t forget to share this post!**

### 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%2F2012%2F02%2F09%2Fimsdb-gsam-openclosegn-calls%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2012%2F02%2Fpexels-photo-3769120.jpeg%3Ffit%3D1200%252C786%26ssl%3D1&description=IMS%20DB-GSAM%20OPEN%2CCLOSE%2CGN%20Calls)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/02/09/imsdb-gsam-openclosegn-calls/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/02/09/imsdb-gsam-openclosegn-calls/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/02/09/imsdb-gsam-openclosegn-calls/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/02/09/imsdb-gsam-openclosegn-calls/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20IMS%20DB-GSAM%20OPEN%2CCLOSE%2CGN%20Calls&body=https%3A%2F%2Fsrinimf.com%2F2012%2F02%2F09%2Fimsdb-gsam-openclosegn-calls%2F&share=email)
-

### Like this:

Like Loading…
