DSM Template Services Manual
Template Language
DSM Template Services Manual—427187-004
3-30
MSG Edit Code
You must define any additional format templates referred to by an MSG edit code. As
usual, for each new template, you write a template definition (MSG) statement.
You can use the MSG edit code with token values of (ZSPI-TDT) CHAR, INT, INT2,
INT4, UINT, BOOLEAN, ENUM, BYTE, and TOKENCODE.
These template-definition (MSG) statements demonstrate the use of the MSG edit
code.
If a ZABC-EVT-PROCESS-TERMINATED event occurs, and the value of the
ZABC-TKN-STATUS token is 2, the event message is represented by this display text:
If the value of the ZABC-TKN-STATUS token is 3, the event message displays the
standard text corresponding to the file-system error that occured.
Suppose that EMSTEXT has just received the ZABC-EVT-PROCESS-TERMINATED
message to format. To begin, EMSTEXT must compute the key of the main template:
1. Subsystem ID: “0.0.0.” ZEMS-TKN-EVENTNUMBER, the token with the event
number, is a shared token and therefore has a null subsystem ID.
2. Token code: ZEMS-TKN-EVENTNUMBER
3. Token value: The value of the ZEMS-TKN-EVENTNUMBER token is ZABC-EVT-
PROCESS-TERMINATED in this case.
4. Template type: format.
Example 3-11. Using MSG Edit Codes
==
== Definition of the main template
==
MSG: ZEMS-TKN-EVENTNUMBER, ZABC-EVT-PROCESS-TERMINATED
"ABC: Process terminated < 1>."
1: ZABC-TKN-STATUS, MSG
==
== Definition of additional templates
==
MSG: ZABC-TKN-STATUS, 0
"successfully"
MSG: ZABC-TKN-STATUS, 1
"with undefined externals"
MSG: ZABC-TKN-STATUS, 2
"because insufficient storage was allocated"
MSG: ZABC-TKN-STATUS, 3
"because file-error on $RECEIVE. Error: < 1> (< 2>)"
1: ZABC-TKN-FILEERR
2: ZABC-TKN-FILEERR, MSG ( SSID ( ZCMK-VAL-SSID, ZCMK-TKN-FSERR))
Example 3-12. Display Text for ZABC-EVT-PROCESS-TERMINATED
ABC: Process terminated because
insufficient storage was allocated.