Реклама
Реклама
You can also display data in
text
format. This presents data as a series of lines on a display screen or printer. To format text data, BMS breaks it into strings that are, as nearly as possible, the same length as each line of the display device. BMS assumes that text is a sequence of words separated by blanks, and breaks the text into lines at an appropriate point.
BMS maps
Maps tell BMS how to format field data; they are not needed for text data. Every
BMS mapping command names a map that contains formatting instructions. Each map has two forms,
physical
and
symbolic
.
Maps must belong to a map set. You usually group related maps together into one map set. You define a map set by coding a series of BMS macros. The first of these macros (DFHMSD) defines the map set itself; the second (DFHMDI) defines the first or subsequent maps. The third macro (DFHMDF) defines fields within a map.
The
physical map
tells BMS where the fields are to be placed on the terminal device, and what their attributes are.
A
symbolic description map
is a source language data structure that BMS runtime support uses to resolve source program references to fields in the map. Symbolic
The CICS CL command CRTCICSMAP generates both types of maps in one run. A standard OS/400 prompt screen is produced showing all available parameters and their defaults if you enter just the command name and press the PF4 key. Optional help text is also available if you press the PF1 key.
You could define a single map set to suit every particular terminal attached to a
CICS system. However, you might want (or need) to format the same data differently for different devices. For example, the same transaction might be initiated from displays of various screen sizes.
BMS map definition
You define map sets, maps, and fields within maps with the following macros:
DFHMSD
Define a map set.
DFHMDI
Define a map.
DFHMDF
Define a field.
Use of these macros is explained in “Defining BMS maps” on page 147.
The macros define the size, shape, position (row and column), potential content, and characteristics (such as color, protected or unprotected, and bright or dark).
You can optionally use them to define initial data for one or more fields to be displayed at a terminal. You should design the layout and content of a display before attempting to code the macros.
136
CICS for iSeries Application Programming Guide V5
Always start a map definition with the DFHMSD macro, specifying TYPE=MAP, as follows:
DFHMSD TYPE=MAP
DFHMSD is always followed by a DFHMDI macro for the first (or only) map in the map set:
DFHMSD TYPE=MAP
DFHMDI ...
After DFHMDI come the DFHMDF macros (if any) to define the individual fields within the map:
DFHMSD TYPE=MAP
DFHMDI ...
DFHMDF ...
DFHMDF ...
If there is more than one map in your map set, repeat the sequence of DFHMDI and DFHMDF macros for each subsequent map in the set. End the map set definition with a DFHMSD macro with the TYPE=FINAL operand.
So for two maps, the sequence of macros may be as follows:
DFHMSD TYPE=MAP
DFHMDI ...
DFHMDF ...
DFHMDF ...
DFHMDI ...
DFHMDF ...
DFHMDF ...
DFHMDF ...
DFHMSD TYPE=FINAL
Specify attributes of map sets, maps, and fields by using operands in the appropriate macros. Some operands can be specified on both the DFHMDF and
DFHMDI macros, and some can be specified on both the DFHMSD and DFHMDI macros. In such cases, specifying the operand on the DFHMDI (map definition) macro defines the default value for all fields within the map. For example, if you want to define a map with most fields blue, you can specify COLOR=BLUE on the
DFHMDI macro; and only specify the color operand for the individual DFHMDF macros which need to be different. Similarly, operands on DFHMSD macro can define defaults for all maps within the map set and all fields within those maps.
Some facilities of 3270 devices, such as color, are not provided by all terminal models. Attempts to use a facility that the terminal does not provide are ignored.
This means that different 3270 terminals do not necessarily need different maps.
Some of the 3270 extended attributes are not supported on 5250 devices. Details
are given in the descriptions of the operands in Appendix D, “BMS macro summary,” on page 553.
Creating BMS map sets
The create CICS map (CRTCICSMAP) CL command is used to generate screens from BMS source files. For an explanation of the syntax and parameters available
with this command, see page 301.
Cataloging BMS map sets
You can use the same set of DFHMSD, DFHMDI, and DFHMDF macros to define both the physical maps and symbolic description maps of a map set. When you
Chapter 12. Introduction to basic mapping support (BMS)
137
Изтегляне
Реклама