[ Previous |
Next |
Contents |
Search ]
3270 Host Connection Program 2.1 and 1.3.3 for AIX: Guide and Reference
HCON Display Emulation
HCON supports the emulation of a 3270 display session in Models 2, 3, 4, and 5. The display session can communicate with System/370 host processors using the 3270 data stream architecture. Some display models might not be available in certain ASCII displays.
The connection to a mainframe host can be:
- 3 x 74 connection in DFT mode (SNA and non-SNA supported)
- TCP/IP connection
- SNA standalone connection
The 3270 data stream architecture includes:
For a detailed description of data stream architecture, see the 3270 Information Display System Data Stream Programmer's Reference.
3270 Data Stream Attributes
The 3270 display session supports field attributes, extended field attributes, and character attributes.
Field Attributes
The bit assignments for field attributes supported by 3270 display sessions include:
EBCDIC Bit |
Field Description |
0,1 |
Value determined by contents of bits 2-7. |
2 |
0 = Unprotected 1 = Protected |
3 |
0 = Alphanumeric 1 = Numeric* Note: Bits 2 and 3 set to 1 can cause an automatic skip. |
4,5 |
00 = Display/not cursor-select-key detectable 01 = Display/cursor-select-key detectable 10 = Intensified display/cursor-select-key detectable 11 = Nondisplay, nonprint, nondetectable |
6 |
Reserved |
7 |
Modified Data Tag (MDT); identifies modified fields during Read Modified command operations. 0 = Field has not been modified. 1 = Field has been modified by the operator. Can also be set by program in data stream. |
*Numeric field is not enforced. It is treated as an alphanumeric field. |
Extended Field Attributes
These attribute types and attribute values are used in the Start Field Extended (SFE), Modify Field (MF), and Set Attribute (SA) orders.
Attribute Type |
Code |
SFE, MF Orders |
SA Orders |
Character Attribute Reset |
X`00' |
- |
x |
Field Attribute |
X`C0' |
x |
- |
Extended Highlighting |
X`41' |
x |
x |
Color |
X`42' |
x |
x |
Programmed Symbols |
X`43' |
x |
x |
Background Transparency |
X`46' |
x |
x |
Note: Lowercase x indicates the type code is valid when used in the order. |
Valid attribute values for each attribute type code.
Type |
Value |
Result |
X`00' |
X`00' |
This is the only valid setting for this attribute type. All character attributes that can be specified in SA order are set to default value. |
X`C0' |
|
The codes appearing here have the same format as that of the field attribute codes preceded by the SF order. |
X`41' |
X`00' X`F1' X`F2' X`F4' |
Default (Normal) Blink Reverse Video Underline |
X`42' |
X`00' X`F1' X`F2' X`F3' X`F4' X`F5' X`F6' X`F7' |
Default (Green) Blue Red Pink Green Turquoise Yellow White |
X`43' |
X`00' |
Default (Base Character Set) |
X`46' |
X`FF' |
Non-Transparent |
3270 Data Stream Commands
The 3270 data stream commands include:
Command |
Mnemonic |
Hex Line Code |
write |
WR |
F1 |
erase/write |
EW |
F5 |
erase/write alternate |
EWA |
7E |
erase all unprotected |
EAU |
6F |
read modified |
RM |
F6 |
read modified all |
RMA |
6E |
read buffer |
RB |
F2 |
write structured field |
WSF |
F3 |
The definitions of the 3270 data stream commands are:
write (WR) |
Sends orders or data to update the display screen. Data characters are stored in successive buffer locations until an order is received in the data stream that alters the buffer address, or until all data has been received.
Note: The write command must be followed by a Write Control Character (WCC). A WCC Reset bit with the write command is not effective.
|
erase/write (EW)
erase/write alternate (EWA) |
Clears the screen before the write operation is started. The write operation starts from the buffer address 0.
Note: The erase/write command must be followed by a Write Control Character (WCC). If the WCC Reset bit is used, the Inbound Reply Mode is reset to Field.
|
erase all unprotected (EAU) |
Performs the following:
- Clears all unprotected character locations and associated character attributes.
- Resets the Modified Data Tag (MDT) bit in each unprotected field.
- Unlocks the keyboard.
- Resets the Attention Identifier (AID) to X`60'.
- Repositions the cursor to the first character space in the first unprotected field.
If the screen is unformatted or contains only the protected field, the cursor will be repositioned to buffer address 0. |
read modified (RM) |
Initiates one of five operations:
- Read modified
- Short read
- Cursor select
- Test request read
- Inbound retry
When issuing the read modified command as unsolicited, the inbound transmission will be in a complete read modified format with an AID of X`60'. Issue the read modified command to try an inbound transmission again. If issued while the display is in a retry state, the read modified command causes the original inbound operation to repeat. |
read modified all (RMA) |
Operates like the read modified command except both addresses and data from all modified fields are sent to the host, regardless of the AID byte generated. The read modified all command is available only in the SNA environment. |
read buffer (RB) |
Causes all data in the display buffer to be transmitted inbound. The read buffer command is provided for diagnostic purposes. |
write structured field (WSF) |
Enables the user to send one or more structured fields. |
Write Control Characters
The Write Control Character (WCC) bits have these definitions.
WCC Bit |
Explanation |
0 |
No function. |
1 |
No function for the WR command. Reset function, if set to 1, for EW and EWA commands. |
2, 3 |
Reserved. |
4 |
Starts printer (SNA only). When set to 1, initiates a local-copy operation at the completion of the write operation. |
5 |
Sounds alarm. When set to 1, causes the audible alarm to sound. |
6 |
Restores keyboard. When set to 1, causes keyboard operation to be restored (by resetting system lock or WAIT indicator) and resets AID to X`60'. |
7 |
Resets MDT bits in field attributes (WR command only). When set to 1, causes MDT bits to be reset to 0 in all field attribute bytes before any orders or data characters are processed. |
3270 Data Stream Orders
An HCON display session supports these 3270 data stream orders.
Order |
Mnemonic |
Hex Line Code |
Set Buffer Address |
SBA |
11 |
Start Field |
SF |
1D |
Start Field Extended |
SFE |
29 |
Modify Field Attribute |
MF |
2C |
Set Attribute |
SA |
28 |
Insert Cursor |
IC |
13 |
Program Tab |
PT |
05 |
Repeat to Address |
RA |
3C |
Erase Unprotected to Address |
EUA |
12 |
The 3270 data stream orders perform the following operations:
Set Buffer Address (SBA) |
Sets the current buffer address to the value specified in bytes 1 and 2. The display session supports 12-, 14-, and 16-bit addressing. The SBA format is:
Byte |
Content |
Description |
0 |
X`11' |
SBA Order Code |
1-2 |
X`....' |
New, Current Buffer Address |
|
Start Field (SF) |
Starts a new field by placing a basic field attribute character at the current buffer address of the display. The buffer address is incremented by 1. The attribute position is displayed as a blank. The extended field attribute for this position is set to X`00'. The SF format is:
Byte |
Content |
Description |
0 |
X`1D' |
SF Order Code |
1 |
X`..' |
Basic Field Attribute |
|
Start Field Extended (SFE) |
Enables the user to define the start of a field and to assign these attributes:
- Basic field
- Extended highlighting
- Color
- Programmed symbol
- Background transparency
The attribute character is stored at the current buffer address. The buffer address is incremented by 1. Any attribute type not specifically defined in the SFE order has its value set to binary zeros. If Byte 1 contains X`00', all attribute types are set to the default value.
Byte |
Content |
Description |
0 |
X`29' |
SFE Order Code |
1 |
X`..' |
Number of Type/Value Pairs (N) |
2 |
X`..' |
Attribute Type |
3 |
X`..' |
Attribute Value |
... |
... |
|
2N |
X`..' |
Attribute Type |
2N+1 |
X`..' |
Attribute Value |
|
Modify Field Attribute (MF) |
Enables the user to selectively change these attributes at the current buffer address:
- Basic field
- Extended highlighting
- Color
The attribute types not selected in the MF order maintain the same values. The buffer address is incremented by 1. The MF format is:
Byte |
Content |
Description |
0 |
X`2C' |
MF Order Code |
1 |
X`..' |
Number of Type/Value Pairs (N) |
2 |
X`..' |
Attribute Type |
3 |
X`..' |
Attribute Value |
... |
... |
|
2N |
X`..' |
Attribute Type |
2N+1 |
X`..' |
Attribute Value |
|
Set Attribute (SA) |
Enables the user to change these attributes at the current buffer address:
- Extended highlighting
- Color
- Programmed symbol
- Background transparency
The SA order also enables the user to set the same attributes to the default values. The specified attribute is associated with all subsequent data characters in the outbound data stream until another write-type command is transmitted or a new SA order changes the attribute. The SA format is:
Byte |
Content |
Description |
0 |
X`28' |
SA Order Code |
1 |
X`..' |
Attribute Type |
2 |
X`..' |
Attribute Value |
|
Insert Cursor (IC) |
Sets the current cursor position to the current buffer address. The current buffer address remains unchanged. The IC format is:
Byte |
Content |
Description |
0 |
X`13' |
IC Order Code |
|
Program Tab (PT) |
Advances the current buffer address to the address of the first character of the next unprotected field. If you issue the PT order when the current buffer address is the location of an attribute byte of an unprotected field, the buffer address advances to the next location within that field. If the PT order in the write data stream does not follow a command, order sequences such as WCC nulls are inserted into the buffer. The nulls are inserted from the current buffer address to the end of the field, even if the field is protected.
If issuing the PT order when the current address is the location of a protected field attribute, the current buffer address advances to the first unprotected position of the next unprotected field.
The PT order stops its search at the last character location of the screen buffer. If an unprotected field attribute with an associated unprotected character location is not found, the current buffer address is set to 0. If the unprotected field attribute found is in the last character location of the screen buffer, the current buffer address is set to 0.
If the PT order terminates at the end of the screen while inserting nulls, and a second PT order immediately follows, the new PT order continues to insert nulls from buffer location 0 to the end of the current field. The PT format is:
Byte |
Content |
Description |
0 |
X`05' |
PT Order Code |
|
Repeat to Address (RA) |
Stores a specified character in all buffer locations. The specified character is stored starting at the current buffer address and ending at (but not including) the specified stop address. When the stop address is equal to the current buffer address, the character is stored in all buffer locations.
When you specify extended highlighting or color attributes for the character, the attribute values are entered into the extended character attribute buffer as each repeated character is written into the data buffer. The RA format is:
Byte |
Content |
Description |
0 |
X`3C' |
RA Order Code |
1-2 |
X`....' |
Stop Address |
3 |
X`..' |
Character to be Repeated |
|
Erase Unprotected to Address (EUA) |
Inserts nulls in all unprotected character locations in the buffer. The nulls are inserted starting at the current buffer address and ending at (but not including) the specified stop address. The character attribute associated with each null character is set to X`00'. The stop address then becomes the new current buffer address.
When the stop address equals the current address, all unprotected character locations are erased. The EUA format is:
Byte |
Content |
Description |
0 |
X`12' |
EUA Order Code |
1-2 |
X`....' |
Stop Address |
|
3270 Data Stream Outbound Structured Fields
The structured field is a format used to transport data. Outbound structured fields are data fields that are sent from the host to the local system running HCON.
The HCON write structured field (WSF) command (X`F3') transmits the outbound structured fields to the display session. You can issue a single write structured field command to send one or more structured fields.
WSF Command (X`F3') |
Structured Field 1 |
Structured Field 2 |
... |
Structured Field n |
The outbound structured field functions supported by an HCON display session include:
Function |
ID Code (Hex) |
|
Byte 2 |
Byte 4 |
Read Partition: Query Query List |
01 |
02 03 |
Erase/Reset |
03 |
|
Set Reply Mode |
09 |
|
Outbound 3270DS: Write Erase/Write Erase/Write Alternate Erase ALL Unprotected |
40 |
F1 F5 7E 6F |
The outbound structured field functions perform the following operations:
Read Partition |
Enables a host application program to ascertain the color, highlighting, usable area, reply modes, symbol-set, and other characteristics of a terminal. The format of the read partition structured field is:
Byte |
Content |
Description |
0-1 |
L |
Length of this Structure |
2 |
X`01' |
Read Partition |
3 |
X`FF' |
Partition ID (PID) |
4 |
TYPE X`02' X`03' |
Query Query Query List |
5 |
Bits 0-1 B`00' B`01' B`10' B`11' Bits 2-7 B`000000' |
This byte is present only for: Query List (X`03') Q-code List (Bytes 6-N) Query Equivalent plus Q-code List All Query Replies (Reserved) (Reserved) |
6-n |
Q-List |
List of Query Reply Codes (Present only for Query List) |
|
Erase/Reset |
Erases the screen and resets the display session to implicit partition state using the default or alternate size, as specified in the structured field. The Inbound Reply mode is reset.
If byte 3 contains any value other than X`00' or X`80', the structured field is rejected with a negative response (in SNA) or an Op-check (in non-SNA). The format of the erase/reset structured field is:
Byte |
Content |
Description |
0-1 |
X`0004' |
Length of this Structure |
2 |
X`03' |
Erase/Reset |
3 |
Bit 0: B`0' B`1' Bits 1-7: B`000000' |
Implicit Partition Size: Default Alternate (Reserved) |
|
Set Reply Mode |
Specifies the reply mode required in all subsequent inbound data streams. The specified reply mode remains in effect until it is changed by:
- Another Set Reply mode structured field, specifying a different reply mode
- An erase/reset structured field
- An erase/write or erase/write alternate command, or a structured field with the WCC bit 1 set to 1, causing a reset function
The format of the Set Reply mode structured field is:
Byte |
Content |
Description |
0-1 |
L |
Length of this Structure |
2 |
X`09' |
Set Reply Mode |
3 |
X`00' |
PID |
4 |
MODE X`00' X`01' X`02' Others |
Reply Mode being requested: - Field Mode - Extended Field Mode - Character Mode - (Reserved) |
5-n |
A-List (present only if Mode is X`02') |
List of Attribute Types: X`41' : Extended Highlighting X`42' : Color |
|
Outbound 3270DS |
Enables the user to direct the write commands and other structured fields to the display within a single transmission. The format of the outbound 3270DS structured field is:
Byte |
Content |
Description |
0-1 |
L |
Length of this Structure |
2 |
X`40' |
Outbound 3270DS |
3 |
X`00' |
PID |
4 |
CMND X`F1' X`F5' X`7E' X`6F' Others |
WR command EW command EWA command EAU command (Reserved) |
5 |
WCC |
WCC Byte if Byte 4 is X`F1', X`F5', or X`7E' |
6-n |
Data |
Write Data if Byte 4 is X`F1', X`F5', or X`7E' |
|
3270 Data Stream Inbound Structured Fields
The structured field is a format used to transport data. Inbound structured fields are sent from the local system to the host system.
An HCON display session uses the Attention ID (AID) (X`88') to transmit the inbound structured fields to the host program. You can issue a single AID to send one or more structured fields.
AID (X`88') |
Structured Field1 |
Structured Field 2 |
... |
Structured Field n |
The inbound structured field functions supported by an display session include:
Function |
ID Code (Hex) |
|
Byte 2 |
Byte 3 |
Inbound 3250DS |
80 |
|
Query Reply: Summary Usable Area Character Sets Color Highlighting Reply Mode Distributed Data Management Auxiliary Device Implicit Partition Null |
81 |
80 81 85 86 87 88 95 99 A6 FF |
The format for each structured field includes:
Inbound 3270DS |
Enables the user to send data from the alphanumeric presentation layer to flow together with the graphic data. The format of the inbound 3270DS structured field is:
Byte |
Content |
Description |
0-1 |
L |
Length of this Structure |
2 |
X`80' |
Inbound 3270DS |
3 |
X`00' |
Partition Identifier |
4 |
AID |
Attention Identifier |
5-6 |
CURSOR |
Alphanumeric Cursor Position |
7-N |
DATA |
Orders and Data |
|
Query Reply |
In response to the query from the host system, the display session responds with a series of structured fields, or query replies, which describe the device capabilities. The query replies include:
AID (X`88') |
Query Reply1 |
Query Reply 2 |
... |
Query Reply n |
|
Summary |
Lists the supported query replies used by the query list.
Byte |
Content |
Description |
0-1 |
X`000D' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`80' |
Summary |
4-C |
Q-Codes: |
|
|
X`80' |
Summary |
|
X`81' |
Usable Area |
|
X`84' |
Alphanumeric Partitions |
|
X`85' |
Character Sets |
|
X`86' |
Color |
|
X`87' |
Highlighting |
|
X`88' |
Reply Mode |
|
X`95' |
DDM |
|
X`99' |
Auxiliary Device |
|
X`A6' |
Implicit Partition |
|
Usable Area |
Defines the size and characteristics of the screen.
Byte |
Bit |
Content |
Description |
0-1 |
|
X`0014' |
Length of this Structure |
2 |
|
X`81' |
Query Reply |
3 |
|
X`85' |
Character Set |
4 |
0-1 |
B`00' |
(Reserved) |
|
2 |
B`0' |
EXSF Supported |
|
3 |
B`0' |
Not a "HARD COPY" Device |
|
4-7 |
X`3' |
12/14/16-bit Addressing Allowed |
5 |
0 |
B`0' |
Variable Cells Not Supported |
|
1 |
B`0' |
Matrix Character |
|
2 |
B`0' |
Value in Bytes 6-9 in Cells |
|
3-7 |
B`00000' |
(Reserved) |
6-7 |
|
X`0050' |
Usable Area Width |
8-9 |
|
X`0018' |
Usable Area Height |
10 |
|
X`00' |
Units for Measure: Inch |
11-14 |
|
X`00020089' |
Horizontal PEL Distance |
15-18 |
|
X`00020085' |
Vertical PEL Distance |
19 |
|
X`09' |
Default Cell Width |
20 |
|
X`0E' |
Default Cell Height |
21-22 |
|
X`0780' |
Character Buffer Size |
|
Character Set |
Defines the character set active for this session.
Byte |
Content |
Description |
0-1 |
X`0006' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`81' |
Usable Area |
4 |
X`02' |
Graph Escape Not Supported |
5 |
`00' |
(Reserved) |
6-7 |
X`090E' |
Character Slot Width and Height |
8-11 |
X`00000000' |
Load PS Not Supported |
12 |
X`07' |
Length of Following Descriptor |
13-14 |
X`0000' |
PS Characteristics |
15 |
X`00' |
Local Character Set ID |
16-17 |
X`XXXX' |
Global Character Set ID |
18-19 |
X`XXXX' |
Global Character Set ID |
|
Color |
Describes the color features of the display.
Byte |
Content |
Description |
0-1 |
X`0016' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`86' |
Color |
4 |
X`00' |
(Reserved) |
5 |
X`08' |
Number of Color Attribute Pairs |
6-21 |
X`00F4' F1F1 F2F2 F3F3 F4F4 F5F5 F6F6 F7F7 |
Default is Green Identification Pairs |
|
Highlighting |
Identifies the type of highlighting supported by the display.
Byte |
Content |
Description |
0-1 |
X`000D' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`87' |
Highlighting |
4 |
X`04' |
Number of Pairs |
5-21 |
X`00F0' F1F1 F2F2 F4F4' |
Default is Normal Action Pairs |
|
Reply Mode |
Reports the reply modes supported by the display.
Byte |
Content |
Description |
0-1 |
X`0007' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`88' |
Reply Mode |
4-6 |
X`000102' |
Field, Extended Field, and Character Modes supported |
|
Distributed Data Manager |
Defines the distributed data manager characteristic. This characteristic is used by the file transfer protocol.
Byte |
Content |
Description |
0-1 |
X`0000' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`85' |
Distributed Data Manager (DDM) |
4-5 |
X`0000' |
Reserved |
6-7 |
X`0000' |
Inbound Buffer Size (no limit) |
8-9 |
X`0000' |
Outbound Buffer Size (no limit) |
10 |
X`01' |
Number of Subset Supported |
11 |
X`01' |
DDM Subset Identification |
|
Auxiliary Device |
Defines the characteristic of the auxiliary device used by the file transfer process.
Byte |
Content |
Description |
0-1 |
X`0006' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`99' |
Auxiliary Device |
4 |
X`00' |
Reserved |
5 |
X`00' |
Reserved |
|
Implicit Partition |
Defines the default and alternate implicit partition size.
Byte |
Content |
Description |
0-1 |
X`0011' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`A6' |
Implicit Partition |
4-5 |
`0000' |
(Reserved) |
6 |
X`0B' |
Parameter Length |
7 |
X`01' |
Implicit Partition Size |
8 |
X`00' |
(Reserved) |
9-10 |
X`0050' |
Width of Default Implicit Partition |
11-12 |
X`0018' |
Height of Default Implicit Partition |
13-14 |
X`0050' |
Width of Alternate Implicit Partition |
15-16 |
X`0018' |
Height of Alternate Implicit Partition |
|
Null |
Defines the transmitted inbound in reply to a query list when the display session does not support any of the query replies in the list.
Byte |
Content |
Description |
0-1 |
X`0004' |
Length of this Structure |
2 |
X`81' |
Query Reply |
3 |
X`FF' |
Null |
|
[ Previous |
Next |
Contents |
Search ]