Basic mapping support

Basic mapping support (BMS) is an interface between CICS® and its application programs. It allows the CICS application programmer to have access to input and output data streams without including device-dependent code in the CICS application program. BMS formats input and output display data in response to BMS commands in programs. To do this, it uses device information from CICS system tables, and formatting information from maps that you have prepared for the program.

BMS provides the following services:
  • Message routing allows application programs to send output messages to one or more terminals not in direct control of the transaction.
  • Terminal paging allows the user to prepare a multipage output message without regard to the physical size of the output terminal; the output can then be retrieved by page number in any order.
  • Device independence allows the user to prepare output without regard to the control characters required for a terminal; CICS automatically inserts the control characters and eliminates trailing blanks from each line.

One of three versions (MINIMUM, STANDARD, or FULL) of basic mapping support can be selected by the BMS system initialization parameter.

Most of the BMS programs are resident in the CICS nucleus.

Design overview

BMS enables an application program to read in device-dependent data and convert it to a device-independent standard form, or to generate device-dependent output data from this device-independent standard form. In both cases, the structure of the device-independent standard form, and the layout of the data on the display terminal, are determined by a user-defined map. Related maps—for example, maps used in the same application program—are grouped together into a map set. See Basic mapping support for further information about the definition and use of maps and map sets.

On some terminals (such as the IBM® 8775 display terminal and the IBM 3290 information panel), the available display area may be divided into a set of related “logical” screens called partitions. The layout and properties of the set of partitions that can be simultaneously displayed on a terminal are defined by the BMS user in a partition set. See Basic mapping support for further details about the definition and use of partition sets.

Maps, map sets, and partition sets are assembled offline using CICS macros. The user defines and names fields and groups of fields that can be written to and read from the devices supported by BMS. The assembled maps contain all the device-dependent control characters necessary for the proper manipulation of the data stream.

Associated with each map is a table of field names which is copied into each application program that uses the map. Data is passed to and from the application program under these field names. The application program is written to manipulate the data under the various field names so that alteration of a map format does not necessarily lead to changes in program logic. New fields can be added to a map format without making it necessary to reprogram existing applications.

Output data can be supplied from the application program by placing the data in the table under the appropriate field name. As an alternative, output maps can contain field default data that is sent when data is not supplied by an application program. This facility permits the specification of titles, headers, and so on, for output maps.

Optionally, the display of all the default data can be suppressed by the application program for any output map. Each time a map is used, the application program can temporarily modify the attributes of any named field in the output map. The extended attributes can also be modified if maps are defined with the DSATTS operand.

Output map fields with no field names can contain default data, but the application program cannot replace the default data or modify the attributes of unnamed fields.

For input, the user assembles a map defining the fields that can be written to and received from a particular device. Any data received for a particular field is moved across using the field name in the symbolic storage definition for the map. Light-pen-detectable fields defined in an input map are flagged as detected if present in an IBM 3270 Information Display System input stream. An input map for a particular case can specify a subset of the fields potentially receivable; any fields received and not represented in that map are discarded. This permits the number of fields from a map that can be typed or selected to be changed, without making it necessary to reprogram applications that currently receive data from the map.

Maps are stored in the CICS program load library. When a map is required by BMS, a copy is automatically retrieved by CICS from the program load library without application program action. Multiple users of a map contained in the program load library share a single copy in main storage.

BMS permits any valid combination of field attributes to be specified by the user when generating maps. Inclusion of BMS in CICS is a system generation option and does not prevent the application program from accessing a particular device in native mode (without using BMS). Intermixing BMS and native mode support for a terminal from the same application program may yield unpredictable results. When using mixed mode support, it is the user’s responsibility to ensure the correct construction and interpretation of native mode data streams.

BMS permits the application program to pass a native mode data stream that has already been read in, and (if, for a terminal of the IBM 3270 Information Display System, the screen has been formatted) to interpret this data stream according to a given input map. This facility allows data entered with the initial reading of a transaction to be successfully mapped using BMS.

An overview of BMS services follows:
Message routing

Message routing permits the application program to send an output message to one or more terminals not in direct control of the transaction. The message is automatically sent to a terminal if the terminal status allows reception of the message. If a terminal is not immediately eligible to receive the message, the message is preserved for that terminal until a change in terminal status allows it to be sent. The message routing function is used by the CICS message-switching transaction.

A BMS map that specifies extended attributes can be used for terminals that do not support extended attributes. When sending data to a variety of terminals, some of the terminals may support extended attributes and others may not. When a BMS ROUTE request is processed, BMS looks at the TCTTEs for all specified terminals and constructs a set of all the supported attributes.

A data stream is produced by BMS using this set of attributes, and the data stream and set of attributes for each page are written to a temporary-storage record. When the page is later read from temporary storage, the data stream for each terminal is modified, if necessary, to delete attributes not supported by that terminal.

Terminal paging

Terminal paging allows the user to prepare more output than can be conveniently or physically displayed at the receiving terminal. The output can then be retrieved by pages in any order; that is, in the order in which they were prepared or by skipping forward or backward in the output pages.

Terminal paging also provides the ability to combine several areas into one area, which is then sent to the terminal. This enables the user to prepare output without regard for the size of record that is imposed by the output terminal.

CICS provides the terminal operator with a generalized page retrieval facility that can be used to retrieve and dispose of pages.

Device independence

Device independence allows the user to prepare output without regard for the control characters required for message heading, line separation, and so on. Input to device independence consists of a data string with optional new-line characters.

Device independence divides the data string into lines no longer than those defined for the particular terminal. If new-line characters appear occasionally in the data string to further define line lengths, they are not ignored. CICS inserts the appropriate leading characters, carriage returns, and idle characters, and eliminates trailing blanks from each line. If the device does not support extended attributes, the extended attributes are ignored.

