SPI Programming Manual (G06.24+, H06.03+, J06.03+)

Summary of DDL for SPI
SPI Programming Manual427506-006
B-6
HEADING Clause
HEADING Clause
This clause provides the SPI_BUFFER_FORMAT procedures and Inspect with
information they need to label a token or field value when displaying the contents of an
SPI message.
DISPLAY Clause
This clause provides the edit code that is used when a token or field value is
represented in display text. Include this clause when the DISPLAY clause might make
the value more readable or when the default edit code is not suitable for the token or
field.
Constants
DDL allows the definition of named constants by means of the CONSTANT statement.
DDL translates CONSTANT statements into literals or defines in TAL,
#define
directives in C, level-01 variables in COBOL, and text variables in TACL. This feature
lets the definition files provide symbolic names for frequently used values.
The definition files supplied by HP use CONSTANT statements to define subsystem
numbers (in the SPI definitions only), token data types (in the SPI definitions only),
token numbers, command numbers, object-type numbers, error numbers, and various
other commonly used values.
Type ENUM DEFs
Many integer tokens or fields contain code values with text-string equivalents (for
example, 0, 1, and 2 for stopped, slow, and fast). You can define such a token as a
type ENUM DEF and place the text strings in AS clauses. Then text strings that
represent the integer values can be returned to system procedures that refer to
templates.
Token Types, Token Codes, and Token Maps
Token types, token codes, and token maps are defined in DDL by TOKEN-TYPE,
TOKEN-CODE, and TOKEN-MAP statements, respectively.
In descriptions of commands, responses, event messages, error lists, and common
definitions in the manuals, the internal structure and component data types of each
extensible structured token are shown by giving the associated DEF statement, which
includes a TYPE or PIC clause for each field. Similar information for each simple token
is indicated by including information extracted from the associated TOKEN-CODE
statement, but in a form similar to that of part of a DEF statement. For instance, the
simple token ZSPI-TKN-CONTEXT is listed in command descriptions as:
ZSPI-TKN-CONTEXT token-type ZSPI-TYP-BYTESTRING.