|
|
There are two types of user labels which both contain descriptive
information. One type contains global information about the file
and the data it contains. The other type contains specific information
about each item in the data set entry or compound data set entry
in the file. Each user label is 128 words in length and is placed
in the file as follows:
----------------------------------------
| reserved for existing labels | 0-9
----------------------------------------
| last item description label | 10
----------------------------------------
| item description label | 11
----------------------------------------
| item description label | 12
----------------------------------------
| first item description label | 13
----------------------------------------
| global information label | 14
----------------------------------------
| data |
| |
----------------------------------------
Labels are in "reverse" order in the file. That is the last
label is the global information label, the second to last label
is the first item description label. An item description label contains
one or more item descriptions and there must be at least one item
description label.
When the file is built, space is reserved for pre-existing
user labels. Pre-existing labels may have been placed in the file
by an application program. If another application program converts
an existing file with user labels into an SD file, the existing
labels are not overwritten unless there are more than ten. Pre-existing
user labels begin at label 0. As a result, the last item description
label always occupies label 10 in the SD file.
The information in the global information label resides in the following order:
version | length | #items | #labels | #items/labels | size
- version
is the the version of the SD Intrinsics that created the file. The
standard HP version format is followed (AA.NN.NN). (8 characters, right
justified)
- length
is the length of the records in bytes. This corresponds to the size of
the IMAGE entry. (integer)
- #items
is the number of items in each file record. This corresponds to the
number of items in the IMAGE entry. (integer)
- #labels
is the number of item description user labels. (integer)
- #items/labels
is the number of item descriptions that fit into one item description
label. Each label can hold INTEGER (128/size). (integer)
- size
is the size of one item description in words. (integer)
The information in the item description label resides in the following order:
itemname | itemtype | itemoffset | itemlength | reservedspace
- item name
is the name of the item. (16 characters, left justified)
- item type
is one of the following codes indicating the type of item. (integer)
1 = ASCII (type U and X)
2 = ASCII numeric in free form
3 = signed integer (type I)
4 = floating point real (type R)
5 = packed decimal (type P)
6 = COBOL computational (type J)
7 = unsigned integers (type K)
8 = zoned decimal (type Z)
9 = IEEE floating point real (type E)
10 = IMAGE compound item
The item types in parentheses correspond to IMAGE data types.
Note: Type 2 refers to ASCII representations of numbers in free format.
This includes 20, 45.7, 1.002E-10, -201.45.
- item offset
is the offset of the item in the file record in bytes. This offset is
relative to the beginning of the beginning of a record where the first
byte has an offset of zero, the second has an offset of one, and so on.
(integer)
- item length
is the length of the item in bytes. This distinguishes the long and
short forms of integers and reals. (integer)
- reserved space
is reserved for future enhancements to SD files. Four words are
reserved.
|