EMS Manual

Generating Standard Events
EMS Manual426909-005
10-25
Task 8.11: Define Private Tokens
Determine whether your token is a simple or extensible structured token:
A simple token contains a single field or multiple fields in a fixed structure. A simple
token cannot be extended. Extension is done by adding other tokens.
Use simple tokens whenever possible.
An extensible structured (MAP) token is a structure that lets new fields be added in
subsequent versions of the subsystem.
Defining a Simple Token
Define your simple tokens using the DDL TOKEN-CODE statement:
Token number (required). Define your token numbers:
Name your token number as ss-TNM-tokenname. For example, if your token
name is ZSAM-TKN-mytoken1, your token number should be called ZSAM-
TNM-mytoken1.
Assign a unique value—from 1 through 9998—to each of your token number
names.
Define your token numbers in one place—in token-number definitions.
Token type (required). If your token is an enumerated token or fixed structure,
define your own token type (for example, ZSAM-TYP-tp-diagcode); otherwise use
a standard SPI token type (for example, ZSPI-TYP-STRING or ZSPI-TYP-INT).
Specifying your own token type lets you provide a DDL DEF for your token. The
DDL DEF lets you define the “89 enumeration clause” for your enumerated token
or the fields for your structure token. Define your token type with the DDL
TOKEN-TYPE statement:
Token-data-type. You must build your token type from one or more of the
standard SPI token data types like ZSPI-TDT-ENUM.
DDL DEF. Specify the DDL definition that defines the structure and length of
your token.
Standard SPI token types and standard SPI token data types are defined in the
ZSPIDDL file and described in the SPI Programming Manual.
SSID clause. Specify your external SSID unless your token is shared with other
subsystems.
HEADING clause. Provide a heading that briefly describes your token. This lets
programs like INSPECT display more descriptive information for your tokens.
Defining a MAP Token
Define your extensible structured token using the DDL TOKEN-MAP statement:
Token-number. See Defining a Simple Token.