ASAP 2.7 Extension Manual
Configuring the ASAP Extension
HP NonStop ASAP Extension Manual—425265-004
2-17
Formatting Metric Output
Formatting Metric Output
ASAPX DataItems other than text are stored as 64-bit floating point numbers, and all
metrics are initially computed as 64-bit floating values. The EDL TYPEDATA and
FORMAT properties control how ASAPX treats the data once a metric is computed. If
TYPEDATA is set to something other than REAL64, ASAPX translates the data to the
requested type before storing it in the APP record. If the value is too large to fit in the
requested type or to fit in the specified FORMAT, the field is set to all 9s.
You can set each attribute as TYPEDATA REAL64 and use the FORMAT statement to
control output. For example, FORMAT "I2" outputs a 2-digit integer if TYPEDATA is
REAL64, and FORMAT "F6.2" outputs a decimal value with 2 decimal places.
In versions of ASAPX prior to version 2.4 you were forced to use TYPEDATA REAL64
if you wanted to output a decimal value. You can now define decimal output for
TYPEDATA values of INT, INT32 or INT64. When ASAPX finds a decimal FORMAT
statement with a TYPEDATA of an integer type, it stores the value in the integer in
implied decimal format. For example, if TYPEDATA is INT64, FORMAT is "F6.2" and
the computed metric value is 123.45, ASAPX stores the value in the APP record as
12345.
Be careful using implied decimals with TYPEDATA values of INT and INT32.
Seemingly small numbers can cause an overflow. For example, if TYPEDATA is INT
and FORMAT is "F6.4," a number as small as 3.2767 overflows because ASAPX shifts
the decimal point 4 places to create 32767. INT64 is the recommended TYPEDATA for
implied decimals.
Some database analysis tools (Enform for example) cannot read floating point
numbers from ASAP records. To use those tools, define all user-created numeric
metrics as TYPEDATA INT64. Change ASAPX built-in metrics defined as REAL64 to
INT64.