This page is for general reference information about 3270 datastreams, the TN3270 protocol and general things that are of 3270 interest.
The first thing you need when working with 3270 datastreams is a definition of what it is you are dealing with. The standard text for that is the 3270 Data Stream Programmer's Reference GA23-0059-07.
I may now be moving to a 6530 project, so here is a manual!
TN3270 Protocol Cheat Sheet
The TN3270 protocol is a mish-mash of RFC standards and de-facto standards. Basic TN3270 is defined in a de-facto manner as being the combination of defining the set of terminal and host Telnet Options:
Terminal Option | Host Option |
---|---|
BINARY | BINARY |
EOR | EOR |
TTYPE |
TN3270 RFCs
The following RFCs describe TN3270
3270 Datastream Cheat Sheet
Command Codes
Command | Abbrev | EBCDIC |
---|---|---|
Read Modified All | RMA | 0x6E |
Erase All Unprotected | EAU | 0x6F |
Erase/Write Alt | EWA | 0x7E |
Write | W | 0xF1 |
Read Buffer | RB | 0xF2 |
Write Structured Field | WSF | 0xF3 |
Erase/Write | EW | 0xF5 |
Read Modified | RM | 0xF6 |
Order Codes
Order | Abbrev | EBCDIC |
---|---|---|
Program Tab | PT | 0x05 |
Graphic Escape | GE | 0x08 |
Set Buffer Address | SBA | 0x11 |
Erase Unprotected to Address | EUA | 0x12 |
Insert Cursor | IC | 0x13 |
Start Field | SF | 0x1D |
Set Attribute | SA | 0x28 |
Start Field Extended | SFE | 0x29 |
Modify Field | MF | 0x2C |
Repeat to Address | RA | 0x3C |
Field Attributes
Bit | Explanation |
---|---|
0,1 | The function of bits 0 and 1 is to make the field attribute an EBCDIC/ASCII translatable graphic character. Bits 0 and 1 are set in accordance with Figure C-1 in topic C.0. |
2 | 0 Field is unprotected 1 Field is protected |
3 | 0 Alphanumeric 1 Numeric (causes an automatic upshift of data entry keyboard) Note: Bits 2 and 3 equal to B.11. cause an automatic skip of a protected field. |
4,5 | 00 Display/not selector pen detectable 01 Display/selector pen detectable 10 Intensified display/selector pen detectable 11 Nondisplay, nondetectable (not printable) |
6 | Reserved. Must always be 0. |
7 | MDT identifies modified fields during Read Modified command
operations.
0 Field has not been modified. 1 Field has been modified by the operator. MDT can also be set by a program in the data stream. |
Write Control Characters (WCC)
Bit | Explanation |
---|---|
0 | If the Reset function is not supported, the only function of
bits 0 and 1 is to make the WCC byte an
EBCDIC/ASCII-translatable character. Bits 0 and 1 are set in
accordance with Figure C-1 in topic C.0 .
If the Reset function is supported, bit 1 controls reset/no reset and bit 0 has no function. When bit 1 is used for the Reset function the WCC byte is no longer always EBCDIC/ASCII-translatable; therefore, the Reset function cannot be supported in an ASCII environment. |
1 | WCC reset bit. When set to 1, it resets partition characteristics to their system-defined defaults. When set to 0, the current characteristics remain unchanged (no reset operations are performed). |
2,3 | For printers. (See Chapter 8, "Printer Operations.") |
4 | Start-printer bit. When set to 1, it initiates a local copy operation of the display surface at the completion of the write operation. When no printer is available, a negative response (0801) is returned. (See Chapter 8, "Printer Operations" for details of local copy operation.) |
5 | Sound-alarm bit. When set to 1, it sounds the audible alarm at the end of the operation if that device has an audible alarm. |
6 | Keyboard restore bit. When set to 1, this bit unlocks the keyboard. It also resets the AID byte. |
7 | Bit 7 resets MDT bits in the field attributes. When set to 1, all MDT bits in the device's existing character buffer are reset before any data is written or orders are performed. |
Test Resources
There follows a list of the 3270 systems I am aware of that are available from the public internet. The ability to enter many of these sites is limited, but the login screen can dislayed at the very least.
Server | Description/Comments |
---|---|
tn3270://tnserver.di3270.com | TN3270E Test Center http://www.di3270.com This used to be the best site aroung for testing TN3270. However, it seems to have evaporated now, which is a shame. I will one day soon be putting onto the net my version of a TN3270 Test Center. |
tn3270://zos.ais.ucla.edu | This is fine as far as it goes, but it just displays a screen saying that all access must be through SSL. |
tn3270s://zos.ais.ucla.edu | On port 992, there is tn3270 SSL access. |
tn3270://nermvs.nerdc.ufl.edu | See http://cics.ufl.edu/access.html |
Related References
I am still looking for information on what datastreams are involved in supporting GDDM from a TN3270 emulator perspective. If anyone has any references, please contact me!
I found someone describing stuff - great - Greg Price