Note: For fields with data type J, the shift-out and shift-in pairs between the
concatenated fields are removed from the resulting field. If the resulting
data type is hexadecimal, the shift-out and shift-in pairs are eliminated for
DBCS fields that precede the first hexadecimal fields.
v A DBCS-graphic field can be concatenated only with another graphic data type
v The OS/400 program assigns the data type based on the data types of the fields
that are being concatenated. When bracketed-DBCS fields are included in a
concatenation, the general rules are:
– If the concatenation contains one or more hexadecimal (H) fields, the resulting
data type is hexadecimal (H).
– If all fields in the concatenation are DBCS-only (J), the resulting data type is
– If the concatenation contains one or more DBCS (O, E, J) fields, but no
hexadecimal fields, the resulting data type is DBCS-open (O).
v The OS/400 program assigns the field to be fixed length or variable length based
on the fields that are being concatenated. The general rules are:
– Concatenation of a variable length field to either a fixed length field or
another variable length field results in a variable length field.
– Concatenation of a fixed length field to a fixed length field results in a fixed
length field unless the VARLEN keyword is also specified on the same field
as the CONCAT keyword.
v The maximum length of a concatenated field varies depending on the data type
of the concatenated field and the length of the fields being concatenated. If the
concatenated field is zoned decimal (S), its total length cannot exceed 31 bytes; if
it is character (A) or DBCS(O, J), its total length cannot exceed 32 766 bytes. If
the concatenated field is variable length, its total length cannot exceed 32 740
bytes (32 739 if the field also allows the null value).
If the concatenated field is a DBCS-graphic (G) field, its total length cannot
exceed 16 383 characters. If the concatenated field is variable length, its total
length cannot exceed 16 370 characters.
v In join logical files, the fields to be concatenated must be from the same physical
file. The first field specified on the CONCAT keyword identifies which physical
file is used. The first field must, therefore, be unique among the physical files on
which the logical file is based, or you must also specify the JREF keyword to
specify which physical file to use.
v When one or more of the fields being concatenated are DBCS fields, none of the
fields on the CONCAT keyword can be specified as a key, select, or omit field
unless the field name is also specified in positions 19 through 28 or on a
RENAME or CONCAT keyword specified before the DBCS concatenation.
v The usage of a concatenated field must be I (input only).
v REFSHIFT cannot be specified on a concatenated field that has been assigned a
data type of O or J.
Figure 459 shows how to specify the CONCAT keyword on the DDS coding
OS/400 DDS Reference V4R5