Syntax in General
There are up to two definitions files allowed.
ADB's definition files are used to hold all field, fieldset,
and input/output file definitions.
The file ADB.xx (where "xx" is your project file
suffix) must exist (although it may be empty).
This is your global definitions file, where you'll probably
define all of the fields and fieldsets used in more than one
jobstream in your application.
Or, for small
(one-operation) jobs, the global definitions file
may contain everything.
Any file referenced in the "-STEP"
command-line parameter will be
taken to be your local (AKA "step") defintions. These are read
in after your global definitions.
Each of the 5 types of statements allowed in an ADB definitions file
consists of a series of "items". For example, the FLD statement has
up to 4 items:
FLD fieldname length {precision}
(I've put "precision" in curly braces because it's not used all the
time.)
Items can be separated by one or more spaces and/or tabs. You
may also use commas or semicolons.
It's not legal to use a comma followed immediately by a
semicolon, or two consecutive commas, or two consecutive
semicolons.
However, you may use as many spaces and/or tabs as you like, in
conjunction with up to one comma. Or, you may use as many spaces
and/or tabs as you like in conjunction with up to one semicolon.
These rules have been designed so that you can "do what comes
naturally."
You can also vary the use of commas and/or semicolons to suit any
stylistic conventions that you might wish to adopt (to make your
definitions as easy to read as possible).
Empty lines, lines consisting of all whitespace (spaces and/or tabs)
are ignored. Spaces and/or tabs occuring on the left or the right of
a line are also ignored.
There's no "mutiline" comment convention (as in the
"/* ... */"
sequences allowed in C and/or JavaScript). You may use pound
sign ("#"), the exclamation point ("!"), or the slash ("/") for
comments. (These aren't recognized inside quoted strings).
Whenever a comment character is encountered, the rest of the line
is ignored.
Where quoted strings are specified, you may use double quotes, single
quotes, or the backquote (below the "tilde" on most WinTel
keyboards), as long as your quotation marks are "balanced" (i.e.
the same choice is used on the left as on the right).
With the exception of the FSET statement, all statements must
begin and end on one physical
line. (There's really no reason
to continue any of the others).
Identifiers are used only for fields and fieldsets. They must
begin with a letter (underscores count as letters), and can
contain underscores, letters, or digits in any combination.
Identifiers can't exceed 25 characters in length (this is because
Awk has a maximum of 32, and I want to leave some space for
expansion.)
Note that when one or more underscores occur at the end of the
name of a field, they play a special role in determining the type
of a field.
You can use the same names for a field as a field set (although
it's questionable coding practice IMO).
Either a field or a fieldset may be defined multiple times, so long
as each definition is identical.
No identifier can be identical to any of the following 14
reserved words:
Awk
CQ
End
Fld
FSet
Mast
M-T
M&T
NoDups
None
Prep
Sort
Trans
T-M
Remember that everything about ADB is
case-INsensitive, with the
exception of field names (but only when used in the Awk interface,
since Awk itself is
case-sensitive), and the DOS Environmental
variables (case-sensitive for DOS 6.0 and up).
Return
to local table of contents
Return
to global table of contents
Frames mode, or
No frames