DSPATR (Display Attribute) Keyword for Display Files

Use this field-level keyword to specify one or more display attributes for the field you are defining. You can specify the DSPATR keyword more than once for the same field, and you can specify more than one attribute for the same keyword. However, each attribute (for example, UL), can be specified only once per field.

Note:
The effects of attributes may not appear on the display, depending on the hardware or software emulator you are using.

The format for the keyword is one of the following:

DSPATR(attribute-1 [attribute-2 [attribute-3 [...]]])
or
DSPATR(&program-to-system-field);

If you specify more than one attribute for the same field, whether in one keyword or in separate keywords, each attribute that is specified (and in effect when the field is displayed) affects the field. For example, if you want a field to be displayed with its image reversed and with high intensity, specify either DSPATR (RI HI), or DSPATR(RI), and DSPATR(HI).

The program-to-system-field parameter is required and specifies that the named field must be defined in the record format, alphanumeric (A in position 35), length of one, and usage P (P in position 38). The program uses this P-field to set the display attribute for the field this DSPATR keyword applies to.

The name P-field is used for multiple fields with the record being defined. One DSPATR P-field is allowed per field. The P-field contains the display attribute and identifies whether the field should be protected. See Valid P-field Values for Display Files.

The following are valid attributes for the first format of the DSPATR keyword:

For All Fields

Display Attribute
Meaning

BL
Blinking field

CS
Column separator

HI
High intensity

ND
Nondisplay

PC
Position cursor

RI
Reverse image

UL
Underline

For Input-Capable Fields Only

Display Attribute
Meaning

MDT
Set changed data tag when displayed

OID
Operator identification

PR
Protect contents of field from input keying

SP
Select by light pen

Notes:

  1. If you specify the UL, HI, and RI attributes on the 5250 display station for the same field, the result is the same as if you had specified ND.

  2. If OID is specified, then SP should not be specified. Neither OID nor SP can be optioned unless specified with another display attribute.

  3. Display attributes BL, CS, HI, RI, and UL can also be specified at the file, record, or field level as parameter values on the CHGINPDFT keyword.

  4. Display attributes CS, HI, and BL can cause fields on the 5292, 3477 Model FC, 3487 Model HC, 3179, 3197 Model C1 and C2, and 3488 5 color display stations to appear as color fields. See COLOR (Color) Keyword for Display Files for more information.

  5. If you are using an IBM Personal System/2* (PS/2)* computer that is emulating a 5250 display station and you are directly changing the EBCDIC screen buffer, you need to set the MDT attribute. See the IBM Personal Computer Enhanced 5250 Emulation Program Technical Reference manual for additional information.

  6. If you are using a PS/2 computer and VGA monitor, the UL attribute does not work due to hardware specific limitations in the way buffers are used.

Option indicators are valid for this keyword, except when the attributes OID or SP are the only display attributes specified.

Detailed descriptions of each of the attributes follow the coding example and sample display provided in Figure 141.

Figure 141. A 5-Byte Field Displayed with Various Display Attributes

5-Byte Field Displayed


Footnotes:

5
Dependent on monitor attached to display device.