# Using saved adadbm parm file with multiple dbid's

**URL:** <https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Windows-UNIX, Adabas-on-Linux, Adabas-Utilities-on-Open-Systems\
**Created:** [September 15, 2010, 4:54pm UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680 "2010-09-15T16:54:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Rose](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Anthony\_Rose](https://techcommunity.softwareag.com/u/Anthony_Rose)\
**Post date:** [September 15, 2010, 4:54pm UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680/1 "2010-09-15T16:54:58Z")

</div>

First of all I’m not a DBA so if I’m being silly just tell me please.  
I’m struggling to find a way to pass a variable dbid parameter to adadbm.

We have an environment with multiple databases, such Dev, Test, Live and so on. When we make a database change, such as via adadbm.exe, we save the parms in a text file, and pass the file like so:  
adadbm \< adadm1.prm  
Unfortunately, each time we want to apply the parms to a different database, we need to edit the dbid= parm inside adadm1.prm  
(Actually, we build a temp file, writing the dbid= parameter first and then appending the saved adadm1.prm text which has no dbid parmeter itself.)

What I would like to be able to do is set an environment variable, or batch parameter, such as %dbid%, which will apply to all subsequent changes.  
Or, feed both the dbid= parameter and the adaprm1.prm text to adadbm.  
e.g.  
adadbm dbid=28 \< adadbm1.prm  
(which don’t work of course)  
Or is there a way to get adadbm to look for the paraneters in the batch stream?

BTW how do you exit adadbm in command prompt?

Thanks  
Anthony

---

<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:** [September 16, 2010, 11:05am UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680/2 "2010-09-16T11:05:02Z")

</div>

Hi Anthony,

With environment variables named %dbid%, can we assume a Windows environment?

To combine command line parameters with input redirection try :-

adadbm db=%dbid% + \< adadbm.prn

As adadbm is a multi-function utility, you need to let it know that you have reached the end of the parameters for a particular function and want to execute it by typing & .

The Using Utilities section of the Administration Manual explains most of the idiosyncrasies of running utilities fairly well.

Cheers,

Graeme Lane

---

<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:** [September 16, 2010, 12:01pm UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680/3 "2010-09-16T12:01:41Z")

</div>

> [@Graeme Lane](#):
>
> …execute it by typing & .

Sorry for the typo. It should read and

Cheers,

Graeme

---

<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:** [September 20, 2010, 12:34pm UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680/4 "2010-09-20T12:34:31Z")

</div>

> [@Graeme Lane](#):
>
> …execute it by typing & .

The forum software seems to be re-interpreting my typing so I’ll try again.

…execute it by typing control-Z & .

---

<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, 2:59pm UTC](https://techcommunity.softwareag.com/t/using-saved-adadbm-parm-file-with-multiple-dbids/94680/5 "2021-04-02T14:59:04Z")

</div>


