Application Interface Definition Language
1.1 Syntax Rules
When entering text for the AI, the following rules apply:
*
At least one space between words
*
One statement per line
*
No periods at the end of the line
*
Blank lines, indentations, and extra spacing are allowed
*
Upper or lower case allowed, AIs are case insensitive
*
The @ sign indicates that everything after it is a comment, all
text
after an @ sign is ignored by the AI compile process.
1.2 Application Interface Definition Language
1.2.1 The DATA BASE NAME statement
Syntax: DATA BASE NAME [IS] <data-base-name>
Required/Optional: Required.
Placement: Must come first in the Application Interface Definition.
Description: This must be the first statement in any AI text file. The
"data-base-name"
can be a full path name, but after the path part is done and you get to the
actual name part, the name you use must agree with the name you used in the
Data Base Definition's DATA BASE NAME IS statement.
The data base name provides the link between the data base and the AI. It is
how the AI knows which data base it is plugging in to.
When you supply a full path name you can use the UNC (Universal Naming
Convention). This prevents problems in installations where different
workstations have different drive letter mappings.
1.2.2 The RECORD DECLARATION Statement
Syntax: RD <tablename> [<file-type>]
Required/Optional: Optional.
Placement: Must follow DATA BASE NAME Statement. By convention, Record
Descriptions follow the FILE Statement, EXTRA COLLECTIONS Statement, DATA
GROUPS Statement and DATA BASE NAME Statement.
Description: A Record Description (RD) is used to provide the format of
an external file so that it can be imported (read) into the data base, or
exported (written) from the data base.
1.2.3 The DATA DECLARATION Statement
Syntax: <fieldname> <field-description>
Required/Optional: RECORD DECLARATION Statements are optional. However, each RECORD DECLARATION Statement requires at least one DATA DECLARATION Statement.
Placement: Must follow its RECORD DECLARATION.
Description: Each DATA DECLARATION Statement specifies the name of a
field, the field type and the field size.
The grammer rules for <fieldname> and <field-description>
are defined in the Record Descriptions document.
1.2.4 The EXTRA COLLECTIONS Statement
Syntax: EXTRA COLLECTIONS [ARE] <collection-1>
<collection-2> ... <collection-N>
Required/Optional: Optional.
Placement: Must follow DATA BASE NAME Statement; and it must be outside
the body of a Table Definition. By convention, the EXTRA COLLECTIONS Statement,
if it occurs, is the first statement after the DATA BASE NAME Statement.
There can be more than one EXTRA COLLECTIONS statements.
Description: This is an
optional statement used to add new collection names or to
delete default collection names.
The default collection names are A, B, C, D, E, U and V.
The syntax rules for a collection name are:
1) It must be formed from the characters {A-Z, a-z, 0-9, '_', '#'};
2) The first character must be alphabetic;
3) The alphabetic characters are case-insensitive;
4) Only the first 64 characters of the name are significant;
5) The name cannot duplicate any Thunderbolt reserved word;
To add one or more collections, use the EXTRA COLLECTIONS statement in the
symbolic Application Interface Definition document.
To delete one or more of the default collections,
put a minus sign in front of the name.
For example:
EXTRA
COLLECTIONS ARE -E SHIPS
This statement removes the E collection and adds a collection named SHIPS.
FIND SHIPS WHERE something-is-true
SHIPS will be recognized as a collection name.
Do not delete the U or V collections as they are used by the Data Menu.
Note that the Thunderbolt API function ddlCreateColl()
can be used to create a collection dynamically during program execution.
1.2.5 The DATA GROUPS Statement
Syntax: DATA GROUPS [ARE] <tablename-1> <tablename-2> ...
<tablename-N>
Required/Optional: Optional.
Placement: Must follow DATA BASE NAME Statement; and it must be outside the
body of a Record Description. By convention, the DATA GROUPS Statement, if it
occurs, is the first statement after the EXTRA COLLECTIONS Statement or the
DATA BASE NAME Statement.
Description: This is an optional, and seldom used, statement. If it is
omitted, then all tables of the data base are visible through this AI. If a
DATA GROUPS statement is included, then only the specified tables are visible
through this AI.