[ English | Japanese ]
Ddecompose [ options ] [ input-file.. ]
Ddecompose breaks down a D-record and convert it into "field instance unit representation" D-records. In this representation, each D-record stands for a D-field instance of the original input D-record. Field instance unit D-record has essential four fields to restore the original D-record. These fields have pre-defined fieldnames, "fieldname" field which holds the <field name> part of the original field, "value" field which holds the <value> part of the original field, "seq" field which holds the original D-record sequence number in the whole input (starting from 1) and "fieldseq" field which holds the sequence number of the field in the original D-record (starting from 0 for each original D-record). The field order of decomposed D-record (in the output file from Ddecompose) is "seq", "fieldseq", "fieldname", "value".
For example, a D-record:
a:A1
c:C11
b:B1
c:C12
is converted into next four D-records (Dpr view).
Field instance unit representation seq fieldseq fieldname value 1 0 a A1 1 1 c C11 1 2 b B1 1 3 c C12
Optionally, the output decomposed D-records may have "filename" field at the top with "-F" option.
In addition, the output may include fields from the input D-record by giving "-i" (identification fields) option. These fields are excluded from the normal decomposition process. Typically, the identification field is "key" field or the field that identifies the record in the original input file. But, this is not requisites. You may choose any field(s) from input D-records as the identification field, even it does not actually identifies the record.
Typical usage of Ddecompose is row-column transposition of a table. See the row-column transposition in the D_tutorial.
See the manual of D_msg.
MIYAZAWA Akira