![]() |
![]() |
|
|
![]() |
![]() |
QUERY/V Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix E SELF-DESCRIBING FILES![]() ITEM NAMES |
|
All item names in a self-describing file must be unique unless all the duplicate items are in data item equivalences. (Refer to the JOIN command for more information on data item equivalences.) Entries retrieved with a FIND have unique item names because they are retrieved from a single data set. However, entries retrieved with a MULTIFIND may have duplicate item names because they are retrieved from more than one data set. The duplicate items must have been used in the JOIN data item equivalence(s). An exception is made because the duplicate items are of the same value although they may be of different data types. The first occurence of the item in the compound data set entry is the one recorded in the item description. Other occurences are skipped because the item has already been described. The data in the file contains all occurences of the data item even though the item description appears only once. The offset reflects the first location in the record where the data item value can be accessed. Refer to example 2 for a self-describing file created from a MULTIFIND where the JOIN item names are identical. Examples Example 1 - Single Data Set Retrieval Given the following IMAGE data base:
and the following FIND and SAVE commands:
the SD file, SAVEFILE, appears as follows: ------------------------------ | labels 0-9 | ------------------------------ | item description label | ------------------------------ | global information label | ------------------------------ | | | data | | | ------------------------------ where the global information label contains: (version) (length) (#items) (#labels) (#items/label) (size) ------------------------------------------------------------------ | A.00.00 | 38 | 4 | 2 | 8 | 15 | ------------------------------------------------------------------ and the item description label contains: (name) (type) (offset) (length) (unused) -------------------------------------------------------- | NAME | 1 | 0 | 10 | 0 | -------------------------------------------------------- | OCCUP | 1 | 10 | 16 | 0 | -------------------------------------------------------- | CITY | 1 | 26 | 10 | 0 | -------------------------------------------------------- | STATE | 3 | 36 | 2 | 0 | -------------------------------------------------------- and the data in the file is (binary data is represented as periods):
Example 2 - Compound Data Set Retrieval Given the following IMAGE data base:
and the following JOIN, MULTIFIND, and SAVE commands:
the SD file, SAV2FIL would look like this: ------------------------------ | labels 0-9 | ------------------------------ | item description label | ------------------------------ | global information label | ------------------------------ | | | data | | | ------------------------------ where the global information label contains: (version) (length) (#items) (#labels) (#items/label) (size) ------------------------------------------------------------------ | A.00.00 | 74 | 7 | 2 | 8 | 15 | ------------------------------------------------------------------ and the item description label contains: (name) (type) (offset) (length) (unused) -------------------------------------------------------- | NAME | 1 | 0 | 10 | 0 | -------------------------------------------------------- | OCCUP | 1 | 10 | 16 | 0 | -------------------------------------------------------- | CITY | 1 | 26 | 10 | 0 | -------------------------------------------------------- | STATE | 3 | 36 | 2 | 0 | -------------------------------------------------------- | NAME2 | 1 | 38 | 10 | 0 | -------------------------------------------------------- | OCCUP2 | 1 | 48 | 16 | | -------------------------------------------------------- | CITY2 | 1 | 64 | 10 | 0 | -------------------------------------------------------- and the data in the file is (binary data is represented as periods):
|
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|