Networking on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


3270 data stream

Networking on z/OS

Prior to explaining the TN3270 implementation, you need to know a little more about the 3270 data stream.

The 3270 data stream operations are designed primarily for transmitting data between an application program and a 3270 display with keyboard so end users can interact with mainframe-based applications.

The 3270 data stream is also designed for transmission of data to 3270 printers.

The 3270 data stream is implemented using a mapped character buffer in the device. In turn, this mapped character buffer forms the display on the screen. Data received from the application program and data to be transmitted to the application program are stored in a device buffer and displayed on the screen in the form of alphanumeric characters and symbols. The displayed data is updated when the end user modifies the buffer data and when new data is received from the application program. Each character storage location in the buffer maps to a character position on the display.

All characters and numbers are represented through Extended Binary Coded Decimal Interchange Code (EBCDIC).

Write control character (WCC)

The 3270 write control character is often included in the 3270 data stream. It is used to sound a beep or to unlock the keyboard.

Data stream commands

The 3270 data stream commands perform various functions. The basic 3270 data stream commands are:
Write
Write characters to the terminal display.
Erase/Write
Erase and write characters to the terminal display.
Erase All Unprotected
Erase all unprotected fields on the terminal display.
Read Modified
Read unprotected data fields that have been changed on the terminal display.
Attention Identifier (AID)
Send control information (function keys, attention key) to the mainframe. The AID is end-user initiated.
Write Structured Field (WSF)
Send control information (color, number of rows and columns at terminal, for example) to the terminal display.

Function and attention keys: Function keys are the numbered keys prefixed by the letter F found across the top of a standard keyboard. Function keys are heavily used in the TN3270 environment as shortcuts for interacting with applications. For example, F7 and F8 are often page up and page down. A function key is analogous to a shortcut, such as using the Alt + Tab keys to switch applications in a Windows environment.

The attention key is used to present an external interruption to an executing application. Attention interruptions are used to halt execution.

While these commands appear straightforward, what is the meaning of, say, an unprotected field? All locations on a 3270 display screen are governed by field attributes.

3270 field attributes

The field attribute defines the start of a field and the characteristics of the field. Here are some common field attributes:
Protected or unprotected
A protected field cannot be modified by the end user. The end user can enter data or modify the contents of an unprotected field. Unprotected fields are classified as input fields.
Nondisplay or display
Nondisplay means that any characters entered from the keyboard are placed into the buffer for possible subsequent transmission to the application program, but they are not displayed. This is often used for password entry fields.
Intensified display
Intensified display means the characters appear on the screen brighter than other (un-intensified) characters.
Alphanumeric or numeric
Unprotected alphanumeric fields are fields into which an end user normally enters data using the shift keys (uppercase/lowercase or numeric/alphabetic). A numeric field can contain only numeric characters, with the addition of the period (to indicate a decimal) and minus sign (to indicate a negative number).

Field attributes can be further modified using extended field attributes. Extended field attributes allow such characteristics as foreground and background colors and highlighting to be controlled.

These 3270 data stream fields appear reasonably straightforward, but the implementation details can quickly become very complex; 3270 Data Stream Programmer's Reference provides exhaustive details.





Copyright IBM Corporation 1990, 2010