# close a file that has been opened for update in COBOL

**URL:** <https://techcommunity.softwareag.com/t/close-a-file-that-has-been-opened-for-update-in-cobol/195681>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [July 20, 2017, 8:23pm UTC](https://techcommunity.softwareag.com/t/close-a-file-that-has-been-opened-for-update-in-cobol/195681 "2017-07-20T20:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shannon\_Richardson](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Shannon\_Richardson](https://techcommunity.softwareag.com/u/Shannon_Richardson)\
**Post date:** [July 20, 2017, 8:23pm UTC](https://techcommunity.softwareag.com/t/close-a-file-that-has-been-opened-for-update-in-cobol/195681/1 "2017-07-20T20:23:24Z")

</div>

Forgive me if I say any of this incorrectly, I am new to ADABAS.  
We have a COBOL program where ADABAS is called with an OP command and ‘UPD=206.’ in the record buffer, I assume that means file 206 is being opened for update?  
Then when we issue a generic CL call to ADABAS (with no files specified) at the end of that COBOL program it does not seem to be closing file 206.  
We have a later job that tries to do a backup of file 206 and that job is failing, saying file 206 is still open.  
Is there a specific close I need to code after a file has been opened with UPD= ?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 21, 2017, 1:26pm UTC](https://techcommunity.softwareag.com/t/close-a-file-that-has-been-opened-for-update-in-cobol/195681/2 "2017-07-21T13:26:20Z")

</div>

CL is per se a generic call, so no, you can’t issue it differently.

Are you 100% sure that CL gets issued ?

CL issues an implicit ET and releases all resources, having specified a file as UPD on the OP call doesn’t make any difference here.

If the UQE (user queue element) is still there for the user, and file 206 marked as being accessed,  
then I’d suspect the CL doesn’t get issued as expected.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:38pm UTC](https://techcommunity.softwareag.com/t/close-a-file-that-has-been-opened-for-update-in-cobol/195681/3 "2021-04-02T15:38:57Z")

</div>


