 |
Click on any item to view...
Contents

|
 |

This lesson covers the 3270/5250 Display session and how you as a ScreenSurfer developer will interact with this key resource.
New Skills
Screens are created by applications running on the mainframe or AS400 by the application sending a 3270 (mainframe) or 5250 (AS400) datastream to ScreenSurfer. The first of these datastreams will arrive following session startup, and typically has a welcome or logon screen embedded in it. When the user at the browser selects a key from the keyboard map, or a button you have defined to create an "enter event", ScreenSurfer will send back to the host application a terminal-created datastream which will be interpreted by the host application.

Screen Type and Size
By default, for mainframes ScreenSurfer supports a 3278 Model 2, which is a 24 row, 80 column monochrome display. For an AS400 connection, the default is a 5251-11, which also is a 24 row, 80 column display. You can change the model that ScreenSurfer supports (if the resource you are connecting to supports it) by changing a few registry entries (/config/screenrows, /config/screencolumns and /config/termtype). For the sake of this lesson, we will assume a screen size of 24 rows by 80 columns.

Unformatted Displays
The most primitive screen is one where the datastream coming from the host application contains no fields. This type of screen only occurs in a 3270 environment. This unformatted display is technically "one big entry area". However, there are a number of obsure rules as to which portions of the screen are recognized by the host application, so even though an operator at a real display can key into, say, the top of the screen, the host application may only recognize those values from row 15 on.
When ScreenSurfer encounters an unformatted display, the default behavior is to present to the user at the browser a portion of the screen that is output only (the part which will not be recognized by the host application) followed by a number of entry fields, one per remaining line. Quite often, an unformatted screen will be displayed as twenty-four entry fields aligned vertically. This is an ugly interface for an HTML page, and luckily not very many host applications present the user with unformatted screens.

The Formatted Display
Formatted displays are far more common, as these are ones which contain fields that are a mix of "protected" and "unprotected". These terms are confusing but essentially mean "text" and "input" (why didn't they just use that in the first place!!).
The formatted display has a mix of data areas and special characters which are known as space-occupying attribute bytes. The attribute byte is a special character which is embedded in the 3270/5250 datastream sent to ScreenSurfer to identify where fields begin and end.
|

Field Types
The attribute bytes will appear on the screen as a space (since they are space occupying in the 3270 and 5250 formats). In-between each attribute byte is a field, which can be of the following types:
- Protected (regular text) - The titles, prompts and descriptions of data
- Protected-hidden - Like normal protected text, but "hidden" by the application programmer. With ScreenSurfer, hidden text is never sent to the HTML page unless the ScreenSurfer developer explicitly copies the screen area containing the hidden text to a variable, and then includes the value of that variable in the output stream.
- Protected-bold - Protected bold fields are those text fields that are highlighted
- Unprotected (input areas) - Unprotected fields are those which the operater can enter data into. They may be initialized with starting data or "null".
- Unprotected-hidden (input areas) - Unprotected "hidden" fields are those which the operater can enter data into but are not to be displayed-- this is for entering passwords. ScreenSurfer will by default generate an HTML "Password" input field for this type.
- Selectable (light pen) - Selectable fields are special fields that are designed to provide the operator with a "clickable" interface originally implemented using light pens. This interface found strong popularity in the health fields (hospitals in particular), where the light pen interface allowed minimal handling of equipment while rapidly selecting and entering data. A selectable field is a protected field that has the special characters "&", "<" or "?" in the first position.
|

How ScreenSurfer moves Data between the 3270 session and HTML
In ScreenSurfer, the screen contents are shipped to the HTML browser inside an HTML form; when the user clicks on a button or one of the provided AID key maps, the browser sends the contents of the form into ScreenSurfer, where a number of data elements from the HTML form are acted on:
- The cursor position is set based on the C_POS value in the HTML form
- Input fields created using ScreenSurfers special form field names are enumerated and applied to the host screen; only those values that change host data will be transmitted to the host application.
- The AID key requested by the user is translated to the appropriate 3270 AID key code
- The inbound 3270 datastream is constructed by ScreenSurfer and sent to the host application

Special Cases
Essentially, the first field on the display starts at row 1, column 1; most of the time row 1 column 1 is an attribute byte. However, there are many circumstances where the host application designer has decided to include data starting at row 1 column 1. You should be aware that when this is the case and the screen is formatted, the attribute byte is often found at row 24, column 80.
 |
 |