This field-level keyword specifies the color of a field on a color display (3179, 3197 Models C1 and C2, 3477 Model FC, 3486, 3487 Model HC, 3488 4 or 5292 Color Display Stations only). This keyword is ignored if it is selected for a field displayed on monochrome display stations. You can specify one parameter value for the COLOR keyword, but you can specify more than one COLOR keyword on each field.
The format of the keyword is:
COLOR(GRN | WHT | RED | TRQ | YLW | PNK | BLU)
The valid parameter values are:
Because green is the default color of the fields on color display stations, you need to specify COLOR(GRN) only to keep the color of a field green. Specifying DSPATR(HI), DSPATR(CS), or DSPATR(BL) for a field changes the color of the field unless you also specify COLOR(GRN).
Option indicators are valid for this keyword.
When you specify the COLOR keyword more than once for a field, you must specify option indicators with each COLOR keyword. If more than one COLOR keyword is in effect for an output operation, the OS/400 program uses the first COLOR keyword that is specified in the DDS (see Figure 128). You cannot specify the same color more than once for a field.
The number of COLOR keywords you can specify in one display file is limited by the maximum size of an internal storage area of the system called the screen attribute array. The maximum size of the screen attribute array is 32 763 bytes for the entire display file. Each COLOR keyword you specify in the file uses up a significant amount of storage within this array.
If you use many COLOR keywords in a file, particularly with conditioning, you should consider the amount of internal storage these keywords will require. If the 32 763-byte limit is exceeded, message CPF0673 (Too many COLOR or DSPATR keywords specified in file) is issued during file creation. To determine the amount of storage required for a particular COLOR keyword, use the following algorithm:
(# of conditions for the keyword) x 2 + 2 + 29 = # of bytes required in the screen attribute array for the keyword
For example, suppose a file contains 8 fields, each field contains 9 COLOR keywords, and each COLOR keyword is optioned using 3 conditions. Using the above algorithm, each COLOR keyword requires 520 bytes in the screen attribute array:
3 x 2 + 2 + 29 = 520 bytes
Since there are 9 COLOR keywords per field and 8 fields in the file, the total storage required in the screen attribute array is 37 440 bytes (520 x 9 keywords x 8 fields). Since 37 440 is greater than 32 763, message CPF0673 is issued at file creation time.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.