3270 Datastreams and TN3270

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

TN3270 RFCs

The following RFCs describe TN3270

3270 Datastream Cheat Sheet

Command Codes

Command Abbrev EBCDIC
Read Modified AllRMA0x6E
Erase All UnprotectedEAU0x6F
Erase/Write AltEWA0x7E
Read BufferRB0xF2
Write Structured FieldWSF0xF3
Read ModifiedRM0xF6

Order Codes

Order Abbrev EBCDIC
Program TabPT0x05
Graphic EscapeGE0x08
Set Buffer AddressSBA0x11
Erase Unprotected to AddressEUA0x12
Insert CursorIC0x13
Start FieldSF0x1D
Set AttributeSA0x28
Start Field ExtendedSFE0x29
Modify FieldMF0x2C
Repeat to AddressRA0x3C

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.
20 Field is unprotected
1 Field is protected
30 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,500 Display/not selector pen detectable
01 Display/selector pen detectable
10 Intensified display/selector pen detectable
11 Nondisplay, nondetectable (not printable)
6Reserved. Must always be 0.
7MDT 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

  • Information on IND$FILE can be found here, and here

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