Setting the display characteristics

Display attributes are the second component of the output data. (See 3270 field attributes for information about attributes.) In the "quick check" example on page A BMS output example, we show how 3270 field attributes for a map field are defined with the ATTRB option, and how BMS generates the "A" subfield to let you override the map value by program if you name the field.

BMS always provides the A subfield, because all 3270 devices support field attributes. Many 3270s also have some of the extended attributes shown in Table 40. BMS supports each of these attributes individually in much the same way that it does field attributes collectively. You can assign attribute values in your DFHMDF field definitions, and, if you name the field, BMS generates a subfield in the symbolic map, so that you can override the map-assigned value in your program. There is a separate subfield for each type of extended attribute.

You can request subfields for the extended attributes by specifying the required attribute in the DSATTS option of DFHMDI or DFHMSD. You must also include the list of extended attributes in the the MAPATTS option (even if these attribute types do not appear in any DFHMDF macro).

Table 40. BMS attribute types The columns show the types of attributes, the name of the associated MAPATTS and DSATTS value, and the suffix of the associated subfields in the symbolic map.
Attribute type MAPATTS, DSATTS value Subfield suffix
Field attributes None (default) A
Color COLOR C
Highlighting HILIGHT H
Outlining OUTLINE U
Background transparency TRANSP T
Validation VALIDN V
Double-byte character capability SOSI M
Programmed symbols PS P
Note:
If you use programmed symbols, you need to ensure that a suitable symbol set has been sent to the device first, unless you choose one that is permanently loaded in the device. You can use a terminal control SEND command to do this (see Using data transmission commands). The IBM® 3270 Information Display System Data Stream Programmer’s Reference manual describes what to send.

The types of attributes that apply depend on the features of your principal facility at the time of execution. If you specify a value for an attribute that the terminal does not possess, BMS ignores it. If you are supporting different terminal types, however, you may need to use different techniques to get the same visual clarity. You can find out what kind of terminal you are using with the ASSIGN and INQUIRE commands, explained in Finding out about your terminal. There are also provisions in BMS for keeping your program independent of the terminal type; see Device-dependent maps.

Changing the attributes

Here is an example of how this works. Suppose that the terminals in our "quick check" application have color and highlighting capabilities. We might decide to show the maximum charge allowed in a different color from the rest of the screen, because this field is of most interest to the clerk. We might also make the warning message red, because when it appears at all, it is important for the clerk to notice it. And when we really want to get the clerk’s attention, because the card is stolen, we could change the attributes in the program to make the message blink. To add these features, we need to change our map definition as follows:

QCKMAP   DFHMDI SIZE=(24,80),...,                                            X
               MAPATTS=(COLOR,HILIGHT),COLOR=GREEN,HILIGHT=OFF,DSATTS=HILIGHT

The MAPATTS option tells BMS that we specify color and highlighting in the map (or in the program, because any attribute listed in DSATTS must be included in MAPATTS as well). The COLOR and HILIGHT values indicate that fields with no color assigned should be green and that highlighting should be off if not specified.

Start of changeThe only field definitions that we need to change are the ones that are not green or are highlighted:

CHG      DFHMDF POS=(5,13),LENGTH=8,ATTRB=(ASKIP,NORM),PICOUT='$,$$0.00',    X
               COLOR=NEUTRAL
MSG      DFHMDF LENGTH=20,POS=(7,1),ATTRB=(ASKIP,NORM),COLOR=RED

Specifying COLOR=NEUTRAL means that on a terminal, the field is displayed in white.End of change

The DSATTS option tells BMS that we want to alter the highlighting of some fields at execution time, and therefore it should produce "H"-suffix subfields in the symbolic map to let us do that. Each named field gets the extra subfield; the message field, for example, expands from the current three lines in Figure 104 to:

           02  FILLER PICTURE X(2).
           02  MSGH    PICTURE X.
           02  MSGA    PICTURE X.
           02  MSGO  PIC X(30).

The program statement we need to produce the blinking is:

          MOVE DFHBLINK to MSGH.

In general, BMS takes attribute values from the program if you supply them and from the map if you do not (that is, if you leave the program value null, as initialized). However, the MAPONLY and DATAONLY options on the SEND MAP command affect attribute values as well as field data, as explained in Where the values come from.

Attribute value definitions: DFHBMSCA

The 1-byte values required to set attribute values are bit combinations defined by 3270 hardware. They are hard to remember and, in some languages, clumsy to express. To solve this problem, CICS® provides source code that you can copy into your program. The code, named DFHBMSCA, defines all the commonly used values for all attributes and assigns meaningful names to each combination. DFHBLINK in the line of code above is an example. To define DFHBLINK, we simply copy DFHBMSCA into our working storage, thus:

       WORKING-STORAGE SECTION.
       ...
       01  COPY DFHBMSCA.

There is a separate version of DFHBMSCA for each programming language, but the value names are the same in all versions. If you need an attribute combination not included in DFHBMSCA, you can determine the value by referring to the IBM 3270 Information Display System Data Stream Programmer’s Reference; if you make frequent use of the value, you may want to modify DFHBMSCA to include it.

Note:
In assembler language only, the values are defined with EQUates, so you use MVI rather than MVC instructions.
[[ Contents Previous Page | Next Page Index ]]