base.Channel.setDelimiter
Define the value delimiter for a channel.
Syntax
setDelimiter(
delimiter STRING )
- delimiter is the value delimiter to be used.
Usage
After creating the channel object, define the field value delimiter with the
setDelimiter()
method.CALL ch.setDelimiter("^")
The default delimiter is defined by the
DBDELIMITER environment variable,
or a pipe (|
) if DBDELIMITER is not defined.
Specify CSV
as the delimiter to read/write in Comma Separated Value format.
CALL ch.setDelimiter("CSV")
Important: Setting a
NULL
delimiter is allowed for backward
compatibility, but must be avoid: This was a workaround to read/write complete lines. If
the delimiter is set to NULL
, the read()
and
write()
methods do not use the backslash (\
) escape
character. As a result, data with special characters like backslash, delimiter or
line-feed will be written as is, and reading data will ignore escaped characters in the
source stream. If you need to read or write non-formatted data, it is recommended that you use the readLine()
/writeLine()
methods
instead. These methods do not use a delimiter, nor do they use the backslash escape
character.