DSM Template Services Manual

Template Language
DSM Template Services Manual427187-004
3-18
Template Definition (MSG) Statement
An OVERRIDE option governs all event messages that have the event number given
in the MSG statement with the option. The option specifies a token value to be used in
place of the value in the message buffer whenever the specified token code occurs in
these event messages.
Consider the procedures that get token values from an event message buffer. If a
program calls the EMSGET (or EMSGETTKN) procedure to get a token value, the
procedure looks for an override template for the given token code before returning any
token value. If an override template exists, the procedure returns the token value in the
template rather than the token value in the buffer. If no such template exists, it returns
the value in the buffer as usual.
Instead of calling EMSGET (or EMSGETTKN), if a program calls the SSGET (or
SSGETTKN) procedure, any override templates are ignored. SSGET and SSGETTKN
use only the actual values of tokens in the message buffer.
When you use the SPI_BUFFER_FORMAT procedures, you select whether to use
override values when you set the buffer-values-only parameter of
SPI_BUFFER_FORMATSTART_. This parameter determines whether
SPI_BUFFER_FORMATNEXT_ calls EMSGET or SSGET.
Template Keys
Each template, format, or override, has a unique key in the key-sequenced template
file that the Template Compiler produces. Each key consists of:
Subsystem ID. Provided by the SSID statement. The version field of the subsystem
ID is omitted from the key, so templates are not associated with particular releases.
A single compilation can produce templates for one application only.
Token code. Provided by the token-name field of the MSG statement. For more
information, see Main Templates on page 3-19.
Token value. Provided by the token-value field of the MSG statement.
Template type (format or override). Template type depends on the information in
the MSG statement.
MSG statements cause format or override templates to be generated:
°
If one or more template strings are present, the Template Compiler generates a
format template.
°
If one or more OVERRIDE options are present, the Template Compiler
generates one override template that includes the override information for each
token mentioned.
One MSG statement can cause the compiler to create a format template and one
or more override templates.
You must specify all the OVERRIDE options for a given event in the same MSG
statement.