DSM Template Services Manual
Template Language
DSM Template Services Manual—427187-004
3-32
MSG Edit Code
These statements result in display text such as:
Maintenance needed on air conditioning
at Headquarters Annex, Room 60.
A walk-through of the way EMSTEXT uses these templates to build display text should
help demonstrate which MSG statements you need for other messages with
enumerated labels. EMSTEXT goes through steps such as:
1. In an event message, suppose that ZSPI-TKN-SSID = ZABC-VAL-SSID, ZEMS-
TKN-EVENTNUMBER = ZABC-EVT-EQUIP-MAINTENANCE, ZABC-MAP-INFO
field EQUIP = 1, and field LOC = 3.
2. EMSTEXT finds the main template for the event message with these key parts:
•
Subsystem ID: ZABC-VAL-SSID
•
Token code: ZEMS-TKN-EVENTNUMBER
•
Token value: ZABC-EVT-EQUIP-MAINTENANCE
•
Template type: format
Within this template is the template string “Maintenance needed on <1> at <2>.”
3. EMSTEXT must substitute an enumerated label representing ZABC-MAP-
INFO.ZABC-DDL-INFO.EQUIP (namely, 1) for <1>. Because the edit code for <1>
is MSG, EMSTEXT looks for another template (key: token code ZABC-TKN-
EQUIP, token value 1).
4. After retrieving the template, EMSTEXT substitutes the template string “air
conditioning “ for <1>. (If “air conditioning” contains another edit marker, the
process of interpretation and substitution continues.)
5. EMSTEXT follows a similar process to substitute “Headquarters Annex, Room 60”
for 3 (the value of ZABC-MAP-INFO.ZABC-DDL-INFO.LOC).
All these keys have a subsystem ID of ZEMS-VAL-SSID and a template type of format.
Example 3-13. MSG Statements for Structure Fields
MSG: ZABC-TKN-EQUIP, 1
"air conditioning "
MSG: ZABC-TKN-EQUIP, 2
"laser printer "
MSG: ZABC-TKN-LOC, 1
"Engineering Building, Room 905"
MSG: ZABC-TKN-LOC, 2
"Marketing Building, Room 205"
MSG: ZABC-TKN-LOC, 3
"Headquarters Annex, Room 60"
MSG: ZEMS-TKN-EVENTNUMBER, ZABC-EVT-EQUIP-MAINTENANCE
"Maintenance needed on <1> at <2>."
1: ZABC-MAP-INFO.ZABC-DDL-INFO.EQUIP, MSG(ZABC-TKN-EQUIP)
2: ZABC-MAP-INFO.ZABC-DDL-INFO.LOC, MSG(ZABC-TKN-LOC)