[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
Reference Manual


Previous Contents Index

Additional Reference

Section 5.3.4

Example

In the following example, the box RESULTS displays the values given when using the RENAMES clause:


5.3.42 REPORT

Function

The REPORT clause in a file description entry (FD) specifies the Report Description (RD) report names that comprise a report file.


Syntax Rules

  1. Each report-name in the REPORT clause must be the subject of a Report Description entry (RD) in the Report Section of the same program. report-name can appear in only one REPORT clause.
  2. report-names can appear in any order.
  3. The file-name in a file description entry for a Report File can be referenced only by the OPEN statement with the OUTPUT or EXTEND phrase or by the CLOSE statement.

General Rules

  1. More than one report-name in a REPORT clause indicates that the file contains more than one report.
  2. After executing an INITIATE statement and before executing a TERMINATE statement for the same report file, the report file is under the control of the Report Writer Control System (RWCS). While a report file is under control of the RWCS, no input/output statement may reference that report file.
  3. If the associated file connector is an external file connector, every file description entry in the run unit associated with that file connector must describe it as a report file.

Technical Note

On OpenVMS, the DCL PRINT command inserts a form-feed character when a form is within four lines from the bottom. This positions the report to the top of the next logical page.

Report Writer files are written in print format. Line spacing positions the report to the top of the next logical page.

Therefore, use the PRINT/NOFEED command to suppress the insertion of form-feed characters and to print your Report Writer files correctly. For example:


$ PRINT/NOFEED full-file-name   <>

Additional References

5.3.43 REQUIRED (Alpha, I64)

Function

The REQUIRED clause specifies that in the context of an ACCEPT statement, the user must enter at least one character in the input or update field.


Syntax Rule

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

General Rules

  1. If the REQUIRED clause is specified at group level, it applies to each input and update screen item in that group.
  2. The REQUIRED clause takes effect during the execution of any ACCEPT statement when the cursor enters the screen item. Until this clause is satisfied, the operator cannot leave the field and normal terminator keystrokes are rejected.
  3. To satisfy this clause, alphanumeric screen items must contain at least one nonspace character, and numeric screen items must have a nonzero value.
  4. For update fields, the REQUIRED clause can be satisfied by the contents of the identifier or literal referenced in the FROM or USING phrase of the PICTURE clause, as well as by operator-keyed data.
  5. The REQUIRED clause is not effective if a function key is used to terminate the accept operation.
  6. The specification of the FULL and REQUIRED clauses together requires that the field must always be filled entirely by the user.
  7. The REQUIRED clause is ignored for an output field.

Additional Reference

Section 6.8.1 statement in Chapter 6 <>

5.3.44 REVERSE-VIDEO (Alpha, I64)

Function

The REVERSE-VIDEO clause specifies that the field is displayed with the default or specified foreground and background colors exchanged.


Syntax Rule

The REVERSE-VIDEO clause can be specified only for elementary screen items.

Additional Reference

5.3.45 SECURE (Alpha, I64)

Function

The SECURE clause suppresses the display of input characters on the screen.


Syntax Rule

The SECURE clause can only be specified for an input screen item.

General Rules

  1. If the SECURE clause is specified at group level, it applies to each input screen item in that group.
  2. When the SECURE clause is used, characters introduced for the input field do not appear on the screen, yet the cursor moves as usual.

Additional Reference

Section 6.8.1 statement in Chapter 6 <>

5.3.46 SIGN

Function

The SIGN clause specifies the operational sign's position and type of representation.

For screen description entries, the SIGN clause specifies the position of the sign character in the field. The sign character always occupies a separate position in the field, regardless of whether or not you specify SEPARATE.


Syntax Rules

Format 1

  1. The SIGN clause can be used only in a numeric data description entry or screen description entry whose PICTURE contains the S symbol, or for a group item containing such entries.
  2. The data items to which the SIGN clause applies must have display usage.
  3. If a file description entry has a CODE-SET clause, all signed numeric data description entries associated with the file description entry must contain the SIGN IS SEPARATE clause.

General Rules

Both Formats

  1. The SIGN clause specifies the operational sign's position and type of representation. It applies to a numeric data description entry or screen description entry or to each numeric data description entry or screen description entry subordinate to a group.
  2. The SIGN clause applies only to numeric data description entries or screen description entries whose PICTURE clause contains the S symbol. S indicates the presence of an operational sign. However, S does not specify the sign's representation or, necessarily, its position.
  3. If you specify the SIGN clause for both a group item and a group item subordinate to it, the SIGN clause for the subordinate group overrides the group item SIGN clause.
  4. If you specify the SIGN clause for both a group item and an elementary numeric item subordinate to it, the SIGN clause for the elementary item overrides the group item SIGN clause.
  5. A numeric data description entry or screen description entry to which no optional SIGN clause applies, but whose PICTURE contains an S symbol, has an operational sign.
    • The numeric data description entry is equivalent to an entry that contains the SIGN IS TRAILING clause without the SEPARATE CHARACTER phrase.
    • The screen description entry is equivalent to an entry that contains the SIGN IS TRAILING with the SEPARATE CHARACTER phrase.
  6. If you specify the SEPARATE CHARACTER phrase (or it is implied):
    • The operational sign is the leading (or trailing) character of the elementary numeric data item. The sign does not share this position with a digit.
    • The S symbol in the PICTURE counts toward data or screen item size. That is, it represents a character position.
    • The operational sign for positive is the plus sign (+).
    • The operational sign for negative is the minus sign (-).
  7. Every numeric data item whose PICTURE contains the S symbol is a signed numeric data item. If you specify the SIGN clause for such an item, necessary conversions for computations or comparisons occur automatically.

Format 1 (Data Description)

  1. If you do not specify the SEPARATE CHARACTER phrase:
    • The operational sign is associated with the leading (or trailing) digit position of the elementary numeric item. The sign shares this character position with a digit.
    • The S symbol in the PICTURE does not count toward the size of the item. That is, it does not represent a character position.
    • The character in the operational sign position represents both a numeric digit and the item's algebraic sign. Table 5-11 shows the characters representing positive and negative signs for all numeric digits. Where more than one character appears, the first is the character generated as the result of machine operations.

      Table 5-11 Positive and Negative Signs for All Numeric Digits
      Digit Values Positive Sign Negative Sign
      0 {, [, ?, or 0 }, ], :, or !
      1 A or 1 J
      2 B or 2 K
      3 C or 3 L
      4 D or 4 M
      5 E or 5 N
      6 F or 6 O
      7 G or 7 P
      8 H or 8 Q
      9 I or 9 R


Previous Next Contents Index