ABSTRACT

We shall see that the use of TEST Blocks will greatly expand our programming ability. There are two basic forms of the TEST Block that we will learn in this chapter.

This form of the TEST Block is as follows:

TEST R A,B

where R is called a conditional operator that is one of the following:

The conditional operator must be placed only one space after the word TEST. A and B are any SNAs to be tested via the conditional operator. Some examples of the TEST Block are as follows:

(a) TEST E Q(TOM),Q(BILL) (b) TEST NE R(DOCK),4 (c) TEST L FR(MACH),400 (d) TEST G W(BACK1),1 (e) TEST E N(BLOCKA),N(BLOCKB)

The explanation for the way the TEST Block works when a transaction enters is that the first SNA is compared with the second using the conditional operator. If the test is true, the transaction moves to the next sequential Block. If the test is false, the transaction

must wait in the TEST Block until some future time when the test becomes true. In addition, the transaction remains on the current events chain.