Generating messages for display terminals
In general, WSim does not perform any operations on the data stream of a terminal after completing the line control processing required to transmit or receive a message. However, for 3270 and 5250 (LU7) display terminals, WSim performs full buffer simulation by maintaining in storage an image of the display screen for the terminal. For received messages, WSim interprets the commands and data stream orders for these terminals and automatically updates the screen image as required. For transmitted messages, WSim automatically builds the correct data stream from the buffer image.
WSim provides several message generation statements that are valid for display terminals only. Most of these statements represent keys that an operator strikes at a terminal. These key simulation statements are listed in How delimiters are classified under the item "Delimiters for Specific Simulated Devices".
Message generation for a display terminal continues until the attention identifier (AID) is set and a subsequent delimiter statement is encountered. When one of the key simulation statements is encountered during message generation and the AID has not been set for the terminal, the statement is processed as a control statement and message generation continues until a delimiter statement is encountered.
If the AID has already been set when a key simulation statement is encountered, the key simulation statement itself acts as a delimiter that interrupts message generation. It is not processed until the next pass through message generation for the terminal.
WSim maintains the position of the cursor for a display terminal. When you specify data to be entered in the terminal buffer with a TEXT statement, the data is entered by WSim at the current cursor position. You can move the cursor without entering data by using the cursor positioning statements such as BTAB, CTAB, CURSOR, TAB, and HOME. If you move the cursor in this manner, WSim assumes that more data is to be entered into the buffer; data from a subsequent TEXT statement is placed in the buffer without sending any data already in the buffer to the system under test.
If you code two consecutive TEXT statements for a display terminal, WSim assumes that an ENTER statement (for 3270 and 5250) is between them. The first TEXT statement puts data into the terminal buffer, the implied ENTER or SEND sets the AID, and the second TEXT statement acts as a delimiter and ends the current pass through message generation.