The SIGN Clause (Report Writer)

The SIGN clause specifies the position and the mode of representation of the operational sign when it is necessary to describe these properties explicitly.

General Format


*

Syntax Rules

  1. The SIGN clause can be specified only for a numeric data description entry whose PICTURE contains the character "S".
  2. The numeric data description entries to which the SIGN clause applies must be described, implicitly or explicitly, as USAGE IS DISPLAY.
  3. When the SIGN clause is included in a report group description entry, the SEPARATE CHARACTER phrase must be specified.

General Rules

  1. The optional SIGN clause, if present, specifies the position and the mode of representation of the operational sign for the numeric data description entry to which it applies. The SIGN clause applies only to numeric data description entries whose PICTURE contains the character "S"; The "S" indicates the presence of, but neither the representation nor, necessarily, the position of the operational sign.
  2. A numeric data description entry whose PICTURE contains the character "S", but to which no optional SIGN clause applies, has an operational sign, but neither the representation nor, necessarily, the position of the operational sign is specified by the character "S". In this (default) case, General Rule 3 does not apply to such signed numeric data items. The representation of the default operational sign is defined in the section Selection of Character Representation and Radix in the chapter Concepts of the COBOL Language.
  3. Since a SIGN clause in a report group description entry must specify the SEPARATE CHARACTER phrase, then:
    1. The operational sign will be presumed to be the leading (or, respectively, trailing) character position of the elementary numeric data item; this character position is not a digit position.
    2. The letter "S" in a PICTURE character-string is counted in determining the size of the item (in terms of standard data format characters).
    3. The operational signs for positive and negative are the standard data format characters "+" , and "–", respectively.
  4. Every numeric data description entry whose PICTURE contains the character "S" is a signed numeric data description entry. If a SIGN clause applies to such an entry and conversion is necessary for purposes of computation or comparisons, conversion takes place automatically.