When writing a Reporting Facility program, you may need to establish a constant numeric value by coding a numeric constant. Numeric constants can be preceded by a sign (+ or -) and must consist of digits in the range 0 to 9. You can code up to 15 digits in any single numeric constant. You can place a decimal point anywhere within the constant.
The constant is assumed to be positive if no sign is specified. The precision and length of the constant are automatically calculated and internally stored in packed decimal format.
The following table illustrates rules for coding numeric constants:
|
Coded String |
Net Length |
Precision |
|---|---|---|
|
123.45 |
3 |
(3.2) |
You can code numeric constants on these commands:
|
ADD |
DIVIDE |
PRINT |
|
Copyright © 2014 CA.
All rights reserved.
|
|