DSM Template Services Manual
Template Language
DSM Template Services Manual—427187-004
3-29
MSG Edit Code
[scale-factor]
includes a number in the range of -99 through 99, followed by the name of a
numeric DDL constant in the range of -99 through 99.
FORMATDATA edit code can be used with token values of (ZSPI-TDT) FLT, FLT2,
INT, INT2, INT4, UINT, BOOLEAN, as well as TACL types INT, UINT, BOOL, INT2,
and INT$.
Example
This example shows a FORMATDATA edit code:
1:zxxx-tkn-float2val, FORMATDATA (D4.2")
== gives x.xx
MSG Edit Code
The MSG edit code enables the main format template to refer to additional templates.
The additional template to format an actual event message depends on the value of a
token in that message. In effect, you invoke other templates from a main format
template the way you call other procedures from a main procedure. MSG is helpful in
cases in which the form of the display text, as well as its contents, depends on token
values. For an example of such a case and its solution, see Example 3-11 on
page 3-30.
The MSG edit code syntax is:
( token-name )
if present, gives an unqualified token name (in parentheses) to form part of the
template-lookup key.
SSID ( subsystem-ID, token-name )
if present, gives a qualified token name to form part of the template-lookup key.
At execution, the MSG edit code must form a template key, find the (additional) format
template with that key, interpret the format template, and return control to the main
format template. The parameters you supply with the MSG edit code determine which
key MSG uses.
If you omit additional parameters (write MSG only), the token in the edit descriptor
provides all parts of the key: its own subsystem ID, token code, and token value. You
can override parts of this default key by including either an unqualified token name in
parentheses or a qualified token name (with no parentheses). You can omit the
additional parameters only when MSG is used without a structure field reference.
When using MSG with a structure field, you must specify at least the token name.
MSG [ ( { token-name } ) ]
[ ( { SSID ( subsystem-ID, token-name ) } ) ]