3270 order codes provide additional control function

3270 orders are included in both inbound and outbound data streams to provide additional control function. Table 1 lists the order codes that may occur in 3270 data streams, and shows whether they relate to inbound or outbound data streams, or both.
Table 1. Order codes occurring in 3270 data streams
Order code Inbound Outbound
Start field (SF) Yes Yes
Start field extended (SFE) Yes Yes
Set buffer address (SBA) Yes Yes
Set attribute (SA) Yes Yes
Modify field (MF) No Yes
Insert cursor (IC) No Yes
Program tab (TB) No Yes
Repeat to address (RA) No Yes
Erase unprotected to address (EUA) No Yes
Graphic escape (GE) No No
Note: The 3270 Data Stream Programmer’s Reference states that the SFE, SA, and MF orders are not supported in ASCII. However, they do occur in 3270 data streams for the EPI, where they take the following values:
SFE     X'10'
SA      X'1F'
MF      X'1A'
Each of these orders is followed by one or more attribute type-value pairs. The count of attribute pairs and the attribute type are both binary values, and are thus as defined in the 3270 Data Stream Programmer’s Reference. However, the contents of the attribute value field may vary from those defined in the 3270 Data Stream Programmer’s Reference as follows:
  • If the attribute type is less than or equal to X'C0' (for example, a color), the attribute value is defined as an EBCDIC value in the 3270 Data Stream Programmer’s Reference. The EPI uses the ASCII equivalent of the EBCDIC value; for example, red is defined as X'F2' in the 3270 Data Stream Programmer’s Reference, and should be defined as X'32' in the EPI data stream.
  • If the attribute type is greater than X'C0' (for example, field outlining), the attribute value is a binary value. The EPI uses the values defined in the 3270 Data Stream Programmer’s Reference.
Further details of 3270 orders and other control characters are supplied in the files named in the following table.
  Supplied file
COBOL copybook cics3270.cbl
C header file cics3270.h