ILE COBOL Language Reference

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--------------------------------+

If either one is a DBCS items, then both must be DBCS items.

+----------------------------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--------------------------------+

If either literal is a DBCS literal, then both must be DBCS literals. The figurative constant SPACE can be used as a DBCS literal.

+----------------------------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 identifier or literal, the delimiting characters in the sending field are treated as DBCS items. 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.

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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]