templateFile Statement

Added: build 1

Purpose

Specifies the name of a file that contains the standard format of an input file used by the component's analysis. To create a new input file, the component reads in the template file, substitutes user-supplied values into the appropriate row and field locations, and writes the file.

Applicability

The template file statement can be used within RowFieldInputFile and RawInputFile sections.

Syntax

templateFile: <fileName> 

Arguments

Name Description
fileName The name of the file that is to be used as a template. The name, or parts of it, may be specified at run-time using userVariables. If the full path for the file is not specified, the file is assumed to be located in the same directory as the .fileWrapper file.

Example

To manipulate three input variables the following sections of the FileWrapper file have been created. The input file section describes three variables, volume, length, and height, which are located in the specified rows and fields of an input file associated with some analysis. The inFile section names this input file in the fileToGenerate statement; it is called xyz.in.

When the FileWrapper component executes, it will read in the xyz.template file, replace the variables in the template file with values provided by the user, and write xyz.in based upon the new data. Once the input file exists, the analysis program can read it.

RowFieldInputFile inFile 
{
templateFile: xyz.template
fileToGenerate: xyz.in

# name type row field
variable: volume double 1 2
variable: length double 1 3
variable: height double 2 3
}

See also Analysis Server | FileWrapper | FileWrapper Statements