max_width

Specifies the maximum number of 8-bit bytes of an imported or exported text-format field. Base your width specification on the value of your -impexp_charset option setting.

If it's a fixed-width charset, you can calculate the maximum number of bytes exactly. If it's a variable length encoding, calculate an adequate maximum width for your fields.

Applies to

Fields of all data types except date, time, timestamp, and raw; record, subrec, or tagged if it contains at least one field of this type.

Syntax


record { max_width =  n  }
 field_definition  { max_width = n };

where n is the maximum number of bytes in the field; you can specify a maximum width of 255 bytes.

This property is useful for a numeric field stored in the source or destination file in a text representation.

If you specify neither width nor max_width, numeric fields exported as text have the following number of bytes as their maximum width:

  • 8-bit signed or unsigned integers: 4 bytes
  • 16-bit signed or unsigned integers: 6 bytes
  • 32-bit signed or unsigned integers: 11 bytes
  • 64-bit signed or unsigned integers: 21 bytes.
  • single-precision float: 14 bytes (sign, digit, decimal point, 7 fraction, "E", sign, 2 exponent)
  • double-precision float: 24 bytes (sign, digit, decimal point, 16 fraction, "E", sign, 3 exponent)

Restriction

On export, if you specify the max_width property with a dfloat field, the max_width must be at least eight characters long.