# cobol basic command.

**URL:** <https://techcommunity.softwareag.com/t/cobol-basic-command/201830>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [November 26, 2018, 1:39pm UTC](https://techcommunity.softwareag.com/t/cobol-basic-command/201830 "2018-11-26T13:39:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio\_Barbara](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Antonio\_Barbara](https://techcommunity.softwareag.com/u/Antonio_Barbara)\
**Post date:** [November 26, 2018, 1:39pm UTC](https://techcommunity.softwareag.com/t/cobol-basic-command/201830/1 "2018-11-26T13:39:01Z")

</div>

I need to provide the dynamic DBID inside the cobol program. How to do this? What kind of control block will I use? Who can help me?  
I count on your cooperation and I thank you all.

```
   01 W30-CB.
       05 FILLER PIC X(02) VALUE SPACE.
       05 W30-CC PIC X(02) VALUE 'S1'. <command>
       05 W30-CMID PIC X(04) VALUE ' '.
       05 W30-FN PIC 9(04) COMP VALUE 30. <file>
       05 W30-RC PIC 9(04) COMP VALUE 0.
       05 W30-ISN PIC 9(08) COMP VALUE 0.
       05 W30-ISN-LL PIC 9(08) COMP VALUE 0.
       05 W30-ISN-QQ PIC 9(08) COMP VALUE 0.
       05 W30-FBL PIC 9(04) COMP VALUE 14.
       05 W30-RBL PIC 9(04) COMP VALUE 13.
       05 W30-SBL PIC 9(04) COMP VALUE 3.
       05 W30-VBL PIC 9(04) COMP VALUE 13.
       05 W30-ISN-BL PIC 9(04) COMP VALUE 0.
       05 W30-CMOP1 PIC X(01) VALUE SPACE.
       05 W30-CMOP2 PIC X(01) VALUE SPACE.
       05 W30-AD1 PIC X(08) VALUE SPACES.
       05 W30-RESTO PIC X(36) VALUE SPACES.

```

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [November 26, 2018, 4:33pm UTC](https://techcommunity.softwareag.com/t/cobol-basic-command/201830/2 "2018-11-26T16:33:32Z")

</div>

W30-RC is a dual-purpose field. Set it to the DBID value before each Adabas call. After the call, W30-RC contains the return code.

---

<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:41pm UTC](https://techcommunity.softwareag.com/t/cobol-basic-command/201830/3 "2021-04-02T15:41:51Z")

</div>


