Previous Topic: Map Modification CommandsNext Topic: CLOSE


Attributes Command

Purpose

Modifies a map attribute for one or more map fields.

Syntax

►►───┬─ BRIGHTen ──┬──────────────────────────────────────────────────────────►
     ├─ DARKen ────┤
     ├─ NORMALize ─┤
     ├─ PROTect ───┤
     └─ UNPROTect ─┘

 ►──┬─┬────────────────────┬───── CURrent ───────────────┬────────────────────►
    │ └─ all ─┬─ BUT ────┬─┘                             │
    │         └─ EXCept ─┘                               │
    ├─ ALL ────┬───────────┬─── FIELDS ──────────────────┤
    │          ├─ CORrect ─┤                             │
    │          └─ ERRor   ─┘                             │
    │                            ┌───────────────┐       │
    └─ all ─┬────────────┬─┬─ ( ─▼── field-name ─┴─ ) ─┬─┘
            └┬─ BUT ────┬┘ └┬─ FIELD ─┬─ field-name ───┘
             └─ EXCept ─┘   └─ DFLD ──┘

 ►──┬─ PERManent ◄ ─┬── . ────────────────────────────────────────────────────►◄
    └─ TEMPorary ───┘

Parameters

BRIGHTen

Displays the specified map fields at brighter-than-normal intensity. A brightened field appears highlighted on the terminal screen.

DARKen

Displays the specified map fields at darker-than-normal intensity. Characters in a darkened field do not appear on the terminal screen.

NORMALize

Displays the specified map fields at normal intensity.

PROTect

Enables the input protect attribute for the specified map fields. The user cannot enter, modify, or delete data in the specified fields.

UNPROTect

Disables the input protect attribute for the specified map fields. The user can enter, modify, or delete data in the specified fields.

CURrent

Modifies the current map data field only. The current map data field is determined by the most recent map modification command or map field status condition test:

all BUT

Modifies all map data fields except the current field.

EXCEPT can be used in place of BUT.

ALL FIELDS

Means that the attribute coded in this command will be applied to all data fields on the map, unless either of the optional positional parameters CORrect and ERRor are specified.

CORrect

Means that the attribute coded in this command will be applied during the next error display to all data fields that have NOT been marked as 'IN ERROR'.

ERRor

Means that the attribute coded in the command will be applied during the next error display to all data fields that have been marked as 'IN ERROR'.

If CORRECT or ERROR is not specified, all map data fields are modified.

all BUT

Introduces the fields to be modified.

The optional keyword BUT modifies all map data fields except the field or fields specified by field-name.

EXCEPT can be used in place of BUT.

FIELD field-name

Specifies the map data field to be modified.

DFLD can be used in place of FIELD.

PERManent

Specifies permanent modification.

The modification applies to each display of the map associated with the current dialog as long as the dialog remains operative in the application thread. In a pageable map, a modification to a map data field of a detail line occurrence applies throughout the map paging session.

PERMANENT is the default when neither TEMPORARY or PERMANENT is specified.

TEMPorary

Specifies temporary modification.

The modification applies only to the next display of the map associated with the current dialog. In a pageable map, a modification to a map data field of a detail line occurrence applies only to the next time the detail line occurrence is displayed on the screen during the map paging session.

Usage

Definition

The attributes command provides an alternative format to the MODIFY MAP command for modification of display intensity or protected status of one or more map data fields. Only one attribute can be specified in a single attribute command.

The MODIFY MAP command can be used to modify multiple attributes. MODIFY MAP is discussed later in this section.

Example

The statements in the following example make up part of a response process that adds a new CUSTOMER record occurrence to the database. If the user enters a customer number that is already assigned, the screen is redisplayed with the CUST-NUMBER field in bright intensity:

FIND CALC CUSTOMER.
IF DB-STATUS-OK
THEN
  DO.
    BRIGHTEN FIELD CUST-NUMBER TEMPORARY.
    DISPLAY MESSAGE TEXT IS
    'CUSTOMER NUMBER ALREADY ASSIGNED.'.
  END.
ELSE
    STORE CUSTOMER.
    DISPLAY MESSAGE TEXT IS
    'CUSTOMER HAS BEEN ADDED.'.

More information:

Conditional Expressions