Sign in

docs DDS Display

Length (positions 30 through 34)

Length (positions 30 through 34)

The length of a field containing bracketed-DBCS data can range from 4 through 32 763 bytes. The length of a DBCS-graphic field can range from 1 through 16 381 characters.

When determining the length of a DBCS field, consider the following rules:

  • Each DBCS character is 2 bytes long.
  • For DBCS-graphic fields, the length of the field is specified in number of DBCS characters.
  • Include both shift-control characters in the length of the field for fields with a data type of J, E, or O. Together, these characters are 2 bytes long.
  • Fields specified with the J or E data type or keyboard shift must have an even length.

For example, a bracketed-DBCS field that contains up to 3 DBCS characters, 1 shift-in character, and 1 shift-out character, has 8 bytes of data:

(3 characters x 2 bytes) + (shift-out + shift-in) = 8

A DBCS-graphic field that contains up to 3 DBCS characters has 6 bytes of data:

(3 characters x 2 bytes) = 6