DELIMITED BY Phrase

This phrase specifies delimiters within the data that control the data transfer.

The delimiters are identifier-2, identifier-3, or their corresponding literals. Each identifier or literal specified represents one delimiter. Each must be an alphanumeric data item.

Unless the DELIMITED BY phrase is specified, the DELIMITER IN and COUNT IN phrases must not be specified.
identifier-2, identifier-3
Each represents one delimiter. Each must be an alphanumeric data item.
IBM Extension

Start of change If either one is a DBCS item, then both must be DBCS items. If either one is a national item, then both must be national items. End of change

End of IBM Extension
literal-1, literal-2
Each must be a nonnumeric literal; each may be any figurative constant except the ALL literal. When a figurative constant is specified, it is considered to be a 1-character nonnumeric literal.
IBM Extension

Start of change If either literal is a DBCS literal, then both must be DBCS literals. If either literal is a national literal, then both must be national literals. The figurative constant SPACE can be used as a DBCS or national literal. End of change

End of IBM Extension
ALL
One or more contiguous occurrences of any delimiters are treated as if they were only one occurrence, and this one occurrence is moved to the delimiter receiving field (if specified). The delimiting characters in the sending field are treated as an elementary alphanumeric item and are moved into the current delimiter receiving field, according to the rules of the MOVE statement.
IBM Extension

If ALL is used with a DBCS or national identifier or literal, the delimiting characters in the sending field are treated as the same type (DBCS or national). They are moved according to the rules of the MOVE statement.

End of IBM Extension

When DELIMITED BY ALL is not specified, and two or more contiguous occurrences of any delimiter are encountered, the current data receiving field is filled with spaces or zeros, according to the description of the data receiving field.

IBM Extension

If the current receiving field is a national item, it is padded or filled as needed with the 'national to national' padding character specified in the NTLPADCHAR compiler or PROCESS statement option.

End of IBM Extension

If a delimiter contains two or more characters, it is recognized as a delimiter only if the delimiting characters are contiguous, and in the sequence specified in the sending field.

When two or more delimiters are specified, an OR condition exists, and each nonoverlapping occurrence of any one of the delimiters is recognized in the sending field in the sequence specified. For example, if DELIMITED BY "AB" or "BC" is specified, then an occurrence of either AB or BC in the sending field is considered a delimiter; an occurrence of ABC is considered an occurrence of AB. The data-count fields, the pointer field, and the field-count field must each be an integer item without the symbol P in the PICTURE character-string.