DSM Template Services Manual
Introduction
DSM Template Services Manual—427187-004
1-5
Procedures
Procedures
You can use these Template Services procedures in applications.
EMSTEXT Procedure
The EMSTEXT procedure structures information in an EMS event message according
to the message’s format template, returning a text version of the message in a buffer. A
format template consists of fixed text with places where token values can appear within
the text—producing an operator message. EMSTEXT is used by printing distributors,
compatibility distributors, and ViewPoint. It can also be called by a user-written
management application. For more information on the EMSTEXT procedure, see the
EMS Manual
.
SPI_BUFFER_FORMATxxxx Procedures
These procedures generate a text display of an SPI event, command, or response
message and return the formatted message in a buffer. xxxx is START_, NEXT_, or
FINISH_. Unlike the operator message that EMSTEXT returns, the
SPI_BUFFER_FORMAT procedures simply list a token label followed by the token
value for each token in the message, in the order they appear in the message. The
DDL definition file of the subsystem or management application that generated the
message determines the information format. The Inspect symbolic debugger and
TMDS use SPI_BUFFER_FORMAT procedures, and they can also appear in user-
written applications. For detailed descriptions, see Section 2, Display-Text Procedures.
SPI_FORMAT_CLOSE_ Procedure
SPI_FORMAT_CLOSE_ closes a template file that an application has open. It is useful
if an application only occasionally uses the template file or if the application needs to
access more than one template file. When an application must access a different
template file, it closes the currently open template file by using
SPI_FORMAT_CLOSE_ and then uses the DEFINE procedures to open a new
template file. You can also use Guardian DEFINE commands to open a new template
file. See SPI_FORMAT_CLOSE_ on page 2-26.
DEFINE Procedures
The DEFINE procedures can link =_EMS_TEMPLATES DEFINE with the name of a
template file. =_EMS_TEMPLATES DEFINE is normally not set, causing applications
to use the default template file installed in the coldload subvolume. Once
=_EMS_TEMPLATES DEFINE is set to a particular template file, however, when
EMSTEXT or the SPI_BUFFER_FORMAT procedures are called, they use this
template file instead of the default templates. For more information on the DEFINE
procedures, see the
Guardian Procedure Calls Reference Manual
,
Guardian User’s
Guide
,
TACL Programming Guide,
and
TACL Reference Manual
.