RowFieldInputFile Statement
Added: build 1
Purpose
Provides instructions on how to generate an input file to the analysis. Treats each input file as a collection of rows and fields.
Syntax
RowFieldInputFile <name>
{
<statements>
...
}
Arguments
| Name
| Description
|
| name
| This is an identifier for the RowFieldInputFile. The identifier is used
by generate statements in the
RunCommands section. A variable with
this name is also automatically created if
autoVars is set to true. Note that this
name does not need to be the same as the file name specified in the
fileToGenerate statement.
|
Applicable Statements
The following statements are valid within a RowFieldInputFile section.
Notes:
- Each RowFieldInputFile must define a templateFile and a
fileToGenerate.
- A templateFile is a master copy of the fileToGenerate.
The Analysis Server will read in the templateFile, substitute values into
it, and then write it out as the fileToGenerate. The templateFile
is never modified by the Analysis Server.
- The setDelimiters and setGroup statements only apply
to variables and arrays defined after the associated statement. These
statements may also be issued multiple times.
- The markAsBeginning and markAsEnd statements are
cumulative. That is, a markAsBeginning statement will start searching
for the new beginning line starting with the previous beginning line.
To start the search from the beginning of the file, first use the
clearMarks statement.
- If the initializationFile is not specified, it will
automatically default to the templateFile. The
initializationFile only needs to be specified if you want
to use a file other than the templateFile to load initial
values.
- Multiple variable or array statements may use the same
name if they are of the same type. Define a variable multiple
times if you want to write the same value to multiple places in a
file.
Example
If you need to create an input file named "in.dat" that has the following structure...
var1 = 5
var2 = 6
var3 = 7
...then the following RowFieldInputFile could be used to generate the file.
RowFieldInputFile inFile
{
templateFile: in.dat.template
fileToGenerate: in.dat
setDelimiters " ="
# name type row field
variable: var1 integer 1 2
variable: var2 integer 2 2
variable: var3 integer 3 2
}
See also Analysis Server |
FileWrapper |
FileWrapper Statements