DSM Template Services Manual

Display-Text Procedures
DSM Template Services Manual427187-004
2-12
SPI_BUFFER_FORMATNEXT_
Many conversion methods are missing from Table 2-1. For instance, you cannot select
file-name or timestamp conversions through a DISPLAY clause. (You can select these
methods through other means.)
In DISPLAY codes, the presence of a decimal point followed by a number (the .m in
Iw.m, as in I3.2) affects the fill character in the representation. If the .m is present,
leading zeros are used as fill characters. Otherwise, leading spaces are used. The
value of the number m means nothing, but it must be less than or equal to w, the field
width, to avoid a DDL diagnostic.
Representation of Token Values
A token value can have various representations that reflect different conversion
methods and styles of presentation. The particular representation the
SPI_BUFFER_FORMAT procedures use for a given token value depends on one or
more of:
Procedure parameters. The numeric-format and type-override procedure
parameters for SPI_BUFFER_FORMATSTART_ modify or override the way
SPI_BUFFER_FORMATNEXT_ represents tokens.
The tokens DDL DISPLAY clause. If present and not overridden by procedure
parameters, a DISPLAY clause controls the representation. However, as discussed
earlier, certain common conversion methods cannot be selected by the DISPLAY
clause.
The token data type. If a DISPLAY clause is missing and procedure parameters do
not provide directions or defaults, the token data type dictates the representation.
Representation Determined by Token Data Type
If formatting directions are not provided by DISPLAY clause or procedure parameter,
the tokens representation depends on its token data type. The results of arithmetic
comparisons are defined only for the INT data type. In particular, the results of a
comparison of BYTE values are undefined.
Zw Integer to hexadecimal Leading spaces
Zw.m Integer to hexadecimal Leading zeros
Aw Character string Trailing spaces
Table 2-1. DISPLAY-Clause Conversion Methods (page 2 of 2)
DISPLAY Code Conversion Method Fill Character