Dfd - Field description

SYNOPSIS

Dfd [ -g key-field-list ] [ -k key-flags ] [ input-file.. ]

DESCRIPTION

Dfd reads D-records from the input-file and creates a set of field description records, which reports the name and attributes of a field in the input file. Typically, output of Dfd is piped to Dpr to read the result.

By default Dfd writes a set of field description record at each end of input-file. Every field in the input-file is described by a field description record.

When -g option is specified, Dfd creates field description records for each group of D-records which has same key value. These group by key fields are not described by field description records. Only the fields in the present group are included in the field description records.

Record order of Dfd follows the field order of input D-records. If the all input records have same field order (for example "a", "b", "c"), output record order is in that sequence (first record for field "a", second record for field "b", and then "c"). When field order of input records is various, Dfd tries to find out the "natural" sequence.

OPTIONS

-g key-field-list
group by keys; field description records are created for each group of records having same key value.
-k key-flags
default key-flags for the key-field-list. See the manual of Dintro.

OUTPUT RECORD

Each output record has following fields in that order.

filename:
input file name in the form of a command argument after globbed by the shell. This field does not exist when the input file is the standard input.
group by key fields
when -g option is given; fields listed in key-field-list; values may be altered depending on key flags.
fieldname:
name of the concerned field.
min:
minimum occurrence of the concerned field. If this value is zero, one or more records lack the concerned field.
max:
maximum occurrence of the concerned field. If this value is greater than one, the concerned field is repeating field.
exists:
value of this field consists of two numbers separated by "/". The first part is the number of D-records which has the concerned field, and the second part is total number of D-records in the input file. These two parts have same number if min value is not zero.
minlen:
minimum length (number of characters) of the concerned field.
maxlen:
maximum length (number of characters) of the concerned field. If the minlen and maxlen have same value, the concerned field is fixed length.
avglen:
average length (number of characters) of the concerned field.
attribute:
shows numeric/string class attributes of the concerned field. This field exists only when the concerned field has data (i.e. maxlen is not zero). See the following subsection.
position:
denotes relative position of the concerned field. Value "split" means the concerned field appears more than once in a record and in split position. This implies the concerned field may be used in a repeating group. This field exists only when the concerned field is "split".

Attribute

Dfd inspects all the values of the concerned field and reports a numeric attribute when they are regarded as numeric. Otherwise it reports string attribute.

Numeric attribute is one of following:

Int
non negative decimal integer.
Int-
integer including negative vaue(s).
Num
numeric value including decimal point or floating point notation (e.g., .3141593e01).
Hex
hexadecimal value, or string including only 0-9, A-F and a-f. Note that value "Ace" or "Fee" is regarded as hexadecimal.
Hex/Num
hexadecimal or numeric. For example, value "4E01" can be hexadecimal and floating notation for 4.0.

In UNIX EUC environment, string attribute has a value consists of one or more words from next list, possibly with a sign "+".

csN
means the value has code set N charcters. Code set 0 is ASCII characters, and other code sets depend on the locale.
Nprt
means the value has non printing character.

In Windows, string attribute has a value consists of one or more words from next list, possibly with a sign "+".

Asc
means the value has ASCII characters.
NAsc
means the value Non ASCII characters.
Nprt
means the value has non printing character.

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, Drc, D_msg.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003