Vous êtes sur la page 1sur 3

CICS Application Programming Guide Using the BMS macros to code BMS map sets This section describes

the three macros DFHMSD, DFHMDI, and DFHMDF, that are use d to define BMS map sets, maps, and fields. It shows how to use the macros to de fine a simple map set, and how to catalog this mapset for use by application pro grams. The following macros are used to build map set definitions: Map set definition macro (DFHMSD) The DFHMSD macro defines a map set. A map set contains one or more maps. Map definition macro (DFHMDI) The DFHMDI macro defines a map within the map set that was defined by the pr evious DFHMSD macro. A map contains zero or more fields. Field definition macro (DFHMDF) The DFHMDF macro defines a field within a map that was defined by the previo us DFHMDI macro. A field name can be up to thirty characters long. You process a BMS map set definition to generate a symbolic description map or a physical map (or both) by using the BMS processor cicsmap command. Note: Before CICS can load a physical map, you must define a Program Definitions ( PD) entry for it with the ProgType attribute set to map. The following information provides guidance about how to use these macros to def ine map sets. See the TXSeries for Multiplatforms Application Programming Refere nce for syntax descriptions of these macros. Defining a map set Use the DFHMSD macro to define the map set. This macro consists of operands that allow you to define the basic characteristics of the map, or maps, that make up the map set. Some of the DFHMSD operands establish defaults for the DFHMDI and DFHMDF macros. Defining maps within a map set Each map in a map set is defined by using the DFHMDI macro. This macro is simila r in form to DFHMSD and specifies defaults for fields that are in the map. It al lows you to override some of the options that are inherited from DFHMSD, and to specify some new options. A map set definition must contain at least one map definition. Where you have mo re than one map, code their definitions one after another. The number of maps per map set is limited to a maximum of 9998. (This is based o n a map size of 8 characters.) All maps of a map set are loaded whenever any one of them is used. If all the ma ps of a map set are used during a single invocation of the program, the single l oad of all maps is more efficient than loading each map as it is required. You s hould ensure that you use unique names for maps within a map set, or within mult iple map sets that are copied into one application program. Another reason for loading several maps at the same time is that more than one o f them can appear on the screen at one time. This is because a map definition ca n specify where a map is to be placed on the screen. When BMS sends a map to a d isplay, it does not erase the existing contents of the display unless you code t

he ERASE option. Instead, it uses your program data, plus constant map data, to overlay part of the screen. Therefore, if you design your maps so that they occu py different parts of a screen, you can display them at the same time. Alternati vely, you can design some maps in a map set so that they overlay one another. In this way, you can erase parts of the contents of the screen without affecting t he rest. A map usually consists of one or more data fields. Each field contains display d ata, and has a set of associated attributes that are initialized by coding opera nds in a DFHMDF macro. All field definition macros that follow a map definition macro belong to that map. The end of one field definition is indicated by the be ginning of another. Defining fields within a BMS map The DFHMDF macro is used to specify initial attributes that are to be given to f ields within a map. Defining field groups Very often, an output data display field has to contain several subfields that s hare the same display attributes, each of which might have to be modified separa tely. On output, subfields that have not been modified by the program can adopt default data values from the output map. For example, a display can include a da te field with a day subfield, month subfield, and year subfield (shown later in the example of a map definition with the names DD, MM, and YY respectively). The contents of the year subfield remain constant over a relatively long period; it s value can safely be taken from a map. However, the day value and month value m ust be updated regularly. Similarly, on input, the terminal operator can enter d ata in each subfield separately. You use the GRPNAME operand to define a group of subfields that combine to produ ce a field. The start of the group is indicated by a DFHMDF macro with the GRPNA ME operand. This operand defines the first subfield, and specifies the attribute s and name of the group. It is followed by other DFHMDF macros, one for each of the other subfields. Each of these must specify the group name, but cannot speci fy attribute values. The definition of the group is terminated by a DFHMDF macro that specifies a different group name, by one that specifies no group name, or by a DFHMDI or DFHMSD macro. Briefly, a group of fields in a map might appear as follows in the map definitio n: MAPSET DFHMSD.... . . MAP DFHMDI.... . . DD DFHMDF GRPNAME=DATE,POS=(6,40),LENGTH=2,ATTRB=... . MM DFHMDF GRPNAME=DATE,POS=(6,46),LENGTH=2 . YY DFHMDF GRPNAME=DATE,POS=(6,52),LENGTH=2 . FIELD DFHMDF LENGTH=5,COLOR=GREEN,... DFHMSD TYPE=FINAL The POS operand specifies the position of the attribute byte of the field althou gh subfields of a group (other than the first) do not have attributes. If the su

bfields are positioned contiguously with no intervening blanks, the POS operand of the second and succeeding subfields must specify the position of the last cha racter of the previous subfield. Terminating a map set definition A map set definition ends with a DFHMSD macro of the form: [mapset] DFHMSD TYPE=FINAL mapset is optional, but if used it must be the same as that which is on the DFHM SD macro that began the map set. Coding the BMS definition macros When coding the BMS macros, you must ensure that the information appears in the correct columns so that it can be processed by cicsmap. Three column positions are significant: StartCol Starting column (default 1). ContCol Column in which continuation lines must begin (default 16). EndCol Last column before continuation marker (default 71). The following general coding rules apply: * The label for each BMS macro must start in StartCol. * The macro name must be separated from its label and first operand by one o r more spaces. * Operands must be separated by a single comma (,); spaces should be used wi th care because they cause the remainder of the line to be treated as a comment. * Lines that contain many operands can be continued after any comma, by plac ing a nonblank character (usually X) in the position after EndCol, then starting a new line with the first character of a new operand in ContCol. * Blank lines and tab characters are not allowed. * Comment lines are indicated by placing an asterisk (*) in StartCol. * All macros and their operands (except INITIAL and GINIT data) must be in u ppercase. [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

Vous aimerez peut-être aussi