Coding the TEXT statement

The TEXT statement defines the messages that simulated resources transmit to the system under test. For example, to simulate an operator logging on to the system under test, you would complete the required TEXT statement fields in the appropriate syntax, as shown in the example below.
DECK1   MSGTXT
*                   Sample Message Generation Deck
*   This message generation deck begins with the MSGTXT statement
*   and ends with the ENDTXT statement.  The TEXT statements
*   make up the body of the deck.
*
LOGON1  TEXT  (ID1523)   System user ID to be sent from simulated
*                        resource to system under test.
LOGON2  TEXT  (PW1523)   System password to be sent from simulated
*                        resource to system under test.
        ENDTXT           Sends LOGON2 and specifies end of DECK1.
This message generation deck is complete. The MSGTXT and ENDTXT statements mark the beginning and end of the deck as required by WSim, and the TEXT statements define data to be sent to the system under test.

The first text statement, however, does not actually cause WSim to send the message. When WSim processes a TEXT statement, it stores the message in the terminal buffer. This message remains in the buffer until another statement causes WSim to send the message. In the sample message generation deck, WSim places the first message, ID1523, in the terminal buffer when it processes the first TEXT statement. The second TEXT statement causes WSim to send the first message and interrupts message generation. When the device reenters message generation, WSim places the second message, PW1523, in the terminal buffer. Then WSim processes the ENDTXT statement, which sends the second message to the system under test and ends this pass through message generation for the device.

You can also code a WAIT statement in addition to the TEXT statements in the sample deck. As discussed in the following section, a WAIT statement also causesWSim to send messages to the system under test.