Dtie - Concatenation of group fields

[ English | Japanese ]

[visit D-home]

SYNOPSIS

Dtie [ options ] [ -t default-delimiter ] [ -N|L|S ] leaf-field-list new-field-name [ input-file.. ]

DESCRIPTION

Dtie ties a group of fields listed in the leaf-field-list to create a new field with the new-field-name. The listed fields are removed and replaced by the new field.

When the listed fields are repeating, they are separated to leaves with the leaf separation algorithm given by -NLS options, and each leaf is tied individually. It is a process to reduce a repeating group to a repeating field. For the leaf separation algorithm, see the manual of D_lsa.

By default, fields are tied with TAB control character. But, the leaf-field-list may have formats in it, and in this case, fields are tied following these formats. When no format is given in the leaf-field-list, -t and -z options are used. Note that fields are tied in the order which appears in the record, and not in the order listed in the leaf-field-list.

OPTIONS

-N
N-th occurrence algorithm. This is the default leaf separation algorithm.
-L
Leading field algorithm.
-S
Sequence break algorithm. For these leaf separation algorithms, see the manual of D_lsa.
-t default-delimeter
gives the default delimiter for the field-format-list. Default value is TAB control character.
-z default-options
gives the default options (lrqxQbf). Default value is none.
-D [i/o]datautf=8|16|32
UTF I/O feature (see manual page of UTF I/O feature.)

ENVIRONMENT

Ddatautf, Didatautf, Dodatautf
for UTF I/O feature.

EXAMPLES

Simple concatenation with -t

Command:

Dtie -t / "y,m,d" date input-file

Input-file:

y:1998
m:08
d:13

Result:

date:1998/08/13

N-th occurrence and field order

Command

Dtie -t " " a,b,c leaf input-file

Input-file:

stem:1
a:A1
b:B1
c:C1
c:C2
b:B2
a:A2

Result:

stem:1
leaf:A1 B1 C1
leaf:C2 B2 A2

(The leaf field order may not follow the leaf-field-list.)

Format-list and leaf-field-list

Command:

Dtie -t " / " -S "v:/\ :\ /,t,r:/\ ;\ /*" vols

Input-file:

tr:Great Computer Books
v:1
t:The C language
r:B W. Kernighan
r:D M. Ritchie
v:2
t:My Battle
r:Bill Gates

Result:

tr:Great Computer Books
vols:1 : The C language / B W. Kernighan ; D M. Ritchie
vols:2 : My Battle / Bill Gates

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, Duntie, D_lsa D_msg.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003