Project

General

Profile

DABBEL

DABBEL (Database Batch Editing Language) is the facility for modifying the central ACNET device database. This document is the reference guide for using DABBEL. It contains three main parts: an overview, a description of the editing language, and a guide to the shell command used to invoke the DABBEL facility1.

Device Properties

FMAP

The foreign device mapping field allows for a property to refer to a non-ACNET device. Eg. EPICS PVs

Commands

OBS (Mark device obsolete)

General Format: OBS X:YYYYYY ("Text describing reason to obsolete")

Note that the text must be delimited by the double-quotes!

A documentation-only device may be obsoleted, but this will reset the documentation-only state.

Field Value Required Comments
X:YYYYYY - device name Any valid existing device name Yes
Text Up to 80 characters and must include >= 8 non-blank chars Yes

Guide to the Dabbel Command

DABBEL is controlled by an input file which is created by the user in his (or her) own Linux disk directory. This file is then submitted for processing via the 'dabbel' command (at shell level). The input file may not have the file type "lis". No input file is needed, however, in quick-listing mode.

The DABBEL program usually creates a listing file having a default filename identical to the input filename, and a default file type of "lis". This file is written in the same disk directory as the input file, and it contains all error and status messages. It also contains any list output which was generated by the LIS command verbs. As an option (--stdout), the listing file will be directed to STDOUT. normally the terminal.

Only authorized users will be permitted to modify or list the database. Using DABBEL in Syntax-Checking-Only mode, however, does not require any authorization. Please contact either Brian Hendricks or Glenn Johnson if you are denied access to DABBEL.

The DABBEL command has the following syntax:

$ dabbel input_file_specification qualifier

Where:

The input_file_specification is the required input file which must exist in the user's default disk directory. It should not contain any device or directory specification. If this parameter is missing, some help text will be displayed.

The optional qualifier must be one of the following keywords:

syntax (default): process the input file directly in syntax-checking-only mode. No connection will be made with the central database.

modify: process the input file with connection to the central database. Database modifications are permitted. The user will be notified when this task has been completed.

list: same as modify, except that the database cannot be modified (only LIS and LSX command verbs will be honored).

Other optional paramters may follow syntax/modify/list:

--prop: specify properties for selective listing (see below)

--stdout directs listing output to stdout instead of a file

If the user issues the DABBEL command without any parameters, the Dabbel program will be entered in dialog mode, with the DBL> prompt. In dialog mode, the user can issue any Dabbel command (without the leading "dabbel" verb), and one is able to issue multiple successive commands with the first parameter normally being the input file specification. To exit from dialog mode, simply enter "q", "quit", or Cntrl-D.

Selective Listing of devices is triggered by the --prop qualifier in which the user can specify one or more properties to be listed. This is most useful for those situations in which one desires to modify a single property by first listing the device. After editing the output listing, the resultant file can then be re-submitted to Dabbel in "modify" mode. This keeps the Dabbel input file simple and free of those properties not being changed.

The use of the --prop modifier is best illustrated by a couple of examples. "--prop:prread" will list the reading property only. Multiple properties can be provided, as in "--prop:prread:prset". In selective listing mode, the initial MOD line will contain only the device name unless one of the following properties are specified: prnode, prsibl, prtext, prcbdi, or pralst.

Selective listing can be further refined to display only the PDB commands for both the Reading and Setting properties. This is done with the "pdb" pseudo-property as in "--prop:prread:prset:pdb". Note that the "pdb" pseudo-property does nothing unless it is accompanied by "prread" or "prset". Alternatively, selective listing can be refined to eliminate the PDB commands via the "nopdb" pseudo-property. For example, "--prop:prread:nopdb" will display everything for the reading property except its PDB. If both "pdb" and "nopdb" are specified, no error will be generated, but "nopdb" will take precedence.

The Quick-List capability permits the user to list a single device without creating any input file, with the output going automatically to 'stdout'. Examples of valid quick-list commands:

dabbel list m:outtmp
dabbel list m:outtmp backup
dabbel lis m:outtmp --prop:prread:prset
dabbel lsx m:outtmp

For help, the user can enter "h" or "help" as the single command parameter.

Tips and Suggestions

Error Recovery

If running DABBEL in MODIFY mode and an error occurs, the database may have been modified by those "device batches" which preceded the batch causing the error. The listing file will clearly indicate which devices were successfully modified. Before re-submitting the DABBEL input file, it is important that the user delete those lines from the beginning of the file which were successfully executed on a previous run.

Dabbel Output Area (DABOUT)

Each Dabbel user has an assigned output area which will contain a variety of files related to a Dabbel run. These files are mainly useful to the Dabbel maintainer and database administrators. Each file name consists of a date-time plus extension. For example: 2018_08_16_11_DST_58_53.out. The path to this disk area is as follows: /usr/local/userb/dabbel/username (where 'username' is your user name)

The various file extensions are as follows:

.err    Contains error information if there was an error
.out    Contains those portions of the user's input file which were
        successfully processed in "modify" mode.
.inp    Contains a copy of the user's input file if there was an error
        detected, and the user specified "modify" in his or her invocation.
.log    Contains a log file which contains detailed run information

DABBEL Tools

ACNET Name Strainer

https://www-bd.fnal.gov/mcr/name_strainer.html

This tool, by Wally Kissel, allows the user to paste in any text and it pulls the ACNET device names out of the text. Below the name strainer is a set of tools to act on the ACNET devices in the name strainer.

1 https://www-ad.fnal.gov/controls/database/dabbel/dabbel.html