Skip to content

TSTool / Command / ReadStateCUB


The ReadStateCUB command reads time series from a StateCU binary output time series file. See the StateCUB Input Type Appendix. The actual reading occurs as the commands are being processed. For this reason and because the number of time series in the binary file is usually large, if any other commands reference the StateCU binary file time series, the time series identifiers must be specified manually or use wildcards in identifiers (identifiers are not available to list in dialogs). Only data types that contain floating point numbers are read.

Command Editor

The following dialog is used to edit the command and illustrates the syntax of the command.


ReadStateCUB Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:


Command Parameters

Parameter            Description Default                           
The name of the StateCU binary time series file to read. The path to the file can be absolute or relative to the working directory. Can use ${Property} notation. None – must be specified.
TSID Time series identifier pattern to filter the read. Can use ${Property} notation. Read all time series.
InputStart The starting date/time to read data, specified to Month precision. Can use ${Property} notation. Read all data.
InputEnd The ending date/time to read data, specified to Month precision. Can use ${Property} notation. Read all data.
OutputVersion The file format version to be used for output:
  • Original - use the original format without translation
  • Latest - use the latest format (same as 14)
  • 14 - use StateCU version 14 format
This allows translating one binary file's contents to a different version, which is useful for automated testing and ensuring that processes work the same regardless of the input format. See the table below for details.
No translation occurs.

The following table lists translations that occur if OutputVersion is used.

OutputVersion Parameter Data Translations

OutputVersion Translations
  • Location identifier TO is changed to TOTAL.


See the automated tests.

The following example command file illustrates how to read all CU Shortage time series:

ReadStateCUB(InputFile="Data\farmers.BD1",TSID="*.*.CU Shortage.*.*")

The following example illustrates how to read all time series from a binary file with debug turned on to echo all information that is read.



See Also