Coding the TEXT statement
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.