Previous Page Contents Page Next Page

2 Programming in the 3270 Environment

This chapter describes features of the 3270 environment that are used by HLLAPI application programs. You may need to be familiar with some or all of the information in this chapter, depending on the type of transactions performed by your HLLAPI application program.

The following topics are described:

2.1 Using the 3270 Presentation Space

Your application program and the host communicate through the 3270 presentation space (terminal display). This section describes the presentation space and explains how to access information in the presentation space.

2.1.1 Presentation Space Sizes

The 3270 emulation program supports four different screen sizes (screen models), referred to as models 2, 3, 4, and 5. Depending on the support provided by your Solaris computer and the terminal you are using, you may not be able to view all of these screen models.

You can activate a 3270 session using a large screen model and access it using HLLAPI, even though the presentation space for that session cannot be displayed on the screen.

The 3270 screen models supported and the number of rows and columns in each screen model, are shown in 3270 Display Models.

3270 Display Models

ModelRowsColumns
2 24 80
3 32 80
4 43 80
5 27 132

The row totals shown for each screen model do not include the status line (also called the operator information area). The status line is a line at the bottom of each screen that shows the status of the session and information about the presentation space. The status line is not considered part of the presentation space.

2.1.2 Screen Buffer

Information displayed in the presentation space is stored by the 3270 emulation program in a screen buffer. Using HLLAPI functions, your application program can read from and write to the screen buffer. To access data in the screen buffer, you must supply the position of the presentation space containing that data.

The addressing scheme is the same for each screen model. Presentation space addresses start at position 1 and end with the maximum number of presentation space positions for the screen model. For example, Model 2 screens have 1,920 positions; Model 3 screens have 2,560 positions; Model 4 screens have 3,440 positions; and Model 5 screens have 3,564 positions.

Presentation Space Positions for a Model 2 Screen, shows the presentation space positions for a Model 2 screen.

Presentation Space Positions for a Model 2 Screen

Presentation Space Sizes, gives the beginning and ending presentation space positions for each line of the various screen models.

2.1.3 Converting Row and Column Coordinates

HLLAPI provides the Convert Position or RowCol function to convert row and column coordinates on any 3270 screen size into a presentation space position. You can also use this function to convert a presentation space position into row and column coordinates.

Note

If you are using a Model 5 terminal, the host can toggle to an 80-column screen without notice. If your application needs to check the column width set by the host, you can do this by using the Convert Position or RowCol function to convert the row and column coordinates for column 1 of row 2 into a presentation space position; the returned value is 133 if the host is using Model 5, or 81 if the host has toggled to an 80-column screen.

Previous Page Contents Page Top of Page Next page