MF 

The PROMPT Clause

The PROMPT clause causes the empty character positions in the screen item to be marked on the screen during an ACCEPT operation while the system is ready to accept operator-keyed data into that item.

General Format


*

Syntax Rules

  1. This clause is allowed only with input and update fields and with group items.
  2. If this clause is specified at group level, it applies to all subordinate elementary items.
  3. Identifier-1 must be a single-character alphabetic or alphanumeric data item.
  4. Identifier-1 must not be subject to an OCCURS clause.
  5. Literal-1 must be a one-character nonnumeric literal or a figurative constant.

General Rules

  1. For items in the Screen Section :
    1. PROMPT is always on.
    2. If the PROMPT clause is not specified, or is specified without the CHARACTER phrase, the default prompt character is used.
  2. For other data items referenced in an ACCEPT statement,
    1. PROMPT is on if and only if the PROMPT clause is specified on the ACCEPT statement.
    2. If the PROMPT clause is specified without the CHARACTER phrase, the default prompt character is used.
  3. The CHARACTER phrase specifies a prompt character to be used for marking empty character positions. The prompt character overrides the configured option. (See your COBOL system documentation about user interfaces for details on configuration options.)
  4. The PROMPT clause causes the prompt character to replace trailing spaces in alphanumeric or free format numeric screen items. It also causes the prompt character to replace leading suppressed digit positions in fixed format numeric edited screen items.
  5. The PROMPT clause has no effect on fixed format, nonedited numeric screen items or numeric edited screen items that have no zero-suppression positions.
  6. If PROMPT is on for a field, you cannot move the cursor past the end of the field, which is marked by prompt characters. An attempt to do so moves the cursor to the next field .
  7. If PROMPT is not on for a field, the cursor can be moved to the spaces following the end of the field.
  8. This clause has no effect if the SECURE clause is specified.
  9. The prompt characters appearing in the screen item are changed to spaces upon termination of the ACCEPT operation.