dbcollate simply constructs an array of segment names, passing it to the DB library function setmsheader (see db(3) ) to create a multi-segment header file. In the first form of the command, orec is the name of the multi-segment (output) record to be created, and the irec arguments are the names of the (single-segment) input records that are to be included in the output record. At least one input record name must be specified.
In the second form of the command,
orec is again the name of the multi-segment (output) record to be created,
and first and last are numbers between 1 and 99999. In this case, orec
must be 3 characters or fewer (longer names are truncated), and the names
of the input records are derived by appending first, first+1, ..., last to
orec (representing first, ..., as 5-digit zero-padded decimal numbers). Thus
the command
dbcollate xyz 9 12
is equivalent to
dbcollate -o
xyz -i xyz00009 xyz00010 xyz00011 xyz00012
Each segment must contain the same number of signals, and the sampling frequency must be the same for each segment. Each input record header must specify its record length (use dbdesc(1) to determine the input record length if necessary, then edit the input record header to include this information before using dbcollate). In most cases you will want to be sure that corresponding signals match in each segment, and that the gains, ADC zero levels, and numbers of samples per frame (see header(5) ) also match. It is not necessary that the signal file formats match, however.
In both forms, -a annotator is optional; if included, it specifies the annotator name of annotation files associated with the input records, files to be concatenated to form a similarly-named annotation file for orec. Note that all of the files to be concatenated must have the same annotator name. It is not necessary that this annotator exist for each input record, however.
In most cases, multi-segment records are indistinguishable from single-segment records, from the point of view of applications built using the DB library (version 9.1 or later). Use xform(1) to generate a single-segment record from a multi-segment record if necessary (for example, to make it readable by an application built using an earlier version of the DB library). Note, however, that older applications can generally be updated without source changes simply by recompiling them and linking them with the current DB library.
The shell variable DB should be set and exported (see setdb(1) ).
This program is included in the DB Software Package, version 9.0 and later.