When moving a signed packed-decimal item to another signed packed-decimal item, this option specifies whether to move the sign of a sending-side item as is (SDS) or move a formatted sign (NOSDS). There are two types of negative signs: X'B' and X'D'. The others are treated as positive signs. Here, formatting a sign means to convert the sign of the sending-side item from either the positive sign to X'C' or the negative sign to X'D'.
Item | Description | |
---|---|---|
Arrangement of sign of decimal item | Specifies whether to format the sign of a signed decimal item. The default is SDS. | |
SDS | Moves the sign as is. | |
NOSDS | Formats the sign before moving it. |
When NOSDS is specified, if it is a value for the sign to mean negative, it changes in minus symbol and if it is a value for the sign to mean positive, it changes to plus symbol. When minus symbol attaches to value 0, it changes to plus symbol.
Example
Program into which operation changes by option
01 A PIC S9V9 VALUE -0.1 01 B PIC S9. : MOVE A TO B.
When SDS is specified, the decimal point of -0.1 is rounded down and -0 is stored in B.
When NOSDS is specified, the decimal point of -0.1 is rounded down, it becomes -0, convert of the sign is done, and +0 is stored in B.