Item Structure
An item is the structure that holds data in a Reality file. Items can be direct (in which the data is stored in the same
as the header and item-id) or indirect (in which the data is stored in one or more separate frames).An item consists of the following:
- Header. This contains information such as the item size, the date of last update, etc. The contents of direct and indirect item headers are slightly different.
-
Item-id. This is an ASCII character string that uniquely identifies the item within the file. It can be from 1 to 240 bytes long, using ASCII characters in the range X'20' to X'FA'.
Note
If you specify an item-id that contains one or more system delimiters (characters X'FB' to X'FF'), Reality will truncate it immediately before the first system delimiter.
- Data. If this is larger than half the frame size it is stored out-of-group, with the header containing a pointer to the data.
The maximum size of a Reality item depends on the amount of memory available to the user, but cannot exceed 2Gb.
Items are classified as 'Binary' or 'Character' oriented depending on the type of data they contain:
- Character-oriented items - generally contain printable ASCII characters and use system delimiters such as attribute and value marks (X'FE' and X'FD') to separate the item into meaningful fields.
- Binary-oriented items - can contain any byte values. System delimiters have no particular significance in Binary items.
Direct Item
A direct item comprises the following:
-
Header containing:
- Flags.
- Date that the item was last updated.
-
Time that the item was last updated.
- Size of the item.
- Item-id.
- Data (this can be null).
Indirect Item
An indirect item comprises the following:
In-group Part
-
Header containing:
- Flags.
- Pointer to out-of-group data.
- Size of the in-group part.
- Item-id.
Out-of-group Part
-
Header containing:
- Flags.
- Date on which the item was last updated.
-
Time that the item was last updated.
- Size of the out-of-group part.
- Data.