parse Statement

Added: build 1

Purpose

Parses an output file for array and variable values.

Applicability

The parse command can be used within RunCommands sections.

Syntax

parse <fileName> [failIfNotChanged=true|false]

Arguments

NameDescription
fileName The name of the RowFieldOutputFile or RawOutputFile to parse.

Options

NameDescription
failIfNotChanged If true, indicates that the parse action should fail if the output file has not changed since the last time it was parsed. This may happen if a code silently fails, and an output file exists from a previous run. As of build 172, the default is false.

Example

Suppose the output file section of a component looked like this:

RowFieldOutputFile outFile 
{ 
   fileToParse: xyz.out 

   #          name          type     row  field 
   variable:  totalHeight   double   5    7 
   variable:  totalWeight   double   2    4 
}
This set of statements provides instructions on how to parse a file named "xyz.out", but it does not control when to parse the file. The RunCommands section controls output file parsing. The statements below show that the file should be parsed right after the "myProg.exe" executes.

RunCommands 
{ 
   generate inFile 
   run "myProg.exe xyz.in xyz.out" 
   parse outFile 
}
  

See also Analysis Server | FileWrapper | FileWrapper Statements