Enter—Echo function

The Enter AID requests that ITPECHO perform the standard echo function on the input data from the panel. Essentially, the 3270 fields are stripped out and the remaining content is sent back with a 3270 WRITE command.

ITPECHO assumes that the 3270 in session has at least a 24x80 panel display. After you log on, ITPECHO formats the panel into two logical fields, the top (protected) and the bottom (unprotected). The cursor is placed at the start of the unprotected input field. The protected field actually starts in row 24, column 80 of the lower right corner, and continues into the top half of the panel.

Figure 1 shows an example of the initial ITPECHO panel. When you enter data in the input field, the response will come back to the top of the panel.
Figure 1. Initial ITPECHO panel









  WELCOME TO ITPECHO.  ENTER=ECHO  CLEAR=RESTORE   5/6=STRING REPEAT   9=REPEAT
  ENTER DATA TO ECHO BELOW:









Type in the data to be echoed, starting at the initial cursor position. When you press the Enter key, ITPECHO expects to receive a data stream with the format of the incoming RU, as shown in Figure 2.
Figure 2. ITPECHO incoming data stream
AID

C SBA A command data
where:
AID 1-byte AID indicator
C 2-byte Cursor Position
SBA 1-byte Set Buffer Address command
A 2-byte address of input field that contains the following data:
command ITPECHO 3270 command string
data Incoming “data” echoed.

When ITPECHO receives an Enter AID, it strips the first six bytes from the RU, leaving a data portion. Then, ITPECHO places a 3270 WRITE command string into the output buffer. This string is followed by the data portion stripped off of the incoming RU. If the total length of the command string and data is longer than the allocated buffer size, the data is truncated to fit. You should be aware of this possible truncation when writing IF statements in message generation decks.

The WRITE command string causes the following events to be executed when the terminal receives the message:
  1. The unprotected field is erased.
  2. The protected field is erased up to, but not including, the middle rows that contain permanent operator information.
  3. The data is written starting in row 1, column 1.
  4. The cursor is again positioned at the input field, ready for another message.
If the original panel format was destroyed, such that the entire panel is one large input field, ITPECHO recognizes this and does not strip out too many characters in the input data. The panel format can be destroyed when the attribute bytes are overwritten, perhaps by a long (1920 bytes) message. In fact, the unformatted panel allows you to type more input data than the formatted panel. To restore the panel to its original form, simply press the Clear key.