removeMissingVariables Statement

Added: build 207

Purpose

Controls how the Analysis Server handles variables that do not exist in files. This setting is designed to allow one FileWrapper to handle multiple applications of a program. For example, consider a program that contains 100 inputs. Each application of the program only requires certain variables to exist in the input file - default values are assumed for the rest. Using the removeMissingVariables statement allows all variables to be defined in the FileWrapper. When the FileWrapper is loaded, only the variables found in the input file will be created.

Applicability

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

Additional Information

Missing variables are only removed when a component is first loaded. For input files, the templateFile (or initializationFile) file is scanned for the missing entries. For output files, the fileToParse file (if present) is scanned. If a variable is not found when the component is executed, an error is still generated.

Syntax

removeMissingVariables: <true|false> 

Example

The following RowFieldInputFile section will ignore variables that are not found in the templateFile.
RowFieldInputFile inFile 
{ 
   templateFile: xyz.template 
   fileToGenerate: xyz.in
   
   removeMissingVariables: true 

   #          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