DSM Template Services Manual

Template Language
DSM Template Services Manual427187-004
3-24
Fill Characters
Some edit codes do not accept a field width or let the user omit the field width. If the
field length is missing, EMSTEXT determines a default field width: namely, the exact
number of spaces required to represent the particular value.
Fill Characters
If an external value requires fewer characters than the field width in the edit code
specifies, EMSTEXT inserts fill characters. Each edit code uses predetermined fill
characters (either zeros or spaces) in a predetermined position (leading or trailing).
Displaying Simple Tokens
Token values can run together in the display text unless you indicate where spaces are
to be added. To maintain adequate spacing for simple token values (that is,
unstructured values not in an array), you can add spaces around the edit markers in
the MSG statement.
Spacing Issue Example
MSG: ZEMS-TKN-EVENTNUMBER, XYZ-EVT-BACKUP-CREATED
"XYZ: Unit running <1> RPM at <2>"
1: XYZ-TKN-A, I
2: XYZ-TKN-B, TIME
The spaces around the edit markers <1> and <2> are necessary to prevent something
such as: XYZ: Unit running 15000 RPM at 23:59.
Another way to ensure adequate value separation is by increasing explicit field widths
where possible. For instance, to represent tokens with integer values that require 2, 3,
and 4 digits respectively, you can use edit codes of I3, I4, and I5. This strategy
provides at least one leading space before each of these values.
Edit Codes for Integer Data Types
To insert an integer value in the display text, use any of these edit codes:
Edit Code Display Base Leading Fill Character
I[n] 10 Space
B[n] 2 Space
O[n] 8 Space
H[n] 16 Space
ZIn 10 Zero
ZBn 2Zero
ZOn 8Zero
ZHn 16 Zero
Brackets [ ] are not part of the syntax. They indicate where the n (for field width) is optional.