It is necessary, when sending outbound 3270 data streams, to ensure that a three-byte prefix containing the attention identifier (AID) and cursor address is inserted at the front of the data. Similarly, the first two bytes of inbound data typically contain the 3270 command code and write control character (WCC). The lengths supplied or returned on the FEPI SEND, RECEIVE, or CONVERSE DATASTREAM commands include the length of the prefix.
AID values are the same as the CICS® values and, in pass-through applications, can be taken from EIBAID. The cursor address however is a buffer address and cannot be taken from EIBCPOSN. 3270 buffer addresses can be 12-, 14-, or 16-bit addresses depending on the device. Twelve-bit addressing is the most difficult to convert to or from, but it is very common; an address conversion table and an algorithm are contained in the 3270 Information Display System 3274 Control Unit Reference Summary.
The inbound 3270 command is most likely to be a WRITE or ERASE WRITE and is, therefore, followed by a WCC then orders and data. However, this is not guaranteed and the inbound command should be inspected to determine what it is, what, if anything, should follow it, and how it should be handled. For example, the application may choose to perform an EXEC CICS SEND TEXT from the inbound data and may, therefore, require to know whether to append the ERASE keyword. The various READ commands (such as READ BUFFER and READ MODIFIED) and all the WRITE STRUCTURED FIELD commands (a common one being READ PARTITION with QUERY) need special handling.
If you receive more than one chain (using the UNTILCDEB option), you have to find each inbound command yourself, so this is not recommended unless you know that the back-end system only sends a single chain.
For further information, refer to the 3270 Information Display System Data Stream Programmer’s Reference.
[[ Contents Previous Page | Next Page Index ]]