A neutral file contains one or more datasets with optional dataset descriptors, all encoded in clear text. The header line of the file contains
#!MemCom NF 7
Each dataset consists of a header, an optional descriptor section, and a data section:
*+++ 'name' idiv 'tp' size dim1 dim2 has_desc Optional descriptor data section (has_desc=1) Data section
The header string *+++
is
followed on a new line by the dataset attributes:
name
is the dataset name and it must be enclosed in
quotes. The sub-division index idiv
must always be
set to 0. tp
is the dataset type enclosed in quotes
and is one of I, J, E, F, K, C, Z, or $. size is the total number of
data elements of the set. dim1 and dim2 are the set dimensions and they
are defined as follows: If dim2
is 0,
dim1
is the size of the dataset and it is then equal
to size
. If dim2
> 0,
dim1
is the size of a sub-set and
dim1
is then the number of sub-sets. Has_desc is an
integer flag taking the values 0 (no descriptor defined) or 1
(descriptor defined, data section immediately following).
The data section of positional datasets, i.e sets of type I, J, E,
F, K, C, Z, consists of size
data elements separated
by blanks and extending on more than one line if
required:
elem1 elem2 ... elemsize
The data section of non-positional datasets of type $, i.e relational tables, consists of pairs key-value, with a terminating empty key line:
nelem 'tp' 'keyname' elem1 elem2 ... elemnelem nelem 'tp' 'keyname' elem1 elem2 ... elemnelem ... 0 ' ' ' '
nelem
is the number of values
for the key keyname
and the data type
tp
, each of them enclosed in quotes. The
nelem
values, separated by blanks, can extend on more
than one line. If there are more than one relational tables in the set,
i.e the set contains sub-sets, there will be dim1
relational tables of size dim2
bytes following each
other, each terminated by an empty key line. If there is only one
relational table defined, i.e dim2
is 0, the table
has a size of dim1
bytes.
A descriptor data section is identical to a relational table data section, except that the table size is not specified (it will be defined when the descriptor is created).