Logic testing

You can use the IF statement to perform logic tests for 3270 terminals on two different forms of the data. You can specify a logic test in a terminal's screen image buffer by coding the B+, B-, C+, C-, or (row,col) location options on an IF statement. This type of logic test operates on the data as it would be displayed at a real terminal. Since bits 0 and 1 of attribute bytes are always zero in the screen image buffer, you can test bits 2 through 7 of an attribute byte using one of the above location options. All logic tests on a screen image buffer are performed after the buffer has been modified according to the message generated or data received. If a received message contains invalid commands or orders, the screen image buffer is not modified, but any active logic tests are still performed.

You can specify a logic test on an incoming or outgoing data stream, including headers, commands, and orders, by coding the D+, TH+, RH+, or RU+ location option on an IF statement. The TH+, RH+, and RU+ options are valid only for 3270 SNA terminals. You can use one of these options to perform a logic test on a start field (SF) order and its following attribute byte.

See Logic test examples for scripts coded with logic tests.