CICS allows the user to set horizontal and vertical tabs on those devices that support the facility (for example, the IBM 3767 Communication Terminal, and the IBM 3770 Data Communication System). For such devices, CICS supports data compression inbound and data compression outbound, based on the tab characteristics in the data stream under the control of the appropriate maps.

Control blocks

Figure 1 illustrates the control blocks associated with BMS. Table 1 gives you an overview of the control blocks. See Reference for BMS control blocks for details.

Figure 1. Control blocks associated with basic mapping support (BMS)
Diagram showing the control blocks associated with basic mapping support (BMS) and the relationships between them.
  1. The route list area (RLA) is not used in the direct TTP.
  2. Each routing TTP has the same format as the direct TTP.
Table 1. BMS control blocks
DSECT Function
DFHMAPDS Defines a physical map.
DFHMCAD Defines a mapping control area (MCA).
DFHMCBDS Defines the message control block (MCB).
DFHMCRDS Defines the message control record (MCR).
DFHOSPWA Defines the output services processor work area (OSPWA).
DFHPGADS Defines a page control area (PGA).
DFHPSDDS Defines a physical partition set. The partition set is stored in the CICS program library and requires a resource definition when loaded into main storage by BMS.
DFHTTPDS Defines the terminal type parameter (TTP). This contains information for a terminal type.
TCTTETTE The TCTTETTE DSECT in the DFHTCTZE macro defines the TCTTE BMS extension. It is chained off the TCTTE (TCTTETEA field).
DFHTPE Defines the BMS partition extension. This is chained off the TCTTE BMS extension if the terminal supports partitions.

Modules

BMS is provided by means of a number of modules, each of which interfaces with other BMS modules, CICS control components, and application programs. The maps that are handled by BMS may be new maps, created to use BMS mapping capabilities.

Table 2. BMS modules
Module Description
DFHBMSX URM called when a 3270 data stream validation error has been detected when issuing BMS RECEIVE MAP commands.
DFHDSB Addresses the page buffer, which was composed by the page and text build program (DFHPBP).
DFHEMS The EXEC interface processor for BMS commands.
DFHIIP Called in response to requests for BMS services involving terminals other than IBM 3270 Information Display Systems.
DFHMCP The interface between application programs and the modules that perform mapping, message switching, page and text building, device-dependent output preparation, and message disposition to terminals, temporary-storage areas, or the application program.
DFHMCX The BMS fast path module for standard and full-function BMS, and the program for minimum BMS support. It is called by DFHMCP if the request satisfies one of the following conditions:
  • It is a non-cumulative direct terminal send map or receive map issued by a command-level program.
  • It is for a 3270 display or an LU3 printer which does not support outboard formatting. If the terminal supports partitions, it is in the base state.
  • The CSPQ transaction has been started.
  • The message disposition has not changed.
DFHM32 Called in response to requests for BMS services involving terminals of the 3270 Information Display System.
DFHPBP Processes all BMS output requests (SEND MAP, SEND PAGE, and SEND TEXT). It performs the following functions:
  • Positions the data in the page, either by placing it in a buffer, or by copying it and adjusting the map for an IBM 3270 Information Display System (SEND MAP ACCUM).
  • Places the data into the page buffer (SEND TEXT ACCUM).
  • Inserts device-dependent control characters for other than 3270 Information Display System devices, removing extended attributes.
DFHPHP Processes terminal operations that involve partitions.
DFHRLR Builds terminal type parameters (TTPs), which are the main blocks for building and writing out data in BMS.
DFHTPP Directs completed pages to a destination specified in the BMS output request: SEND TEXT sends to the originating terminal; SEND MAP PAGING or SEND TEXT PAGING directs to temporary storage; and SEND MAP SET or SEND TEXT SET directs to a list of completed pages that are returned to the application program).
DFHTPQ Checks the chain of automatic initiate descriptors (AIDs) to detect and delete AIDs that have been on the chain for an interval exceeding the purge delay time interval specified by the PRGDLAY system initialization parameter, if this has a nonzero value.
DFHTPR Processes messages built by BMS and placed in temporary storage.
DFHTPS Invoked for each terminal type to which a BMS logical message built with SEND MAP PAGING or SEND TEXT PAGING is to be sent. For each terminal designated by the originating application program, DFHTPR is scheduled to display the first page of the logical message if the terminal is in paging status, or the complete message if it is in autopage status.
The interrelationships of CICS programs requesting mapping services are summarized in Figure 2.
Figure 2. Modules associated with basic mapping support (BMS)
Diagram showing the modules associated with basic mapping support (BMS) and the relationships between them.

Reference for BMS modules provides details for specific programs within BMS.

Copybooks

Copybook Function
DFHBMSCA Defines constants for field attribute values, flags returned by BMS, and character attribute types and values for SEND TEXT. It is usually copied into BMS application programs.
DFHMCPE Included in the minimum-function BMS mapping control program DFHMCPE$, and also forms the BMS fast-path module DFHMCX used by both standard and full-function BMS. It is a small, fast, self-contained, limited-function BMS for 3270 displays and printers.
DFHMCPIN Included in the standard and full-function versions of the BMS mapping control program, DFHMCPA$ and DFHMCP1$ respectively. It contains the code for input mapping.
DFHMIN Included in the DFHM32 and DFHMCPE programs. It contains input mapping code for 3270 terminals.
DFHMSRCA Defines constants for MSR control. This is usually copied into BMS application programs.

Exits

No global user exit points are provided for this function.

Trace

The following point IDs are provided for basic mapping support, all with a trace level of BM 1:
  • AP 00CD, for temporary-storage errors
  • AP 00CF, for exit trace
  • AP 00FA, for entry trace