GDDM V3R2 Base Application Programming Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Character attributes

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



Highlighting, color, and PS attributes can be specified for individual characters within a field. Usually, character attributes are used to emphasize a particular character string in a field.

Note: GDDM supports character attributes in mapped variable fields, but not in constant or initial values held in the map.

To control any type of character attribute, the program needs an additional application data area. This area has the same structure as the usual application data area (including adjunct fields), but the data fields are interpreted as character attributes rather than character data.

To declare several data areas using the same structure, you can use an array of structures or (in PL/I) the LIKE attribute.

COBOL


     01  ALLAREAS.
      02  DATA-AREA OCCURS 3 TIMES.
         COPY MAP.

PL/I


     Declare
         1 DATA_AREA,
            %INCLUDE MAP;
     Declare
         1 COLOR_AREA LIKE DATA_AREA;

In the former case, the individual application areas (and fields and adjuncts within them) can be referred to using an array index. In the second case, they can be referenced using name qualification (DATA_AREA.FIELD1, COLOR_AREA.FIELD1, and so on).

The character attribute data areas are filled in the same way as are the usual application data areas, except that the data fields contain characters representing attributes. For example:


     DATA_AREA.FIELD1 ='data value';
     COLOR_AREA.FIELD1='1111111121';

Adjunct fields in the character attribute application data area have the same meaning as in the normal data area. Selector and Length adjuncts apply to the character attribute data field.

Each application data area is passed to GDDM with a separate MSPUT call. The character attribute type is specified as an option on MSPUT. The character attributes should be MSPUT after the data values, because changing the data value of any field automatically resets the character attributes of the field to the default value (C' '). Also, an MSPUT with option 0 (WRITE) resets all the character attributes of all fields in the map to default.

The allowable attribute types and attribute values are listed in Table 43. GDDM checks attribute types and does not transmit those that the device does not support. Invalid attribute values are rejected.


 Table 43. Character attribute types and values
 Type  Value  Meaning
 All
              
 X'00'
 C' '
 Default. Take the attribute value from
 field's attribute.
 Extended
 highlighting
              
 C'1'
 C'2'
 C'4'
 Blinking
 Reverse video
 Underscore
 Color
              
              
              
              
              
              
 C'1'
 C'2'
 C'3'
 C'4'
 C'5'
 C'6'
 C'7'
 Blue
 Red
 Magenta (pink)
 Green
 Turquoise (cyan)
 Yellow
 White/Neutral
 Programmed
 symbols
              
              
              
 X'41'
   .
   .
   .
 X'DF'
 PS code. Note that a symbol-set must be
 loaded before any reference to it is made.
 See "Programmed symbols adjunct".
                                               
                                               
 Note: In the above table, C'c' indicates character data type, and
 X'x' indicates hexadecimal.

Subtopics:

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012