E Obsolete Database Utilities

Creating a new data item

CREATE ITEM
Ident, [count] type [ (format) ];

CREATE ITEM {
Ident, [count] type [ (format) ];
...
}

Ident is the item name, count is the optional subitem count, type is the item type, format is an optional format number.

If the statement is enclosed in curly braces, multiple items can be defined.

Item type is the same as defined by the schema processor and must be one of:

I, I2
Allow read access
I4, D
Allow read and write access
R4, S
Short REAL
R8, L
REAL
Xn
String, size specified by n must be even
The format number may be an arbitrary number. It may be retrieved using DBINFO and is used by the QUERY program to define the item output format.

The QUERY format number is composed by adding the various values, which are given after the plus sign.

Query format numbers
BitsField

description

Field

value

Descriptionadd

value

0Item Protection 0Item value may be changed in QUERY0
  1Item is write protected1
1-2Item type0default0
  1date type (days since 1972)2
  2Currency4
  3Undefined6
3Item spacing0default0
  1Comma every 3 digits8
4-6Post decimals0default0
  1FIXED 016
  2FIXED 132
  3FIXED 248
  ...  
  7FIXED 6112

For example:

  CREATE ITEM
    Call-Id, D (2);
This defines the data item Call-Id of type 'D' with format number 2.

  CREATE ITEM {
    Call-Id,   D;
    Call-Date, D (2);
    Call-Desc, 2X40;
  }
This defines the data items Call-Id, Call-Date and Call-Desc.


Eloquence Database Manual - 19 DEC 2002