setDelimiters Statement

Added: build 1

Purpose

Specifies the character delimiters used to divide the rows within a file into fields.

Applicability

The setDelimiters statement can be used within RowFieldInputFile and RowFieldOutputFile sections.

Additional Information

Syntax

setDelimiters "<string>"

Arguments

NameDescription
string A list of characters to be treated as separators. The backslash character must be prepended to escape characters. For example, use "\t" to represent the tab character, and "\\" to represent the backslash character.

Example

For an input file that has two lines as follows:
   variable1, variable2=2.00, 4.00
   variable3 1.00, variable4=12

the user would like to access the four available variables. There are several ways to specify delimiters for the given lines. Using the statement

   setDelimiters " "
specifies that only spaces will be used as delimiters. In this case, the values for variable2 and variable4 cannot be located. A better approach is to use
   setDelimiters " ,="
which will enable the user to specify the location of the values of all four variables.

Special Values

As of build 187, special values can be used for the delimiters string to perform different actions:
   setDelimiters none
   setDelimiters whitespace
   setDelimiters default
   setDelimiters columns
Note: the "columns" value can be used in all builds.

Value Meaning
none Sets the delimiters to nothing. The result is that the entire line in a file is treated as a single value.
whitespace, default Resets the delimiters to the default values: whitespace. Whitespace characters are spaces, tabs and new lines.
columns Sets the parsing routines to parse based on columns rather than fields.

See also Analysis Server | FileWrapper | FileWrapper Statements