PAGE BUILDING - IBM Mainframe

The page building facility of BMS allows your application program to format pages using multiple maps. You can use page building on its own or combine it with terminal paging to send multiple pages created from multiple maps.

A page is the area of a terminal on which data can be displayed or printed at one time. The Terminal Control Table (TCT) entry for each terminal specifies the size of the display area in number of lines and columns. Your primary goal in using BMS is to send output data to any type of terminal from your application program without having to reformat the message each time for varying page sizes. BMS handles this detail with information you have provided in the BMS Maps, along with the device definitions in the TCT.

Many applications are designed to display several records at once for review by the terminal user. In such applications, the number of records to be displayed is variable. The data is also usually repetitive and columnar. Columnar data typically requires headings, footings, page totals and final totals. Suppose that you have a variable amount of columnar data send to a user's terminal. You want to use one map for the header, another for the detail lines and a third for the trailer. You can define the following three types of maps for this application:

  • Header Maps - Positioned always at the top of the page, header maps typically carry such information as display title, page number, screen id, date, time, etc.
  • Detail Maps - Detail maps are used to format the varying amount of data on the page. Any map not defined as header or trailer map is considered by BMS as a detail map.
  • Trailer Maps - Positioned at the bottom of the page or immediately following the last detail map, trailer maps usually carry page footing, page totals, final totals, etc.

The following figure shows a display of accounts with balances due and explains the concepts of the header trailer and detail maps. This is the result of page building. A header map defines the display title, a single detail map defines each detail line and a trailer map defines the total line. The detail map is used repeatedly in the application program whenever data for an account is formatted. The screen contains only as much detail lines, as there are accounts on the file. Thus the display in the figure is the result of 6 output requests, one for header, 4 for the detail lines, and one for the trailer

Map Types

Map Types

Map Positioning for Page Building

Some maps require absolute positioning while others can be positioned relative to other maps on the page. Look at the example in the figure given below. In the figure the header maps is positioned at the top of the page. Each detail map is placed on the next available line on the page. Finally, the trailer map occupies the last available line on this page.

In the following figure each map defines a complete line on the page. However, a single line may be defined by multiple maps. During program execution, BMS maintains line and column counters and pointers that control the vertical and horizontal positioning of the maps within the page. Your application program has to simply request the maps.

Absolute and Relative Map Positioning

Absolute and Relative Map Positioning

Multiple Maps in one Line

Multiple Maps in one Line

In the DFHMDI macro, you will specify the following information for the positioning of multiple maps on a page.

  • The size of the map, the maps used for page building will be smaller than the stand-alone maps.
  • Line positioning, the line on the page where the map begins.
  • Column positioning, the column on the page where the map begins.
  • Whether the map is a header, trailer or detail map.
  • Alignment of the map at the top, bottom, left or right within the page.

You can choose how the symbolic map in a multiple-map mapset will be defined by coding a parameter in the DFHMSD macro. You can specify that each map should occupy a separate area of the working storage by including the STORAGE=AUTO option mentioned earlier. But you can conserve storage by using the BASE option in which case all of the symbolic maps in the mapset will occupy the same storage area. Your choice will depend on your unique storage constraints, how you will combine maps to display and the language you are using.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics