MF 

The CONTROL Clause

The CONTROL clause allows attributes associated with a Screen Section item to be defined at run time.

General Format


Syntax for the CONTROL clause

Syntax Rules

  1. This clause is allowed with any screen item.
  2. If this clause is specified at group level, it applies to all elementary subordinate items.
  3. Identifier-1 must be an alphanumeric data item. The maximum permitted size of the item is PIC X(65535).
  4. Attributes specified in identifier-1 override any statically defined attributes.
  5. CONTROL statements must not be nested.
  6. The PROTECT attribute may be specified only for an elementary screen description entry.
  7. integer-1 must be a value between 0-15, as noted in The FOREGROUND-COLOR Clause or The BACKGROUND-COLOR Clause.
  8. identifier-2 must be one of BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, or WHITE.

General Rules

  1. When an ACCEPT or DISPLAY statement is executed that implicitly or explicitly references the subject of this entry, the contents of the data item referenced by identifier-1 must conform to the following subset of the screen attributes which can be specified elsewhere:

    Syntax of screen attributes to which the data item referenced by identifier-1 must conform

  2. If identifier-1 contains spaces, the statically defined attributes are used for any accept or display of the item.
  3. The meaning of each of the attributes that can be specified within the CONTROL identifier-1 is defined in the following parts of this reference:
    1. Within the Data Division as an individual Screen Section clause
      • AUTO-SKIP/AUTO
      • BACKGROUND-COLOR/BACKGROUND-COLOUR/BCOLOR
      • BELL/BEEP
      • BLANK LINE/SCREEN
      • BLINK
      • ECHO
      • ERASE EOS/EOL
      • FOREGROUND-COLOR/FOREGROUND-COLOUR/FCOLOR
      • FULL/LENGTH-CHECK
      • GRID
      • HIGHLIGHT/HIGH
      • JUSTIFY/JUST
      • LEFTLINE
      • LOWLIGHT/LOW
      • OVERLINE
      • PROMPT
      • REQUIRED/EMPTY-CHECK
      • REVERSE-VIDEO/REVERSE
      • SECURE/NO-ECH0/OFF
      • TAB
      • UNDERLINE
      • UPDATE
      • ZERO-FILL
    2. Within the Procedure Division in the ACCEPT statement General Rules:
      • RIGHT-JUSTIFY
      • TRAILING-SIGN
      • TRAILING
    3. Within this CONTROL clause discussion:
      • PROTECT
  4. The PROTECT attribute specifies that input to an ACCEPT item is to be prevented.
  5. The = sign is synonymous with a space; for example, BCOLOR=3 is the same as BCOLOR 3.
  6. The color name can be specified as an equivalent to the integer values integer-3 and integer-4; for example, BCOLOR IS BLUE.