Stream Format

The stream is a byte representation of the screen. The number of bytes that are sent to the application, and received from the application, should be the same as the number of bytes on the screen. That is, the number of bytes should equal the product of screen depth and screen width. For example, if the terminal to which you are connected has a 24 by 80 character screen, the number of bytes that should be flowed to and from the resource adapter is: 24x80 = 1920 bytes.

When providing an input record, you must flow the exact number of bytes on the stream, otherwise the record will be rejected. The byte stream must represent exactly what the screen looks like as seen by the resource adapter. If it does not the record will be rejected.

For each field on the screen, there is a byte preceding the field that represents the attribute byte on a 3270 terminal. On a 3270 screen this byte is displayed as a blank. However, in the byte stream it can contain information about the field. You can select what is placed in this field by specifying an appropriate value in the EPIInteractionSpec setOutputAttributeType method. For example, this byte could contain a blank, which is the base attribute, or it could contain a value which represents the color attribute for that field.

A special option is EPIInteractionSpec.ATTRIBUTE_MARKER. This stores the value EPIInteractionSpec.MARKER_BYTE in that location. This enables a record to locate a field dynamically, without needing prior knowledge of the screen format, for example a BMS map.