Utility Package

Using the UTL Package

The objects in the UTL package are divided into three categories:

  • stateful computational objects (CLIMITS object)

  • collector objects (OUTNVP and UTLSTAT objects)

  • stateless functions (UTL object)

Collector objects provide a mechanism to create a snapshot of results (either from stateful objects or from plain program variables) and store those results in tables. Each collector object defines a table schema that is determined by the collector object’s design. The collector objects in the UTL package (OUTNVP and UTLSTAT) follow a common method pattern. The basic execution follows this sequence of operations:

  1. Declare: Create the collector object by using the object declaration statement.

  2. Collect: Use the Collect method to store results in a table. The input arguments of the Collect method are specific to the collector object. For example, the UTLSTAT collector object’s Collect method requires an actual and predicted time series as arguments. It then uses the specified series to compute forecast fit statistics and stores the results in a table. In contrast, the OUTNVP collector object’s Collect method takes an ad hoc numerical scalar or array variable from the user program and stores it in a table. Rows that are collected are automatically appended to the collector’s associated table at the end of each BY group, and the collector object’s saved row set is automatically reset. The Nrows attribute returns the current row count in the collector. A missing value is returned if nothing has been collected. The data, now stored in tables, can then be used to produce reports or for further computations.

Last updated: July 09, 2026