Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-16
SIGN Clause
SIGN Clause
The SIGN clause specifies the position and mode of an operational sign for a numeric
data item. The clause can only be used for items that are described as DISPLAY in a
USAGE clause and have an S symbol in the PICTURE string.
LEADING
indicates the sign is at the beginning of the item.
TRAILING
indicates the sign is at the end of the item.
SEPARATE [ CHARACTER ]
specifies the sign becomes a separate character and is counted in the size of the item.
A + for positive and a – for negative is placed at the beginning or end of the item
value.
If this phrase is omitted, the sign is not counted in the size of the item. Depending
on whether you specify LEADING or TRAILING, the sign is at the beginning or
end of the item.
The following example illustrates the SIGN clause:
05 WS-subtotal-value PIC S9(02) SIGN IS TRAILING SEPARATE.
SYNCHRONIZED Clause
The SYNCHRONIZED clause forces alignment of an elementary item on the most
natural computer storage boundary.
RIGHT and LEFT
have no effect in SCREEN COBOL.
A VALUE clause must not appear for any group item that has a subordinate item
described with the SYNCHRONIZED clause.
In most cases, the alignment supplied automatically by the compiler is the most natural;
however, the SYNCHRONIZED clause affects alignment in a few special cases.
Alignment considerations are as follows:
Alignment requirements can cause SCREEN COBOL to generate implicit FILLER
data. The existence of this generated data must be accounted for in certain
situations.
SIGN [ IS ] { LEADING } [ SEPARATE [ CHARACTER ] ]
{ TRAILING }
{ SYNC } [ RIGHT ]
{ SYNCHRONIZED } [ LEFT ]