Building the output screen
The interaction of physical map definition options, SEND MAP options, program data and merge options is sufficiently complex that a summary of the rules for determining what appears on the screen after a SEND MAP is in order.
- What was there before your SEND MAP command
- The fields (field attributes, extended attributes, and display data) that get sent from your SEND MAP command
- Where the several values for these field elements come from
What you start with
The first thing that happens on a SEND MAP command is that the entire screen (buffer) is cleared to nulls if the ERASE option is present, regardless of the size or origin of your map. On terminals that have the alternate screen size feature, the screen size is set as well, as explained in 3270 write commands in The output datastream . The screen is in unformatted state, with no fields defined and no display data. If ERASEAUP is present, all of the unprotected fields on the screen are erased, but the field structure and attributes of all fields and the contents of protected fields are unchanged.
ERASE and ERASEAUP are honored before your SEND MAP data is loaded into the buffer. If neither of these options appears on the SEND MAP, the screen buffer starts out in the same state it was in after the previous write operation, modified by whatever the operator did. In general, the positions of the fields (that is, of the attributes bytes) and their attributes are unchanged, but the data content of unprotected fields can be different. Furthermore, if the operator used the CLEAR key, the whole buffer is cleared to nulls and the screen is in unformatted state, just as if you had included the ERASE option.
What is sent
Secondly, BMS changes only those positions in the buffer within the confines of your map. Outside that area, the contents of the buffer are unchanged, although it is possible for areas outside your map to change in appearance, as explained in Outside the map.
Within the map area, what is sent depends on whether the DATAONLY option is present. In the typical case, where it is not present, BMS sends every component (field attributes, extended attributes, display data) of every field in your map. This creates a field at the position specified in the POS operand and overlays the number of bytes specified in the LENGTH field from POS. Buffer positions between the end of the display data and the next attributes byte (POS value) remain unchanged. (There might or might not be fields (attributes bytes) in these intervening spaces if you did not ERASE after the last write operation that used a different map.)
The values for these field elements come from the program, the map or defaults, as explained in the next section.
If DATAONLY is present, BMS sends only those fields, and only those components for them, that the program provides. Other screen data is unchanged.
Where the values come from
The values that determine screen contents can come from four sources: the program; the map; the hardware's defaults; or the previous contents of the screen.
- The MAPONLY option has not been used.
- The field has a name in the map, so that the symbolic output map contains the corresponding set of subfields from which to get the data. The field attributes value comes from the program subfield whose name is the map field name suffixed by A. The display data comes from the subfield of the same name suffixed by O, and the extended attribute values come from the same-named subfields suffixed by the letter that identifies the attribute (see Table 1). In the case of the extended attributes, the attribute must also appear among DSATTS in order for the symbolic map to contain the corresponding subfield.
- A value is present. The definition of “present” varies slightly
with the field component:
- For field attributes bytes, the value must not be null ( X'00' ) or one of the values that remain from an input operation ( X'80' , X'02' , or X'82').
- For extended attribute bytes, the value must not be null.
Note: BMS sends only those extended attribute values that the terminal is defined as supporting. Values for other extended attributes are omitted from the final data stream.
- For display data, the first character of the data must not be null.
- For field attributes, it takes the value in the ATTRB option for the field. If none is present, BMS assumes an ATTRB value of (ASKIP,NORM).
- For extended attributes, BMS takes the value from:
- The corresponding option in the DFHMDF field definition
- If it is not specified there, the value is taken from the corresponding option in the DFHMDI map definition
- If it is not there either, the value is taken from the corresponding option in the DFHMSD map set definition
- For display data, from the initial value in the map (the INITIAL, XINIT, or GINIT option). If there is no initial value, the field is set to nulls.
Outside the map
Your map need not be the same size as your screen or printer page. Your application can use only a part of the screen area, or you might want to build your output incrementally, or both.
BMS logical messages allow you to build a screen from several maps, sending it with a single terminal write. You use the ACCUM option to do this, which we cover in BMS logical messages . Even without using ACCUM, you can build a screen from several maps if the terminal is a 3270-like device with a buffer. You do this with multiple SEND MAP commands written to different areas of the screen (buffer), not erasing after the first command. Each SEND MAP causes output and might produce a momentary “flash” at a display device. For this reason, and to eliminate the path length of extra I/O, you might prefer to use logical messages for such composite screens.
Outside the map sent, the contents of the buffer are unchanged, except for the effects of ERASE and ERASEAUP cited earlier. In general, this means that the corresponding areas of the screen are unchanged. However, a screen position outside the map can get its attributes from a field within the map. This occurs if you do not define a field (using a different map) beyond the boundary of the map and before the position in question. If you change the attributes of the field inside your map governing this position outside, the appearance of the position might change, even though the contents do not.
Using GDDM and BMS
One use of the buffer overlay technique is the creation of screens containing a mixture of BMS and Graphical Data Display Manager ( GDDM ) output.
You generally write the BMS output first, followed by the GDDM. You can leave space in the BMS map for the GDDM output, or you can create a “graphic hole” in any display by writing a map with no fields in it to the position where you want the hole. Such a map is called a “null map,” and its size (height and width) correspond to the size of the hole.
If you use GDDM to combine graphics with BMS output, you need to include a GDDM PSRSRV call to prevent GDDM from corrupting programmed symbol sets that BMS might be using.