The set buffer address order

The SF and SFE orders place the field they define at the current position in the buffer, and MF modifies the field at this position. Unless the field follows the last character sent (that is, begins in the current buffer position), you need to precede these orders with a set buffer address (SBA) order to indicate where you want to place or change a field.

To do this, you send an SBA order followed by a 2 byte address, as in Figure 1.
Figure 1. SBA sequence
Example of a datastream showing the SBA order, 11, followed by the buffer address for row 2, column 33, C1F0

The address in the figure is a “12 bit” address for position 112 (X'70'), which is row 2, column 33 on an 80-column screen. Counting starts in the first row and column (the zero position) and proceeds along the rows. There are two other addressing schemes used: “14 bit” and “16 bit”. Buffer positions are numbered sequentially in all of them, but in 12 bit and 14 bit addressing, not all the bits in the address are used, so that they do not appear sequential. (The X'70' (B'1110000') in the figure appears as B'110000' in the low-order 6 bits of the rightmost byte of the address and B'000001' in the low-order 6 bits of the left byte.) The IBM® 3270 Information Display System Data Stream Programmer's Reference manual explains how to form addresses.

After an SF, SFE, or MF order, the current buffer address points to the first position in the buffer you did not fill—right after your data, if any, or after the field attributes byte if none.