.type subst.tst
.type This generates 5 WARNINGS and 4 ERRORS
.first title SUBSTITUTION TEST
.FL SUBSTITUTE
.flags substitute
.DEFINE SUBSTITUTE /A1/This is a very long substitution. does it work?
.define substitute /A2/1$A12$A13$A14$A15$A16$A17$A18$A1
.define substitute /AB/ AB substitution
.br
.type *** This substitution will cause WARNING 1
.define substitute /Abcd/ ABCD substitution
.type *** This substitution will cause WARNING 2
.define substitute /A/ A substitution
.type *** This substitution will cause WARNING 3
.define substitute /ABCDE/ ABCDE substitution
.type *** This substitution will cause WARNING 4
.define substitute /ABC/ ABC substitution
.type *** This substitution will cause WARNING 5
.define substitute /ABCDEF/ ABCDEF substitution
.NO FILL
_.NO FILL
TEST CASE CONVERSION
 
_$A (No substitution prodiced)
$A
_$ABCD
$ABCD
.type *** The following is undefined ERROR 1
$a
_$Abcd
$Abcd
$A
$AB
$ABC
$ABCD
$ABCDE
$ABCDEF
$A1
.s
AA$A2
.type *** The next line is a DUPLICATE SUBS. ERROR 2
.DEFINE SUBSTITUTE /A/ duplicate substitution
.s
.DISABLE SUBSTITUTION
.S
$A (no subs only A appears)
.ENABLE SUBSTITUTION
.S
MULTIPLE LEVELS OF SUBSTITUTION TEST
.s
.DEFINE SUBSTITUTE @L1@First level 
.DEFINE SUBSTITUTE /L2/Second level $L1 
.DEFINE SUBSTITUTE /L3/Third level $L2 
.DEFINE SUBSTITUTE /L4/Fourth level $L3 
$L1
$L2
$L3
.type *** The following is (too many nestings) ERROR 3
$L4
.S
.type *** The following is ERROR 4
Undefined substitution test $E
.s;_.FILL
.S.FILL
AA$A2$A2$A2$A2$A2$A2
.delete substitute /L2/
.define substitute /L2/This is not an error
.reset substitute
.define substitute /L1/This is not an error
