Using saved adadbm parm file with multiple dbid's

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.
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?


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.


Graeme Lane

Sorry for the typo. It should read and



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

…execute it by typing control-Z & .