COLOR (Color) Keyword for Display Files --Examples

Figure 128 shows the effects of specifying COLOR and DSPATR for a field.

Figure 128. Specifying the COLOR and DSPATR Keywords

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD                    (1)
00020A                                  1  2'Column Heading'
00030A                                      DSPATR(HI)
00040A       (2)  FIELD1         5      3  2
00050A       (3)  FIELD2         5   I  5  2COLOR(YLW)
00060A       (4)  FIELD3         5      7  2DSPATR(BL)
00070A       (5)  FIELD4         5   I  9  2
00080A  42                                  COLOR(YLW)
00090A  43                                  COLOR(TRQ)
00100A  44                                  COLOR(BLU)
     A

(1)
On color displays, the constant field Column Heading is white; on monochrome displays, it is highlighted.

(2)
On all displays, FIELD1 is green.

(3)
On color displays, FIELD2 is yellow with blue column separators. On all displays, the field is underlined because it is an input-capable field.

(4)
On color displays, FIELD3 is red and does not blink; on monochrome displays, it blinks.

(5)
On color displays, FIELD4 can appear in one of the following colors:

On monochrome displays, FIELD4 is green. On all displays, FIELD4 is underlined.

Figure 129 shows one way of specifying a field for use as an input-capable field on both color and monochrome displays.

Figure 129. Specifying a Field for Color and Monochrome Displays

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD
00020A(2)(1)    FIELDA         5   B  2  2COLOR(TRQ)
00030A  44                                  ERRMSG('Record not found' 44)
     A

(1)
On color displays, FIELDA is turquoise with blue column separators; on monochrome displays, it is green.

(2)
If option indicator 44 is set on when FIELDA is displayed, the ERRMSG keyword is in effect and causes the following: