[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
Reference Manual


Previous Contents Index

5.3.9 AUTO

Function

In the context of ACCEPT, the AUTO clause moves the cursor to the next field when the last character of an input or update field that was defined with the AUTO clause is entered.


Syntax Rule

The AUTO clause cannot be specified in the description of a literal screen item.

General Rules

  1. If the AUTO clause is specified at group level, it applies to each input and update screen item in that group.
  2. The AUTO clause is significant in the context of an ACCEPT.
  3. The AUTO clause is ignored in the description of an output screen item.
  4. If there is only one field to input, or if the field is the last one of the screen, the ACCEPT statement is completed when the last character of the field is entered.

Additional Reference

Section 6.8.1 statement in Chapter 6

5.3.10 BACKGROUND-COLOR (Alpha, I64)

Function

The BACKGROUND-COLOR clause specifies the background color for the screen item.


color-num

is an integer in the range 0--7 specifying a color as follows:
Color Color Value Color Color Value
Black 0 Red 4
Blue 1 Magenta 5
Green 2 Yellow/Brown 6
Cyan 3 White 7

Syntax Rule

The BACKGROUND-COLOR clause can be specified in any screen description entry.

General Rules

  1. The BACKGROUND-COLOR clause is effective only with color screens.
  2. If the BACKGROUND-COLOR clause is omitted, the initial default background color is black.
  3. If the clause is specified at group level, it applies to all subordinate screen items.
  4. If the BLANK SCREEN clause is specified and the BACKGROUND-COLOR clause is specified or inherited, then when a DISPLAY statement displays the screen item, the specified color becomes the default background color. It remains the default background color until another screen item with this combination of options is displayed (whether in the same DISPLAY statement or in another).

Technical Note

The colors in the list above are supported only on terminals and workstations that support the ANSI Standard color sequences. 1

Additional References

5.3.11 BELL

Function

The BELL clause sounds the workstation or terminal audio tone.


Syntax Rule

The BELL clause can be specified only for elementary screen description entries.

General Rule

The audio tone sounds when a DISPLAY statement displays a screen item whose description contains a BELL clause.

Additional Reference

Section 6.8.10 statement in Chapter 6

5.3.12 BLANK

Function

The BLANK clause clears a screen line or clears the whole screen before displaying the screen item.


Syntax Rules

  1. The BLANK SCREEN clause can be specified for any screen description entry.
  2. The BLANK LINE clause can be specified only for elementary screen description entries.

General Rules

  1. The BLANK SCREEN clause executes before a screen item displays, no matter where it appears in the screen item's description. When the BLANK SCREEN clause is specified, the screen is cleared and the cursor is placed at line 1, column 1.
  2. When BLANK LINE is specified in an elementary screen item's description, blanking begins at column 1 of the specified line and continues through to the end of the line.
  3. If neither the BLANK clause nor the ERASE clause (Alpha, I64) is specified, only the particular character positions corresponding to the screen item are modified when the item is displayed. The remainder of the screen content is not changed.
  4. The BLANK SCREEN clause returns the screen to the initial defaults for background and foreground color if the BACKGROUND-COLOR and FOREGROUND-COLOR clauses are not specified, respectively.
  5. The BLANK clause is ignored in an ACCEPT statement.

Additional Reference

Section 6.8.10 statement in Chapter 6

5.3.13 BLANK WHEN ZERO

Function

The BLANK WHEN ZERO clause replaces zeros with spaces when a data item's value is zero. In the context of the Screen Section, it displays spaces when the value of a screen item to be displayed on the screen is zero.


Syntax Rules

  1. The BLANK WHEN ZERO clause can be used only for a numeric or numeric edited elementary item.
  2. A data item or screen item containing the BLANK WHEN ZERO clause must be implicitly or explicitly described with DISPLAY usage.
  3. The syntax for a data item allows the spelling ZERO or ZEROES or ZEROS. The syntax for a screen item allows the spelling ZERO only.

General Rules

  1. The BLANK WHEN ZERO clause causes a data item or screen item to contain spaces when its value is zero.
  2. When the data item or screen item has a numeric PICTURE string, the BLANK WHEN ZERO clause makes the item's category numeric edited.
  3. The BLANK WHEN ZERO clause is ignored in the description of an input screen item.

Additional Reference

Section 6.8.10 statement in Chapter 6

5.3.14 BLINK (Alpha)

Function

The BLINK clause displays characters on the screen with the blink on character attribute.


Syntax Rule

The BLINK clause can be specified only in an elementary screen description entry.

General Rule

Blinking is only detectable when any of the following conditions are true:

  • Nonspace characters are displayed.
  • The underline and/or reverse-video attributes are specified.
  • The terminal screen is set to light background.

Additional References

5.3.15 CODE

Function

The CODE clause specifies a two-character literal that identifies each print line as belonging to a specific report.


report-code

must be a two-character nonnumeric literal.

Syntax Rule

If the CODE clause is specified for any report in a file, it must be specified for all reports in that file.

General Rules

  1. When the CODE clause is specified, report-code is automatically placed in the first two character positions of each Report Writer logical record.
  2. The positions occupied by report-code are not included in the description of the print line, but are included in the logical record size.

Additional Reference

Section 5.3.3

Example

The following file contains three reports:


FILE SECTION.
FD  REPORT-FILE
    LABEL RECORDS ARE STANDARD
    REPORTS ARE REPORT1
                REPORT2
                REPORT3.
REPORT SECTION.
RD  REPORT1 ...
    CODE "AA".

RD  REPORT2...
    CODE "BB".

RD  REPORT3...
    CODE "CC".

Note

1 This does not include the VT100, VT200, VT300, and VT400 series terminals. On workstations that emulate these terminal types, this restriction may not apply.


Previous Next Contents Index