Unformatted 3270 screen: what Enter sends after Clear
An unformatted 3270 screen has no fields, so Enter sends the whole screen from row 1 column 1 with nulls removed. Clear makes any screen unformatted.
A 3270 screen is formatted when it has at least one field, and unformatted when it has none. On an unformatted screen the whole screen acts as one string of data, in both directions, like a simple terminal. IBM's CICS documentation calls this unformatted mode.
How a screen becomes unformatted
- You press Clear. Clear sets the whole screen buffer to nulls, and that removes the attribute bytes that mark where fields start. Any screen becomes unformatted after Clear.
- The host writes no fields. A program can write text, and place it with set-buffer-address orders, without defining a single field.
There is nothing protected on an unformatted screen. You can type anywhere.
What Enter sends
When the host reads an unformatted screen, it gets:
- The three-byte header: the AID of the key you pressed and the cursor address.
- Then the contents of the entire buffer, starting at position zero (row 1, column 1). There are no field orders in it, because there are no fields.
With the usual read, nulls are left out. A position you never typed in, after Clear, holds a null, so it sends nothing. IBM notes that the host then cannot always tell where on the screen the input was. Two words typed in different places, with only empty positions between them, can arrive with nothing between them. Type a space where you need one.
Why it matters in practice
- CICS. You press Clear and type a transaction ID because CICS takes the transaction ID from the start of that unformatted input. Text left on the screen from before is sent too, which is how a message on the screen can be read as a transaction ID. See CICS sign-on and 3270 keys and CICS message DFHAC2001, transaction not recognized.
- Programs that expect a form. A CICS program that reads its input with BMS
RECEIVE MAPcannot read an unformatted screen; BMS raises theMAPFAILcondition. So pressing Clear in the middle of such a program, then Enter, sends input the program cannot read as its form. - Clear itself sends no text. Clear is a short-read key: it sends only its AID byte, with no cursor address and no data. The text you type afterwards goes with the next Enter or PF key. See AID keys (Enter, PF, PA, Clear).
Formatted screens, for comparison
On a formatted screen the terminal sends only the fields whose modified data tag is set, each with its address. Labels and untouched fields are not sent. See Fields and attributes.
Related
- Fields and attributes
- AID keys (Enter, PF, PA, Clear)
- How a 3270 terminal works
- CICS sign-on and 3270 keys
- CICS message DFHAC2001, transaction not recognized