BADB Utility

BADB Input

The input to BADB is one or more text files containing pattern definitions and variable definitions. When you create these files, give each a file name with the extension .bld. BADB recognizes a file with the extension .bld as an input file.

BADB Output

BADB processes input text files to produce an output file containing a run-time AMS database. The form of the output filename is as follows:

Note: SMART AMS databases can be used by CP-AMS.

After the database is created, it must be moved to the desired Operations Sentinel servers.

After BADB terminates, you can check its exit status for errors. When BADB has executed without errors, its exit status is zero. One or more errors cause the exit status to be nonzero. Warnings do not affect the exit status.

BADB errors and warnings are described in Appendix E.

Using BADB to Create or Update an Autoaction Database

You can use BADB to create a new database or to update an existing database. When you start BADB, you can specify one or more options that apply to the database. One of these options is required when you create a new database. Otherwise, the command and options are the same whether you are creating a new database or updating an existing one.

Note: You can use the Distribute utility to update the active database for CP-AMS or SP‑AMS.

Starting BADB

From the Windows Start menu, select Programs, Operations Sentinel x.y.z, Automation Tools, Build AMS Database.

A command prompt window appears, positioned to the folder containing the BADB program (installation-folder\spo\bin). Abbreviated instructions for calling BADB are displayed in this window.

At the command prompt, enter the following command:

badb [option...] database-name [infile]...

where option can include any of the following:

-e

echoes the call line (you must specify this option first); for information only.

-c[i|s][u|c]

creates a new database. If a database by this name already exists, BADB replaces it with the new one. Specify i or s to indicate the database case sensitivity:

i — Case insensitive (default)

s — Case sensitive

Specify u to create an SP-AMS database. Specify c to create a CP-AMS database. If you omit the u and c options, BADB creates a SMART AMS database.

-in

sets the level of information messages to display. n can be one of the following:

0 — Display the least information

1 — Display moderate amount of information (default)

2 — Display the most information

-l

produces a listing of the BADB commands on the standard output device, with line numbers. The command window is the standard output device, unless you redirect the output to a printer or an alternate file.

-s[nnnn]

is a value greater than or equal to the number of standard patterns in the database: 0<nnnn<3264. This option allows BADB to run more efficiently when creating large databases by designating the number of standard patterns in the database.

-wn

sets the level of warning messages to display. n can be one of the following:

0 — Display the least information

1 — Display moderate amount of information (default)

2 — Display the most information

database-name

[SP-AMS]

a legal database name is 1 to 128 characters, and cannot include a space or any character not allowed in a file name.

AMS uses the database name as part of the file name for the database.

[CP-AMS]

a legal database name is 1 to 255 characters, and cannot include characters not allowed in a file name. CP-AMS database names are case-insensitive.

[SMART AMS]

a legal database name is 1 to 8 characters (letters, digits, and hyphens). SMART AMS database names are case sensitive.

infile

is the name of a text file containing BADB/ADBM commands. You may specify multiple input files. If you do not specify this file, BADB uses a default input file. The base name of this default file is the same as database-name with an extension of .bld.

Examples

In the following example, BADB reads command input from the file testdb.bld, and creates a case-insensitive SP-AMS database in the file testdb.asp. BADB prints all warning messages and sends all output to the terminal screen.

badb -cu -w2 -l testdb

In the following example, BADB reads input from files test1.ptn, test2.ptn, and test3.ptn, and creates a case-sensitive CP-AMS database in the file TestDB.acp:

badb -csc TestDB test1.ptn test2.ptn test3.ptn

In the following example, BADB creates a case-sensitive SP-AMS database named test.asp in the folder db from the commands in the files test1.bld and test2.bld in the folder source:

badb -csu db\test source\test1.bld source\test2.bld

Updating an Autoaction Database

If you are updating an autoaction database on an Operations Sentinel server, and do not include the database extension, BADB first checks for a SMART AMS database (extension .ams). If a SMART AMS database does not exist, BADB looks for a CP-AMS database (.acp), then an SP-AMS database (.asp). If there are databases with the same base name (e.g., both dbl.asp and dbl.ams), you must specify the extension (e.g., .asp) to force BADB to update the SP-AMS database.

Command

The command for starting BADB to update an autoaction database is

badb [-e] [-in] [-l] [-s[nnnn]] [-wn]
database-name[.asp.acp.ams] [infile]...

Examples

In the following example, BADB updates the database in file testdb.asp in folder asp with all the BADB commands found in files test.1, test.2, and test.3:

badb c:\asp\testdb.asp test.1 test.2 test.3

In the following example, BADB updates the database in file test.asp with commands found in files test1.bld and test2.bld:

badb test.asp test1.bld test2.bld

In the following example

badb -cu S6 plateau.
bldbadb S6 S6local.
bldbadb S6 S6test.bld

In the next example, autom8.bld is a text file that contains no pattern numbers. After creating a database in the file autom8.asp, the user updates autom8.bld by changing one of the patterns, and then rebuilds and replaces autom8.asp.

badb -cu autom8 

In the final example, the user did not include the c option, so the database in file autom8.asp doubles in size. Without the c option, all patterns in the input text file are added to the database. If the patterns do not have explicit pattern numbers within a group, they do not replace existing patterns, even if the patterns are identical in content.

badb autom8