DSM Template Services Manual
Template Language
DSM Template Services Manual—427187-004
3-22
Example 1: Unqualified and Qualified *IF Edit
Descriptors
constant
must be in the range of -32768 through 32767 if constant is decimal. If binary
(%B), octal (%O), or hexadecimal (%H), constant must be in the range %H0000
to %HFFFF. constant is used for comparison with the value of the token or field.
Example 1: Unqualified and Qualified *IF Edit Descriptors
1: NOT TOKENPRESENT( ABC-TKN-EQUIP )
2: TOKENPRESENT ( SSID(UVW-VAL-SSID, UVW-TKN-OPERATION) )
Example 2: Conditional *IF Edit Descriptor
This example shows a MSG statement with a conditional edit descriptor:
MSG: zems-tkn-eventnumber,11
"The token value is <1> and the constant is 100. "
"<*IF 2>Jackpot! <*ENDIF>"
1: tfmt-tkn-int
2: tfmt-tkn-int > 100
If the value of ZEMS-TKN-EVENTNUMBER is 11 and the value of TFMT-TKN-INT is
101, this message is generated by the EMSTEXT procedure:
The token value is 101 and the constant is 100. Jackpot!
If the value of ZEMS-TKN-EVENTNUMBER is 11 and the value of TFMT-TKN-INT is
99, this message is generated by the EMSTEXT procedure:
The token value is 99 and the constant is 100.
Example 3: Nested Conditional *IF Edit Descriptors
This example shows nested conditional edit descriptors (see Example 3-10):
MSG: zems-tkn-eventnumber,15
"NESTED COND--"
"<*IF 2>"
"token value (<1>) greater than constant (100):"
"<*IF 3> true side 1 <*ELSE> false side 1 <*ENDIF>"
"<*ELSE>
"token value (<1>) less than constant (100):"
"<*IF 4> true side 2 <*ELSE> false side 2 <*ENDIF>"
"<*ENDIF>"
1: tfmt-tkn-int
2: tfmt-tkn-int > 100
3: tfmt-tkn-int > 150
4: tfmt-tkn-int < 50
The EMSTEXT procedure produces this text if the value of
ZEMS-TKN-EVENTNUMBER is 15 and the value of TFMT-TKN-INT is 101:
NESTED COND--token value (101) greater than constant (100):
false side 1